Subscribe Bookmark RSS Feed

Insert Column Variable into Bivariate in place of X and Y Columns

dkraeuter_sunne

Community Trekker

Joined:

Jun 2, 2016

I 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} )}
                )
            );
        );
    )
);

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

Column Dialog() is being phased out.  It is old syntax.  You should be using:

New Window("Test", Modal, ................);
Jim
3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

The 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} )}
                )
            );
        );
    )
);
Jim
dkraeuter_sunne

Community Trekker

Joined:

Jun 2, 2016

Jim,

 

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

txnelson

Super User

Joined:

Jun 22, 2012

Solution

Column Dialog() is being phased out.  It is old syntax.  You should be using:

New Window("Test", Modal, ................);
Jim