cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Jing
Level I

Why the lambda value of Spline fitting used in "Fit Y by X analysis" is different from the "Graph Builder"?

Hello, JMP developers,

 

I'm using JMP15.2.1 version.

 

As below smooth fitting results(same datasets) in JMP when using the One Way Analysis (Fit Y by X)  platform vs. Graph Builder, by setting the same lambda=100, the smoothness of the curve is totally different. (Fits are the same even if the lambda values differ by approximately 20x)

 

Is there a reason for such difference? 

 

Jing_0-1631842068117.png

 

3 REPLIES 3
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Why the lambda value of Spline fitting used in "Fit Y by X analysis" is different from the "Graph Builder"?

Hi @Jing,

 

The graph builder uses standardized X variables.  To get the same line in Bivariate, choose 'Other...' under the Red Triangle > Flexible > Fit Spline, use a lamda of 0.05 (default in graph builder) and check 'Standardize X'.

 

ih_0-1631906006128.png

 

View more...
Names default to here(1);

dt = Open("$Sample_data/Car Physical Data.jmp");

New Window("Compare",
	H List Box(
		Bivariate(
			Y( :Weight ),
			X( :Displacement ),
			Fit Spline( 0.05, Standardized, {Line Color( {61, 174, 70} )} ),
			Where( :Country == "Japan" )
		),
		Graph Builder(
			Size( 400, 320 ),
			Show Control Panel( 0 ),
			Variables( X( :Displacement ), Y( :Weight ), Overlay( :Country ) ),
			Elements(
				Points( X, Y, Legend( 14 ) ),
				Smoother( X, Y, Legend( 15 ), Lambda( 0.05 ) )
			),
			Local Data Filter(
				Close Outline( 1 ),
				Add Filter( columns( :Country ), Where( :Country == "Japan" ) )
			)
		)
	)
);

 

Re: Why the lambda value of Spline fitting used in "Fit Y by X analysis" is different from the "Graph Builder"?

What does Standardize X mean? How is it useful?

ErraticAttack
Level VI

Re: Why the lambda value of Spline fitting used in "Fit Y by X analysis" is different from the "Graph Builder"?

Standardized X means that you normalize your X distribution:

 

x = [[[ ARRAY OF X VALUES ]]]

x = (x - Mean( x )) / Std Dev( x );

After this, you'll create your cubic smoothing spline polynomials, then when creating your splines (which will be placed into this new scaled-x space), you simply unscale your spline's x-values.

Jordan