JMP Pro 11 Fit Model with list in JSL<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hi all,
I was trying to loop through a series of x variables ("Effects") for Fit Model, and came across this confusing behavior. When I create a list and use it with the Oneway platform, it behaves as expected. However, when I try the same thing with Fit Model, it seems to ignore my list and select variables based upon dt column order. I think this example code will make the issue more clear.
How do I specify an item from a list for an Effect within Fit Model?
data = Open ("$SAMPLE_DATA/Big Class.jmp");
x_list = {
:sex,
:height
};
data << Oneway(
Y( :height ),
X( x_list [1] )
);
data << Fit Model(
Y( :height ),
Effects( x_list [1] ),
Personality( Standard Least Squares ),
Emphasis( Effect Leverage ),
Run(
:height << {Lack of Fit( 0 )}
)
);
Re: JMP Pro 11 Fit Model with list in JSLThank you mpb! The eval() command worked (as below).
data << Fit Model(
Y( :height ),
Effects( eval ( x_list [1] )),
Personality( Standard Least Squares ),
Emphasis( Effect Leverage ),
Run(
:height << {Lack of Fit( 0 )}
)
);
Re: JMP Pro 11 Fit Model with list in JSLSee if either of these does what you want:
eval(x_list [1])
or
eval(x_list)