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
- :
- Discussions
- :
- Fit Model DisplayBox Value Extraction

Topic Options

- 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

Feb 9, 2016 9:36 AM
(1068 views)

Hi, here is my daily inquiry about some basic process in JMP script:

I'm trying to capture the p values produced by the Fit Model > Effect Test into a new table.

Here is what I have so far:

Names Default to Here(1);

dt = Current Data Table();

m = {};

m1 = [];

m2 = [];

j = 9;

For(i=175, i<= N Col (dt),i++,

fm = Fit Model(

Y( Column ( i ) ),

Effects( :TRT01P, Column (j) ),

Personality( Standard Least Squares ),

Emphasis( Effect Leverage ),

invisible,

Run(

Column ( i ) << {Lack of Fit( 0 ),

Plot Actual by Predicted( 1 ), Plot Residual by Predicted( 1 ),

Plot Effect Leverage( 1 )}

)

);

fmr = fm << report;

insert into (m, Column Name (i));

m1 = m1 || fmr[OutlineBox (8)][Number Col Box (21)] [1]; // Error message " Cannot subscript DisplayBox"

m2 = m2 || fmr[OutlineBox (8)][Number Col Box (21)] [2];

j=j+2;

);

New Table ("ANCOVA",

New column ("Header", character, set values (m)),

New column ("Treatment", numeric, set values (m1)),

New column ("Linear Covariate", numeric, set values (m2))

);

1 REPLY

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

Feb 9, 2016 12:40 PM
(984 views)

This reference is a bit tricky. When you look at the probability in the Tree Structure, you can see that is is actually in a subsub structure of the Table Box.

Therefore, you need to reference the complete path, and then you need to use a "<< get" message to retrieve the list, and finally, to select off the first element of the list. Here is the reference that retrieves the p value

m1 = m1 || (fmr[Outline Box( 8 )][1][5][2]<<get)[1];

The easiest way to get to the second value you are looking for, is to go directly to the unique name of the outline box, "Effect Tests", and then just drill down from there

(fmr["Effect Tests"][1][6]<<get)[1]

Jim