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
- :
- Forcing Unequal Variance T-test in Scripts

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 2, 2016 11:42 AM
(925 views)

The following script performs multiple t-tests on multiple Y columns using the Oneway platform.

As called in this script, the t-test assumes equal variance but I would like to force this script to perform this t-test assuming unequal variance.

Could you help figure out how to do that?

dt = Open ("File");

m = [];

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

ow = Oneway( Y( Column( i ) ), X( :Disease ), t Test( 1 ), invisible );

owr = Report (ow);

m = m || owr["t Test"][Number Col Box( 4 )][1];

);

New Table( "t-tests", New Column( "p", numeric, set values( m ) ) );

1 ACCEPTED SOLUTION

Accepted Solutions

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

Solution

It appear there is some confusion caused because the outline box for both the equal and unequal version of the ttest is called t-Test. However, if you change the direct reference from

m = m || owr["t Test"][Number Col Box( 4 )][1];

to

m = m || owr[Outline Box(1)][Number Col Box( 4 )][1];

you will get your correct output

Jim

2 REPLIES

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

It appear there is some confusion caused because the outline box for both the equal and unequal version of the ttest is called t-Test. However, if you change the direct reference from

m = m || owr["t Test"][Number Col Box( 4 )][1];

to

m = m || owr[Outline Box(1)][Number Col Box( 4 )][1];

you will get your correct output

Jim

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

Feb 2, 2016 12:53 PM
(869 views)

Hi Jim,

Thank you for your answer. It works perfectly.

Best regards,

Thierry