PLS: Save Scores, Distances, and T Squared FormulasIn 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?
Re: PLS: Save Scores, Distances, and T Squared FormulasMy 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.
Re: PLS: Save Scores, Distances, and T Squared FormulasPS: I guess there can be two solutions, who knew...
Re: PLS: Save Scores, Distances, and T Squared FormulasThank 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.
Re: PLS: Save Scores, Distances, and T Squared FormulasI 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.
Re: PLS: Save Scores, Distances, and T Squared FormulasSelect 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.