Below is a version of the script that will correctly handle the tostv list. However, there is a logic problem with your "i" variable. In your script, you are looping through your For loop 4 times, incrementing i by one each time, however you only have 2 levels of your tostv list.
Here is the code
Names Default To Here( 1 );
tostv = {"Pooled Variance", "Unequal Variances"};
ksd = {12, 275};
dt = Current Data Table();
cnames = dt << Get Column Names( string );
n = N Items( cnames );
i = 0;
anova = Fit Group(
For( colnum = 4, colnum <= n, colnum++,
i = i + 1;
Eval(
Eval Expr(
Oneway(
Y( Column( colnum ) ),
X( :AgeClass ),
All Pairs( 1 ),
Means( 1 ),
t Test( 1 ),
Unequal Variances( 1 ),
Std Dev Lines( 0 ),
Mean Diamonds( 1 ),
Connect Means( 1 ),
Equivalence Tests(
ksd[i],
0.05,
Expr( tostv[i] ), //***need to fix to eval tostv
"Equivalence",
With Control( "Young" )
),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Minor Ticks( 0 )} ),
Dispatch( {}, "Oneway Plot", FrameBox, ),
Dispatch( {}, "Oneway Means Compare", FrameBox, ),
Dispatch( {"Oneway Anova"}, "Summary of Fit", OutlineBox, {Close( 1 )} ),
Dispatch( {"Oneway Anova"}, "Analysis of Variance", OutlineBox, {Close( 1 )} ),
Dispatch( {"Oneway Anova"}, "Means for Oneway Anova", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "t Test", OutlineBox, {Close( 1 )} ),
Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
)
)
)
);
)
);
Jim