Make combined table from fit modelHi All,
I am trying to output the Rsquare value from a fit model, the code is as below,
(I take Algae Mitscherlich.jmp for practice, but I believe the Rsquare doean't really mean anything. Sorry for that)
Eventually the code doesn't ouput a combined table, no matter what number I input into [outline box(4)][2].
Can someone indicate me what is wrong here?
Thank you very much for any reply.
dt_comb=<FONT color="#0000FF">Open</FONT>( "<FONT color="#800080">$SAMPLE_DATA/Nonlinear Examples/Algae Mitscherlich.jmp</FONT>" );
dt_comb<<<FONT color="#333399"><STRONG>Fit Model</STRONG></FONT>(
Y( :Algae density ),
Effects( :Mitscherlich, :equal alphas, :equal betas ),
Personality( "<FONT color="#800080">Standard Least Squares</FONT>" ),
Emphasis( "<FONT color="#800080">Effect Screening</FONT>" ),
Run()
);
dt_model = dt_comb << <FONT color="#333399"><STRONG>report</STRONG></FONT>;
dt_modelR = dt_model[<FONT color="#0000FF">outline box</FONT>(4)][2] << <STRONG><FONT color="#333399">make combined data table</FONT></STRONG>;
Re: Make combined table from fit modelThank you, markbailey !
Re: Make combined table from fit modelI see it now. You are using the wrong variable. Your script stores the reference to the analysis layer of the Fit Least Squares platform in the variable dt_model. You then send a message to this object to obtain the reference to the report layer but you did not store the result in another variable. You certainly did not store it in dt_model. So subscripting failed to yield a scriptable object that understood the message.
Re: Make combined table from fit modelI am sorry for your trouble. Perhaps there was more to your script than I realized and my example of the correct message send was not enough. Here is an example of a complete script that works. It should give you a better idea.
bc = Open( "$SAMPLE_DATA/Big Class.jmp" );
fm = bc << Fit Model(
Y( :weight ),
Effects( :age, :sex, :height ),
Personality( "Standard Least Squares" ),
Emphasis( "Effect Leverage" ),
Run(
:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Plot Actual by Predicted( 1 ),
Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
Plot Effect Leverage( 0 )}
)
);
fmr = fm << Report;
fmr["Summary of Fit"][TableBox(1)] << Make Combined Data Table;Re: Make combined table from fit modelHi markbailey
Thanks for the reply, but the data table still doesn't come out.
I use Debug tool, the message below showing up,
Send Expects Scriptable Object in access or evaluation of 'Send' , dt_model["Summary of Fit"][Table Box( 1 )] << /*###*/Make Combined Data Table/*###*/
Do you have idea what I should modify the code?
Re: Make combined table from fit modelI recommend that you change your subscripting approach to this form:
dt_model["Summary of Fit"][TableBox(1)] << Make Combined Data Table;