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

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

Aug 14, 2017 4:46 AM
(452 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

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

Aug 14, 2017 7:06 AM
(861 views)

Solution

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

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

Aug 14, 2017 5:51 AM
(449 views)

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!

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

Aug 14, 2017 6:48 AM
(440 views)

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?

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

Aug 14, 2017 7:01 AM
(437 views)

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!

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

Aug 14, 2017 7:06 AM
(862 views)

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!

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

Aug 14, 2017 7:11 AM
(427 views)