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

- 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

Feb 2, 2016 11:42 AM
(6217 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

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- 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

2 REPLIES 2

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- 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

Highlighted
##

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

Re: Forcing Unequal Variance T-test in Scripts

Hi Jim,

Thank you for your answer. It works perfectly.

Best regards,

Thierry