cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-481390%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E7%94%A8%E4%BA%8E%E5%AE%9A%E5%88%B6%E8%AE%BE%E8%AE%A1%E7%9A%84%20JSL%20%E5%92%8C%20DOE%5B%5D%20%E5%B9%B3%E5%8F%B0%EF%BC%8C%E6%82%A8%E8%83%BD%E5%90%A6%E6%A0%B9%E6%8D%AE%E6%A8%A1%E6%80%81%E7%AA%97%E5%8F%A3%E4%B8%AD%E7%9A%84%E5%8F%98%E9%87%8F%E5%80%BC%E6%9C%89%E6%9D%A1%E4%BB%B6%E5%9C%B0%E2%80%9C%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA%E5%9B%A0%E5%AD%90%E2%80%9D%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-481390%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%88%91%E6%83%B3%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E8%84%9A%E6%9C%AC%EF%BC%8C%E5%85%B6%E4%B8%AD%E5%9F%BA%E4%BA%8E%E4%B8%80%E4%BA%9B%E5%85%88%E5%89%8D%E7%9A%84%E8%BE%93%E5%85%A5%E5%8F%98%E9%87%8F%EF%BC%8C%20DOE%5B%5D%20%E5%AF%B9%E8%B1%A1%E8%A2%AB%E5%8F%91%E9%80%81%E6%B6%88%E6%81%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E4%B8%80%E4%B8%AA%E9%A2%9D%E5%A4%96%E7%9A%84%E5%9B%A0%E7%B4%A0%E3%80%82%3C%2FP%3E%3CP%3EDOE%20%E8%AE%BE%E8%AE%A1%E7%94%9F%E6%88%90%E7%8E%B0%E5%9C%A8%E8%BF%90%E8%A1%8C%E8%B5%B7%E6%9D%A5%E5%BE%88%E7%B9%81%E9%87%8D%EF%BC%88%E5%A4%A7%E7%BA%A6%2030%20%E7%A7%92%EF%BC%89%EF%BC%8C%E6%89%80%E4%BB%A5%E6%88%91%E6%AD%A3%E5%9C%A8%E5%AF%BB%E6%89%BE%E4%B8%80%E7%A7%8D%E7%B2%BE%E7%AE%80%E7%9A%84%E6%96%B9%E5%BC%8F%EF%BC%88%E4%BE%8B%E5%A6%82%EF%BC%8C%E5%9C%A8%E5%8F%91%E9%80%81%E2%80%9C%E5%88%B6%E4%BD%9C%E8%AE%BE%E8%AE%A1%E2%80%9D%E6%B6%88%E6%81%AF%E4%B9%8B%E5%89%8D%E5%AF%B9%E5%85%B6%E8%BF%9B%E8%A1%8C%E8%B0%83%E6%95%B4%EF%BC%89%E3%80%82%3C%2FP%3E%3CP%3E%E7%90%86%E6%83%B3%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E6%88%91%E6%83%B3%E4%BD%BF%E7%94%A8%20if%20%E5%AD%90%E5%8F%A5%EF%BC%8C%E6%A3%80%E6%9F%A5%E6%89%80%E8%BF%B0%E5%B8%83%E5%B0%94%E5%8F%98%E9%87%8F%E6%98%AF%E5%90%A6%E4%B8%BA%E7%9C%9F%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%98%AF%EF%BC%8C%E5%88%99%E5%B0%86%E8%AF%A5%E5%9B%A0%E5%AD%90%E6%B7%BB%E5%8A%A0%E5%88%B0%E8%87%AA%E5%AE%9A%E4%B9%89%E8%AE%BE%E8%AE%A1%E4%B8%AD%E3%80%82%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E4%B8%80%E4%BA%9B%E2%80%9C%E4%BC%AA%E4%BB%A3%E7%A0%81%E2%80%9D%EF%BC%9A%3C%2FP%3E%3CPRE%3EAddSpecialFactor%20%3D%201%3B%20%2F*%20decision%20rule%20to%20add%20factor%2C%20will%20be%20retrieved%20from%20a%20modal%20window%20based%20on%20some%20more%20complex%20molecule%20chemistry%20input%20*%2F%0A%0AD%20%3D%20DOE(%0A%0Acustom%20design%2C%0A%0AAdd%20Factor(continuous%2C%20%22A%22%2C.....)%2C%0A%0AAdd%20Factor(%20...)%2C%0A%0A..%0A%0AIf%26nbsp%3B%20%26nbsp%3B(AddSpecialFactor%20%3D%201)%20then%20Add%20Factor(....)%2C%0A%0A%0A%0AAdd%20Term()%2C%0A%0A..%0A%0AIf%20(AddSpecialFactor%20%3D%201)%26nbsp%3B%20then%20Add%20Term()%20...%2C%3C%2FPRE%3E%3CP%3E%E9%9D%9E%E5%B8%B8%E6%AC%A2%E8%BF%8E%E6%89%80%E6%9C%89%E5%BB%BA%E8%AE%AE%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-481390%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3E%E8%84%9A%E6%9C%AC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-482306%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E7%94%A8%E4%BA%8E%E5%AE%9A%E5%88%B6%E8%AE%BE%E8%AE%A1%E7%9A%84%20JSL%20%E5%92%8C%20DOE%5B%5D%20%E5%B9%B3%E5%8F%B0%EF%BC%8C%E6%82%A8%E8%83%BD%E5%90%A6%E6%A0%B9%E6%8D%AE%E6%A8%A1%E6%80%81%E7%AA%97%E5%8F%A3%E4%B8%AD%E7%9A%84%E5%8F%98%E9%87%8F%E5%80%BC%E6%9C%89%E6%9D%A1%E4%BB%B6%E5%9C%B0%E2%80%9C%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA%E5%9B%A0%E5%AD%90%E2%80%9D%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-482306%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%BF%99%E5%AF%B9%E4%BA%8E%E8%AE%BE%E8%AE%A1%E4%B8%80%E4%BB%A3%E6%9D%A5%E8%AF%B4%E6%98%AF%E4%B8%80%E4%B8%AA%E5%BE%88%E9%85%B7%E7%9A%84%E6%83%B3%E6%B3%95%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%88%91%E6%AD%A3%E8%87%B4%E5%8A%9B%E4%BA%8E%E4%BB%8E%20CSV%20%E4%B8%AD%E8%8E%B7%E5%8F%96%E8%AE%BE%E8%AE%A1%E5%B9%B6%E7%94%9F%E6%88%90%20DOE%E3%80%82%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FByron-Wingerd-s-Blog%2FAutomating-Design-Generation%2Fba-p%2F407039%22%20target%3D%22_blank%22%3E%20https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FByron-Wingerd-s-Blog%2FAutomating-Design-Generation%2Fba-p%2F407039%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%E8%AE%A9%E6%82%A8%E7%9A%84%E8%84%9A%E6%9C%AC%E6%A6%82%E5%BF%B5%E7%94%9F%E6%88%90%E4%B8%80%E4%B8%AA%E6%95%B0%E6%8D%AE%E8%A1%A8%EF%BC%8C%E7%84%B6%E5%90%8E%E4%BD%BF%E7%94%A8%E4%B8%8A%E9%9D%A2%E5%8D%9A%E5%AE%A2%E4%B8%AD%E7%9A%84%E8%84%9A%E6%9C%AC%E6%9D%A5%E5%8A%A0%E8%BD%BD%E5%92%8C%E8%BF%90%E8%A1%8C%20DOE%20%E5%B9%B3%E5%8F%B0%E5%8F%AF%E8%83%BD%E4%BC%9A%E8%B5%B7%E4%BD%9C%E7%94%A8%E3%80%82%3C%2FP%3E%0A%3CP%3E%E4%B9%9F%E8%AE%B8%E5%BE%97%E5%88%B0%E4%B8%80%E4%B8%AA%E5%88%97%E5%90%8D%E5%88%97%E8%A1%A8%EF%BC%8C%E5%A6%82%E6%9E%9C%E8%AF%A5%E5%88%97%E8%A1%A8%E5%8C%85%E5%90%AB%E6%9F%90%E4%BA%9B%E5%8D%95%E8%AF%8D%EF%BC%8C%E9%82%A3%E4%B9%88%E6%B7%BB%E5%8A%A0%E5%85%B7%E6%9C%89%E9%80%82%E5%BD%93%E5%9B%A0%E5%AD%90%E7%BA%A7%E5%88%AB%E7%9A%84%E5%88%97%EF%BC%9F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-541402%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E7%94%A8%E4%BA%8E%E5%AE%9A%E5%88%B6%E8%AE%BE%E8%AE%A1%E7%9A%84%20JSL%20%E5%92%8C%20DOE%5B%5D%20%E5%B9%B3%E5%8F%B0%EF%BC%8C%E6%82%A8%E8%83%BD%E5%90%A6%E6%A0%B9%E6%8D%AE%E6%A8%A1%E6%80%81%E7%AA%97%E5%8F%A3%E4%B8%AD%E7%9A%84%E5%8F%98%E9%87%8F%E5%80%BC%E6%9C%89%E6%9D%A1%E4%BB%B6%E5%9C%B0%E2%80%9C%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA%E5%9B%A0%E5%AD%90%E2%80%9D%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-541402%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E6%8B%9C%E4%BC%A6%EF%BC%8C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E4%BB%8E%E8%A1%A8%E4%B8%AD%E5%8A%A0%E8%BD%BD%E6%98%AF%E4%B8%80%E4%B8%AA%E5%A5%BD%E4%B8%BB%E6%84%8F%E3%80%82%3C%2FP%3E%3CP%3E%E8%99%BD%E7%84%B6%E6%88%91%E5%BF%85%E9%A1%BB%E8%B0%83%E6%95%B4%E6%A8%A1%E5%9E%8B%EF%BC%8C%E5%9B%A0%E4%B8%BA%E5%AE%83%E4%BD%9C%E4%B8%BA%20RSM%20%E6%9B%B4%E5%A4%8D%E6%9D%82%EF%BC%9A%E5%AE%83%E5%85%B7%E6%9C%89%E5%88%86%E6%94%AF%E5%9B%A0%E7%B4%A0%EF%BC%8C%E5%A6%82%20Peter%20Goos%20%E5%92%8C%20Bradley%20Jones%20%E7%9A%84%E5%87%BA%E7%89%88%E7%89%A9%EF%BC%9A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGoos%20%E5%92%8C%20Jones%20(2019)%20%E5%AD%98%E5%9C%A8%E5%B5%8C%E5%A5%97%E5%9B%A0%E5%AD%90%E7%9A%84%E6%9C%80%E4%BC%98%E5%AE%9E%E9%AA%8C%E8%AE%BE%E8%AE%A1%E3%80%82%20%E6%8A%80%E6%9C%AF%E8%AE%A1%E9%87%8F%E5%AD%A6%E3%80%82%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdoi.org%2F10.1080%2F00401706.2018.1562986%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdoi.org%2F10.1080%2F00401706.2018.1562986%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%E6%82%A8%E6%98%AF%E5%90%A6%E8%BF%98%E6%9C%89%E4%BB%A3%E7%A0%81%E4%BB%A5%E6%96%87%E6%9C%AC%E6%A0%BC%E5%BC%8F%E6%9E%84%E5%BB%BA%E7%84%B6%E5%90%8E%E7%94%A8%E4%BA%8E%E8%AF%84%E4%BC%B0%EF%BC%88%EF%BC%89%E8%A1%A8%E8%BE%BE%E5%BC%8F%E7%9A%84%E7%A4%BA%E4%BE%8B%E3%80%82%3C%2FP%3E%3CP%3E%E5%96%9C%E6%AC%A2%EF%BC%9A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EDOECODE%20%3D%20%22Part%20of%20the%20code%20%22%20%7C%7C%20if(..%2C)%20%7C%7C%20etc...%0A.%0A.%0ADOEcommand%20%3D%20evaluate(DOECODE)%3B%0A%0ADOETable%20%3D%20(DOEcommand%20%26lt%3B%26lt%3B%20Make%20Table)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-541427%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E7%94%A8%E4%BA%8E%E5%AE%9A%E5%88%B6%E8%AE%BE%E8%AE%A1%E7%9A%84%20JSL%20%E5%92%8C%20DOE%5B%5D%20%E5%B9%B3%E5%8F%B0%EF%BC%8C%E6%82%A8%E8%83%BD%E5%90%A6%E6%A0%B9%E6%8D%AE%E6%A8%A1%E6%80%81%E7%AA%97%E5%8F%A3%E4%B8%AD%E7%9A%84%E5%8F%98%E9%87%8F%E5%80%BC%E6%9C%89%E6%9D%A1%E4%BB%B6%E5%9C%B0%E2%80%9C%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA%E5%9B%A0%E5%AD%90%E2%80%9D%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-541427%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E4%B8%8B%E9%9D%A2%E6%98%AF%E4%B8%80%E4%B8%AA%E7%A4%BA%E4%BE%8B%EF%BC%8C%E8%AF%B4%E6%98%8E%E5%A6%82%E4%BD%95%E7%BC%96%E5%86%99%E6%AD%A4%E8%BF%87%E7%A8%8B%E7%9A%84%E8%84%9A%E6%9C%AC%E3%80%82%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20to%20Here(%201%20)%3B%0A%0Adialog%20%3D%20New%20Window(%20%22Optional%20Factor%22%2C%20%26lt%3B%26lt%3B%20Modal%2C%0A%20Outline%20Box(%20%22Choice%22%2C%0A%20%20Text%20Box(%20%22Add%20X4%3F%22%20)%2C%0A%20%20Text%20Box(%20%22Click%20OK%20to%20add%22%20)%2C%0A%20%20Text%20Box(%20%22Click%20Cancel%20to%20skip%22%20)%0A%20)%2C%0A%20H%20List%20Box(%0A%20%20Button%20Box(%20%22OK%22%20)%2C%0A%20%20Button%20Box(%20%22Cancel%22%20)%0A%20)%0A)%3B%0A%0Adoe%20%3D%20DOE(%20Custom%20Design%2C%0A%20%7BAdd%20Response(%20Maximize%2C%20%22Y%22%2C%20.%2C%20.%2C%20.%20)%2C%0A%20Add%20Factor(%20Continuous%2C%20-1%2C%201%2C%20%22X1%22%2C%200%20)%2C%0A%20Add%20Factor(%20Continuous%2C%20-1%2C%201%2C%20%22X2%22%2C%200%20)%2C%0A%20Add%20Factor(%20Continuous%2C%20-1%2C%201%2C%20%22X3%22%2C%200%20)%2C%20Set%20Random%20Seed(%2030650037%20)%2C%0A%20Add%20Term(%20%7B1%2C%200%7D%20)%2C%20Add%20Term(%20%7B1%2C%201%7D%20)%2C%20Add%20Term(%20%7B2%2C%201%7D%20)%2C%20Add%20Term(%20%7B3%2C%201%7D%20)%2C%0A%20Add%20Term(%20%7B1%2C%201%7D%2C%20%7B2%2C%201%7D%20)%2C%20Add%20Term(%20%7B1%2C%201%7D%2C%20%7B3%2C%201%7D%20)%2C%0A%20Add%20Term(%20%7B2%2C%201%7D%2C%20%7B3%2C%201%7D%20)%2C%20Set%20Sample%20Size(%2012%20)%2C%20Simulate%20Responses(%200%20)%2C%0A%20Save%20X%20Matrix(%200%20)%7D%0A)%3B%0A%0A%2F%2F%20add%204th%20factor%20and%20the%20associated%20main%20effect%20and%20interaction%20terms%0AIf(%20dialog%5B%22Button%22%5D%20%3D%3D%201%2C%0A%20doe%0A%20%20%26lt%3B%26lt%3B%20Add%20Factor(%20Continuous%2C%20-1%2C%201%2C%20%22X4%22%2C%200%20)%0A%20%20%26lt%3B%26lt%3B%20Add%20Term(%20%7B4%2C%201%7D%20)%0A%20%20%26lt%3B%26lt%3B%20Add%20Term(%20%7B1%2C%201%7D%2C%20%7B4%2C%201%7D%20)%0A%20%20%26lt%3B%26lt%3B%20Add%20Term(%20%7B2%2C%201%7D%2C%20%7B4%2C%201%7D%20)%0A%20%20%26lt%3B%26lt%3B%20Add%20Term(%20%7B3%2C%201%7D%2C%20%7B4%2C%201%7D%20)%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-541536%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%E7%94%A8%E4%BA%8E%E5%AE%9A%E5%88%B6%E8%AE%BE%E8%AE%A1%E7%9A%84%20JSL%20%E5%92%8C%20DOE%5B%5D%20%E5%B9%B3%E5%8F%B0%EF%BC%8C%E6%82%A8%E8%83%BD%E5%90%A6%E6%A0%B9%E6%8D%AE%E6%A8%A1%E6%80%81%E7%AA%97%E5%8F%A3%E4%B8%AD%E7%9A%84%E5%8F%98%E9%87%8F%E5%80%BC%E6%9C%89%E6%9D%A1%E4%BB%B6%E5%9C%B0%E2%80%9C%E6%B7%BB%E5%8A%A0%E4%B8%80%E4%B8%AA%E5%9B%A0%E5%AD%90%E2%80%9D%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-541536%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3E%E8%B0%A2%E8%B0%A2%20%EF%BC%81%3C%2FP%3E%3CP%3E%E5%AE%83%E5%B7%A5%E4%BD%9C%E5%BE%97%E5%BE%88%E5%A5%BD%3A)%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
Not_A_Student
Level II

JSL and DOE[] platform for custom design, can you conditionally 'Add a factor' based on the value of a variable from a modal window ?

Hello,

 

I would like to create  a script, where based on some previous input variable, the DOE[] object is messaged to work with one additional factor.

The DOE design generation is now heavy to run (about a 30sec), so I am looking for a lean way (e.g. tweak it before sending the 'make design' message).

Ideally i would like to work with an if clause, checking if a said boolean variable is true and if so add the factor to the custom design.

 

Some 'pseudocode':

AddSpecialFactor = 1; /* decision rule to add factor, will be retrieved from a modal window based on some more complex molecule chemistry input */

D = DOE(

custom design,

Add Factor(continuous, "A",.....),

Add Factor( ...),

..

If   (AddSpecialFactor = 1) then Add Factor(....),



Add Term(),

..

If (AddSpecialFactor = 1)  then Add Term() ...,

All suggestions are more than welcome

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: JSL and DOE[] platform for custom design, can you conditionally 'Add a factor' based on the value of a variable from a modal window ?

Here is an example of how you might script this process.

 

Names Default to Here( 1 );

dialog = New Window( "Optional Factor", << Modal,
	Outline Box( "Choice",
		Text Box( "Add X4?" ),
		Text Box( "Click OK to add" ),
		Text Box( "Click Cancel to skip" )
	),
	H List Box(
		Button Box( "OK" ),
		Button Box( "Cancel" )
	)
);

doe = DOE( Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, -1, 1, "X1", 0 ),
	Add Factor( Continuous, -1, 1, "X2", 0 ),
	Add Factor( Continuous, -1, 1, "X3", 0 ), Set Random Seed( 30650037 ),
	Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ),
	Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
	Add Term( {2, 1}, {3, 1} ), Set Sample Size( 12 ), Simulate Responses( 0 ),
	Save X Matrix( 0 )}
);

