JSL to save smoother formula from Graph BuilderI have been trying to figure out how to save the smoother formula from Graph Builder using JSL with no success. I also tried to the function Spline Smooth() on a data table but that also did not work for me. What I am trying to do is automate a process that I do over and over using the column that is saved from the smoother in Graph Builder. It is quite lengthy process and I can script all parts of it except the smoother save and everything depends on the column of smoothed data. Does anyone have any ideas.
Examples of what I have tried are shown below:
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :x ), Y( :y ), Overlay( :type ) ),
Elements( Points( X, Y, Legend( 14 ) ), Smoother( X, Y, Legend( 15 ) ) ),
Save Smoother Formula( 1 )
);
and
var = Graph Builder(
Show Control Panel( 0 ),
Variables( X( :x ), Y( :y ), Overlay( :type ) ),
Elements( Points( X, Y, Legend( 14 ) ), Smoother( X, Y, Legend( 15 ) ) ),
);
var << Save Smoother Formula;Advanced Statistical ModelingRe: JSL to save smoother formula from Graph BuilderThanks Xan! That really works great! I was also able to change the lambda value with a little research in the Scripting Guide. I'm okay with the default but I have found that a different value generally works better for my data. Also I am using an overlay variable and that works great too! I really appreciate the help!
Re: JSL to save smoother formula from Graph BuilderThe command on the smoother element in its red triangle menu is Save Formula. You can send it via JSL using the Update Element command.
gb = Graph Builder(
Variables( X( :height ), Y( :weight ) ),
Elements( Points( X, Y, Legend( 2 ) ), Smoother( X, Y, Legend( 3 )) )
);
gbb = Report( gb )[Graph Builder Box( 1 )];
gbb << Update Element( 1, 1, 2, {Save Formula} );
Re: JSL to save smoother formula from Graph BuilderI think that will probably work. I was just looking at it when you posted this. Thanks!
Re: JSL to save smoother formula from Graph BuilderNo problem.
I did find that you can save the predicted values from a Kernel Smoother fit using the Bivariate (Fit Y by X) platform. See this thread. So that might be a solution for you?
Phil
Re: JSL to save smoother formula from Graph BuilderThanks Phil. I'll put in a wish list request.
Re: JSL to save smoother formula from Graph BuilderHi,
In general you should look in the JMP Scripting Index from the help menu to find the command that you need.
In this case though it seems like this is not a scriptable feature. I looked in the Index and could not find anything. I also saw some other questions about this in the JMP Community and they did not have solutions.
You might want to add this to the JMP Wish List.
Regards,
Phil