Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Insert Column Variable into Bivariate in place of X and Y Columns

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jun 12, 2017 10:13 AM
(1986 views)

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jun 12, 2017 12:10 PM
(3240 views)
| Posted in reply to message from dkraeuter_sunne 06/12/2017 03:01 PM

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

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

Jim

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

Jun 12, 2017 10:50 AM
(1977 views)
| Posted in reply to message from dkraeuter_sunne 06/12/2017 01:13 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jun 12, 2017 12:10 PM
(3241 views)
| Posted in reply to message from dkraeuter_sunne 06/12/2017 03:01 PM

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

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

Jim