// add 4th factor and the associated main effect and interaction terms
If( dialog["Button"] == 1,
	doe
		<< Add Factor( Continuous, -1, 1, "X4", 0 )
		<< Add Term( {4, 1} )
		<< Add Term( {1, 1}, {4, 1} )
		<< Add Term( {2, 1}, {4, 1} )
		<< Add Term( {3, 1}, {4, 1} )
);

View solution in original post

4 REPLIES 4
Byron_JMP
Staff

Re: JSL and DOE[] platform for custom design, can you conditionally 'Add a factor' based on the value of a variable from a modal window ?

That's kind of a cool idea for design generation.

I was working on just taking designs from a CSV and generating DOEs. Automating Design Generation 

 

It might work to have your script concept generate a data table and then use the script in the blog above to load and run the DOE platform. 

Maybe get a list of column names, and if that list contains certain words, then add columns with the appropriate factor levels?

 

 

JMP Systems Engineer, Health and Life Sciences (Pharma)
Not_A_Student
Level II

Re: JSL and DOE[] platform for custom design, can you conditionally 'Add a factor' based on the value of a variable from a modal window ?

Thank you Byron,

 

Loading from a table is a nice idea.

Though I have to adjust the model  as it is more complicated as a RSM: it has branching factors as in the publication by Peter Goos and Bradley Jones:

 

