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
- :
- PLS: Save Scores, Distances, and T Squared Formulas

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

Highlighted

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

May 25, 2017 5:55 AM
(5448 views)

In the Partial Least Squares platform (at least in JMP Pro 13) it is possible to save the score formula, and to save distances and T squared values.

- Does anyone know the JSL message to save the score formulas?
- Is it possible to save the distance and T squared formulas as opposed to just the values?

2 ACCEPTED SOLUTIONS

Accepted Solutions

Highlighted

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

Created:
May 25, 2017 6:36 AM
| Last Modified: May 25, 2017 6:38 AM
(7087 views)
| Posted in reply to message from ih 05-25-2017

Select **Help** > **Scripting Index**. Click the button in the upper left corner and select **Objects**. Now scroll in the first list and select **PLS**. You will see the entire message protocol for this platform populate the second list. You will find the messages you need under *Save Columns*.

Learn it once, use it forever!

Highlighted

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

I don't think you were asking for a 'JSL solution' but the code below will reveal all the messages a PLS fit understands. This will generally be a superset of those that appear in the UI.

```
NamesDefaultToHere(1);
// Sample data
dt1 = Open("$SAMPLE_DATA/Baltic.jmp");
// Use PLS
yList = {:ls, :ha, :dt};
xList = {:v1, :v2, :v3, :v4, :v5, :v6, :v7, :v8, :v9, :v10};
pls = dt1 << Partial Least Squares(
Y( Eval(yList) ),
X( Eval(xList) ),
Fit( Method( NIPALS ), Initial Number of Factors( 10 ) )
);
// See what messages we can send to the fit (look in the log)
lrt = Report(pls)["NIPALS ?"] << getScriptableObject;
ShowProperties (lrt);
// Use one of the messages
lrt << saveXScoreFormula;
```

If what you are looking for is not in the list, you could compute it post-hoc if you know the math.

5 REPLIES 5

Highlighted

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

Created:
May 25, 2017 6:36 AM
| Last Modified: May 25, 2017 6:38 AM
(7088 views)
| Posted in reply to message from ih 05-25-2017

Select **Help** > **Scripting Index**. Click the button in the upper left corner and select **Objects**. Now scroll in the first list and select **PLS**. You will see the entire message protocol for this platform populate the second list. You will find the messages you need under *Save Columns*.

Learn it once, use it forever!

Highlighted
##

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

Re: PLS: Save Scores, Distances, and T Squared Formulas

My apologies. In my haste, I found the older, deprecated PLS platform instead of the newer Partial Least Squares platform. My suggestion is still, sound, though. You can use the Scripting Index for the newer platform as well. It is actually the Partial Least Squares Fit object that you want to explore.

This message protocol mirrors what is available if you click the red triangle next to your fit (not the platform menu at the very top.) So you can obtain the results you want interactively or with a script.

Learn it once, use it forever!

Highlighted

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

I don't think you were asking for a 'JSL solution' but the code below will reveal all the messages a PLS fit understands. This will generally be a superset of those that appear in the UI.

```
NamesDefaultToHere(1);
// Sample data
dt1 = Open("$SAMPLE_DATA/Baltic.jmp");
// Use PLS
yList = {:ls, :ha, :dt};
xList = {:v1, :v2, :v3, :v4, :v5, :v6, :v7, :v8, :v9, :v10};
pls = dt1 << Partial Least Squares(
Y( Eval(yList) ),
X( Eval(xList) ),
Fit( Method( NIPALS ), Initial Number of Factors( 10 ) )
);
// See what messages we can send to the fit (look in the log)
lrt = Report(pls)["NIPALS ?"] << getScriptableObject;
ShowProperties (lrt);
// Use one of the messages
lrt << saveXScoreFormula;
```

If what you are looking for is not in the list, you could compute it post-hoc if you know the math.

Highlighted
##

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

Re: PLS: Save Scores, Distances, and T Squared Formulas

Thank you Mark and Ian! If I could accept two answers I would.

I am not sure how I failed to find the page in the scripting index link when searching for it; I guess I need to start drilling down through the platform as you describe.

Highlighted
##

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

Re: PLS: Save Scores, Distances, and T Squared Formulas

PS: I guess there can be two solutions, who knew...

Article Labels

There are no labels assigned to this post.