cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
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

 

1 REPLY 1
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" ) )
			)
		)
	)
);