cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
WHTseng
Level III

Make combined table from fit model

Hi 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=Open( "$SAMPLE_DATA/Nonlinear Examples/Algae Mitscherlich.jmp" );

dt_comb<<Fit Model(
	Y( :Algae density ),
	Effects( :Mitscherlich, :equal alphas, :equal betas ),
	Personality( "Standard Least Squares" ),
	Emphasis( "Effect Screening" ),
	Run()
);

dt_model = dt_comb << report;
dt_modelR = dt_model[outline box(4)][2] << make combined data table; 


 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Make combined table from fit model

I 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.

View solution in original post

5 REPLIES 5

Re: Make combined table from fit model

I recommend that you change your subscripting approach to this form:

dt_model["Summary of Fit"][TableBox(1)] << Make Combined Data Table;
WHTseng
Level III

Re: Make combined table from fit model

Hi 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 model

I 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 model

I 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.

WHTseng
Level III

Re: Make combined table from fit model

Thank you, markbailey !