Goos and Jones (2019) Optimal Experimental Design in the presence of Nested Factors. Technometrics.

https://doi.org/10.1080/00401706.2018.1562986

 

Do you also have examples where the code is build in text format and then used to an evaluate() expression.

Like:

 

DOECODE = "Part of the code " || if(..,) || etc...
.
.
DOEcommand = evaluate(DOECODE);

DOETable = (DOEcommand << Make Table);

Re: JSL and DOE[] platform for custom design, can you conditionally 'Add a factor' based on the value of a variable from a modal window ?

Here is an example of how you might script this process.

 

Names Default to Here( 1 );

dialog = New Window( "Optional Factor", << Modal,
	Outline Box( "Choice",
		Text Box( "Add X4?" ),
		Text Box( "Click OK to add" ),
		Text Box( "Click Cancel to skip" )
	),
	H List Box(
		Button Box( "OK" ),
		Button Box( "Cancel" )
	)
);

doe = DOE( Custom Design,
	{Add Response( Maximize, "Y", ., ., . ),
	Add Factor( Continuous, -1, 1, "X1", 0 ),
	Add Factor( Continuous, -1, 1, "X2", 0 ),
	Add Factor( Continuous, -1, 1, "X3", 0 ), Set Random Seed( 30650037 ),
	Add Term( {1, 0} ), Add Term( {1, 1} ), Add Term( {2, 1} ), Add Term( {3, 1} ),
	Add Term( {1, 1}, {2, 1} ), Add Term( {1, 1}, {3, 1} ),
	Add Term( {2, 1}, {3, 1} ), Set Sample Size( 12 ), Simulate Responses( 0 ),
	Save X Matrix( 0 )}
);

// add 4th factor and the associated main effect and interaction terms
If( dialog["Button"] == 1,
	doe
		<< Add Factor( Continuous, -1, 1, "X4", 0 )
		<< Add Term( {4, 1} )
		<< Add Term( {1, 1}, {4, 1} )
		<< Add Term( {2, 1}, {4, 1} )
		<< Add Term( {3, 1}, {4, 1} )
);
Not_A_Student
Level II

Re: JSL and DOE[] platform for custom design, can you conditionally 'Add a factor' based on the value of a variable from a modal window ?

Thank you ! 

It works brilliantly  

Recommended Articles