Hello! I'm attempting to script an analysis where the user inputs a data table, and the script runs a fit Y by X with a user selected column through a column dialog box as Y and all other columns (which can be any mix of continuous and nominal variables) as the X selections. Is there a way to use fit Y by X and Fit Group together to get this all-in-one window and easily allow for the results to be ordered by goodness of fit?
This is a script I wrote that outputs them all in one box, but I want the user to easily find the significant fits by ANOVA. Ideally, I would like to output significant fits to a tabular report window, but that is above my knowledge right now. Any help would be appreciated!
Names Default To Here( 1 );
dt = Current Data Table();
dlg = Column Dialog(
iv = ColList( "Depedent Variable",
Min Col( 1 ),
Max Col( 1 ),
Data Type( "Numeric" )
)
);
If( dlg["Button"] != 1,
Beep();
Throw();
);
iv = dlg["iv"];
n_cols = N Cols( dt );
New Window( "Report",
H List Box(
For( c = 1, c <= n_cols, c++,
Fit Y by X(
Y( Column( iv[1] ) ),
X( Column( c ) ),
Fit Line( 1 ),
Anova( 1 )
)
)
)
);