Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Make combined table from fit model

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 14, 2017 4:46 AM
(4643 views)

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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Created:
Aug 14, 2017 7:06 AM
| Last Modified: Aug 14, 2017 7:07 AM
(5828 views)
| Posted in reply to message from WHTseng 08-14-2017

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.

Learn it once, use it forever!

5 REPLIES 5

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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;`

Learn it once, use it forever!

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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;
```

Learn it once, use it forever!

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Created:
Aug 14, 2017 7:06 AM
| Last Modified: Aug 14, 2017 7:07 AM
(5829 views)
| Posted in reply to message from WHTseng 08-14-2017

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.

Learn it once, use it forever!

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Make combined table from fit model

Thank you, markbailey !

Article Labels

There are no labels assigned to this post.