Re: How to make expressions work in statements?In your profiler statement, you are telling JMP to evaluate the variable fs and place whatever is returned into the enclosing profiler launch expression. In this case, you need the evaluation of fs to return the expression. To see what fs returns when you evaluate it, you can highlight the variable and click the run button. When you do this, JMP will error because it is trying to evaluate the expression. That expression is not a valid JSL statement by itself.
In short, you do not want to evaluate the expression held by fs, you want to get the expression itself. To do this, use the NameExpr() function. Try this:
fs = Expr( Factors( L1 << random( normal( 0, 0.5 ) ), L12 << random( normal( 0, 0.5 ) ) ) );
Eval(
Eval Expr(
dt << Profiler(
Y( :Y ),
Profiler(
1,
Simulator(
1,
Expr( Name Expr( fs ) ),
Responses( Y << No Noise ),
N Runs( 1000000 ),
Resimulate
)
)
)
)
);Re: How to make expressions work in statements?Thanks for the quick answer, many thanks!
Re: How to make expressions work in statements?I don't know why, but none of the code after Expr( Name Expr( fs ) ) works. Can you help me look at it? For example, N Runs( 1000000 )
Re: How to make expressions work in statements?If you are still having the problem, I'll be happy to look at it. Can you post the data table you are using?
How to make expressions work in statements?I used the loop to generate an expression factors() with the contents of the parentheses. But it doesn't work in DOE's data simulation statement.
fs = Expr(Factors(L1 << random(normal(0, 0.5)), L12 << random(normal(0, 0.5))) );
eval(evalexpr(dt << Profiler(
Y( :Y ),
Profiler(
1,
Simulator(
1,
Expr(fs),
Responses( Y << No Noise ),
N Runs( 1000000 ),
Resimulate
)
)
)));Advanced Statistical ModelingmacOS