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
- :
- Script for "Spline Predicted Values"

- 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
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jul 31, 2014 7:54 AM
(8506 views)

Greetings all,

Hoping that someone with more JMP script-writing experience can offer some suggestions here.

What I'd like to do is to fit Y by X by Group and Fit a Spline (0,1; Standardized), then save the predicted values in a new column of my current data table. I've been able to do the first part (fit the model and the spline), and I've seen that I could save the spline predicted values by a simple right-click on the red triangle but I don't want to do this manually. I'd like to do this automatically through a script.

When I select the "Save the predicted values" options in JMP Preferences (Platforms-Bivariate Curve), it works but it takes an extremely long time to proceed.

Finally, my Yvar are date and I'd like to assign the format "d/m/y" to the new created column.

Thank you so much for the help!

Pierre

1 ACCEPTED SOLUTION

Accepted Solutions

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

Try something like this:

dt = open

("$SAMPLE_DATA\Big Class.jmp");biv=dt <<

Bivariate(Y

(:height),X

(:weight),Fit Spline

(0.1, Standardized,{Line Color({208,64,86})},{Save Predicteds}),By

(:age)

);

To format the column you can send the Format message to the new column, which will be the last column in the table.

`column`**(**dt, ncol**(**dt**))**<< **format****(**"d/m/y"**)**;

-Jeff

-Jeff

5 REPLIES 5

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

Try something like this:

dt = open

("$SAMPLE_DATA\Big Class.jmp");biv=dt <<

Bivariate(Y

(:height),X

(:weight),Fit Spline

(0.1, Standardized,{Line Color({208,64,86})},{Save Predicteds}),By

(:age)

);

To format the column you can send the Format message to the new column, which will be the last column in the table.

`column`**(**dt, ncol**(**dt**))**<< **format****(**"d/m/y"**)**;

-Jeff

-Jeff

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

Re: Script for "Spline Predicted Values"

Thank you so much for the answer.

In fact, I found the {Save predicteds} option the day after my post, I tried it but it took a time as long as the "save the predicted values" option in JMP preferences while it's very quick with the manual way. The reason of the long process is certainly the high number of Data I have (around 550 groups and 18 000 rows...) because it works very well in the "Big class" exemple where there are a smaller number of rows than in my table.

I don't know why the scripting way is more than 10 times longer than the manual way...

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

Re: Script for "Spline Predicted Values"

Hmmm...that's odd, but you're right. I built a table like you describe and I can see the same performance issue that you do.

I'll pass it along to our development staff and see if they have a suggestion and whether we can make it better in a future release.

I'm sorry for the difficulty.

-Jeff

-Jeff

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

Re: Script for "Spline Predicted Values"

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

Re: Script for "Spline Predicted Values"

Just wanted to add tested in JMP13 as well. Issue appears to be the same.