cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

 

4 REPLIES 4
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
Binyamin
Level II

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

I have a bit more data that I used and I get a very different spline fit using the graph builder and bivariate spline fit.
The graphs have the same scales, and there seems to be a horizontal shift in the splines.

The graph builder is on top while the bottom is from the bivariate fit.

 

Binyamin_0-1748518978126.png

Binyamin_3-1748519202924.png

 

Binyamin_1-1748518993920.png

Binyamin_2-1748519164488.png

 

TIA for any input

 

Recommended Articles