Insert Column Variable into Bivariate in place of X and Y ColumnsI have a script that allows me to select columns to run an analysis on. My trouble is inserting the selecting columns into the appropriate location. The script won't run when I insert the variable. What do I need to do to make this work?
I made the text red with the area that I am struggling.
colDlg = Column Dialog(
Title( "Column Selection" ),
yCol = Col List( "Y, Response", Min Col( 1 ) ),
xCol = Col List( "X, Factor", Min Col( 1 ) )
);
For( c = 1, c < 3, c++,
For( b = 1, b < 7, b++,
transb = Match( b, 1, "Log", 2, "Sqrt", 3, "Square", 4, "Reciprocal", 5, "Exp", 6, "None", );
For( a = 1, a < 7, a++,
transa = Match( a, 1, "Log", 2, "Sqrt", 3, "Square", 4, "Reciprocal", 5, "Exp", 6, "None", );
Bivariate(
Y( yCol ),
X( xCol ),
Fit Special(
xTran( transb ),
yTran( transa ),
Degree( c ),
Centered Polynomial( 0 ),
{Line Color( {213, 72, 87} )}
)
);
);
)
);
Re: Insert Column Variable into Bivariate in place of X and Y ColumnsColumn Dialog() is being phased out. It is old syntax. You should be using:
New Window("Test", Modal, ................);Re: Insert Column Variable into Bivariate in place of X and Y ColumnsJim,
I made the changes you showed and it is working.
However, I am unclear as to your second sent comments. What do you mean by "Retired" and "Modal option"?
I am new to scripting and any help is greatly appreciated.
Thank you,
David
Re: Insert Column Variable into Bivariate in place of X and Y ColumnsThe Column Dialog function returns a list, therefore you need to extract the falues from the list, rather than accessing them directly. See below:
Secondly, the Column Dialog box has been lowered to a "Retired" state. You should be using New Window(), with a "Modal" option
colDlg = Column Dialog(
Title( "Column Selection" ),
ycol = Col List( "Y, Response", Min Col( 1 ) ),
xcol = Col List( "X, Factor", Min Col( 1 ) )
);
For( c = 1, c < 3, c++,
For( b = 1, b < 7, b++,
transb = Match( b, 1, "Log", 2, "Sqrt", 3, "Square", 4, "Reciprocal", 5, "Exp", 6, "None", );
For( a = 1, a < 7, a++,
transa = Match( a, 1, "Log", 2, "Sqrt", 3, "Square", 4, "Reciprocal", 5, "Exp", 6, "None", );
Bivariate(
Y( colDlg["yCol "]),
X( colDlg["xCol"] ),
Fit Special(
xTran( transb ),
yTran( transa ),
Degree( c ),
Centered Polynomial( 0 ),
{Line Color( {213, 72, 87} )}
)
);
);
)
);