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
- :
- Means/Anova table - is there a JSL variable/comman...

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
- Permalink
- Email to a Friend
- Report Inappropriate Content

Mar 31, 2011 12:39 PM
(962 views)

3 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Apr 4, 2011 4:35 AM
(873 views)

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Apr 9, 2011 7:54 AM
(873 views)

I've had a go at this myself, and come up with the following script which writes the P value from the ANOVA table in the bottom right-hand corner of the chart. It would be neater however if I could extract the low and high values of both axes from the tree structure - and I don't know how to do that. Can anyone tell me how it's done?

```
dt = Open( "$SAMPLE_DATA/Membrane.jmp" );
anova = Oneway( Y( :Count1 ), X( :Brand ), Means( 1 ), Box Plots( 0 ), Mean Diamonds( 1 ) );
anova << show tree structure;
// Find out where the P value actually is;
anovareport = anova << report;
anovatable = anovareport[Number Col Box( 6 )] << make into data table;
// Extract the ANOVA table;
Pval = Column( anovatable, "Prob > F" )[1];
// Extract the P value from the ANOVA table;
Show( Pval );
/*
Work out where to put it on the chart. If we want it on the right at the bottom,
we'll need the lowest Y value plotted and the number of X values, because the X
axis actually seems to run from 1 to Xmax, even though the points are grouped
into categories.
*/
Ymin = Min( Column( dt, "Count1" ) << get values );
Xmax = N Row( dt );
Show( Ymin );
Show( Xmax );
anovareport[FrameBox( 1 )] << Add Graphics Script(
Text( Right Justified, {20, Ymin}, " P Value = " || Char( Pval, 10, 4 ) )
);
// Tidy up the screen so we can see the analysis;
anovatable << minimize window;
dt << minimize window;
Window( "Show Tree Structure" ) << minimize window;
// End of program;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Jun 13, 2018 5:45 AM
(179 views)

I'm not sure why there's html style lines in the jsl above, but here's a cleaned up version for anyone who finds it useful:

```
dt = Open( "$SAMPLE_DATA/Membrane.jmp" );
anova = Oneway( Y( :Count1 ), X( :Brand ), Means( 1 ), Box Plots( 0 ), Mean Diamonds( 1 ) );
anova << show tree structure;
// Find out where the P value actually is;
anovareport = anova << report;
anovatable = anovareport[Number Col Box( 6 )] << make into data table;
// Extract the ANOVA table;
Pval = Column( anovatable, "Prob > F" )[1];
// Extract the P value from the ANOVA table;
Show( Pval );
/*
Work out where to put it on the chart. If we want it on the right at the bottom,
we'll need the lowest Y value plotted and the number of X values, because the X
axis actually seems to run from 1 to Xmax, even though the points are grouped
into categories.
*/
Ymin = Min( Column( dt, "Count1" ) << get values );
Xmax = N Row( dt );
Show( Ymin );
Show( Xmax );
anovareport[FrameBox( 1 )] << Add Graphics Script(
Text( Right Justified, {20, Ymin}, " P Value = " || Char( Pval, 10, 4 ) )
);
// Tidy up the screen so we can see the analysis;
anovatable << minimize window;
dt << minimize window;
Window( "Show Tree Structure" ) << minimize window;
// End of program;
```