## Oneway: TTest using the "By" variable in script

Community Trekker

Joined:

Feb 2, 2016

The following code does not work: Oneway, t-test does not recognize the "Column ( i )" as a valid argument in the "Where" clause.

Names Default to Here(1);

dt = Current Data Table();

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

ow = Oneway(

X( :TRT01P ),

t Test( 1 ),

invisible,

Where( Column ( i ) == 3 )

);

report(ow)[1]<<journal;

);

1 ACCEPTED SOLUTION

Accepted Solutions

Super User

Joined:

Jun 23, 2011

Solution

Try

Where(As Column(Column(i)) == 3)

Or simply

Where(:(Column(i)) == 3)

2 REPLIES

Community Trekker

Joined:

Feb 2, 2016

Correction,

The script got messed up when I pasted it.

Names Default to Here(1);

dt = Current Data Table();

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

ow = Oneway(

X ( :TRT01P ),

t Test( 1 ),

invisible,

Where( Column ( i ) == 3 )

);

report(ow)[1]<

);

Super User

Joined:

Jun 23, 2011

Solution

Try

Where(As Column(Column(i)) == 3)

Or simply

Where(:(Column(i)) == 3)