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
Grumpybaldprof
Level II

Getting point of significant divergence from Least squares compare slopes JMP® Pro 16.2.0

I would like to know at which x value 2 slopes significantly diverge when using least squares to fit data with 2 categorical groups, x being continuous as is the fitted variable. JMP online documentation is appallingly unhelpful.

 

JMP® Pro 16.2.0
3 REPLIES 3
dale_lehman
Level VII

Re: Getting pooiiunt of signigficant divergence from Least squares compare slopes JMP® Pro 16.2.0

I don't see why you are complaining about JMP help here.  This doesn't strike me as the type of question I'd expect to see in a help file - it really pertains to modeling choices and interpretation.  Perhaps I am wrong and someone will say there is a clear prepared way to do this. 

 

From my understanding of your question, you would need to model an interactive effect:  x*group.  But that just determines whether the slopes are significantly different between the two groups.  Your question seems to indicate that you believe the slopes become equal at some value of x, not smaller values of x.  That strikes me as a nonlinear interaction effect.  It may be possible to use the nonlinear platform with parameters, and get estimates of a parameter that indicates the value of x at which the slopes begin to differ.  How much data do you have?  If you can share some of it - or a similar data set, then I can outline this in more detail.

Georg
Level VII

Re: Getting pooiiunt of signigficant divergence from Least squares compare slopes JMP® Pro 16.2.0

You could do a Fit model and adding a local datafilter for your x. Then you can sweep through the x values observing the changes of slope in Fit Model report.

Another idea would be to add a custom binning on x and using this variable with interaction in Fit Model. Then you can see whether the slope changes with the custom bins of X. See script for examples.

 

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA\Big Class.jmp" );

dt << New Column( "Custom Binning[height]",
	Numeric,
	"Nominal",
	Format( "Best", 12 ),
	Formula( If( :height < 61.937, 60.937, :height >= 61.937, 61.937, . ) ),
	Value Labels( {"." = "Missing", 60.937 = "< 62", 61.937 = "≥ 62"} ),
	Use Value Labels( 1 ), 

);

dt << Add Properties to Table(
	{New Script(
		"Fit Model local datafilter",
		Fit Model(
			Y( :weight ),
			Effects( :sex, :height, :sex * :height ),
			Personality( "Standard Least Squares" ),
			Emphasis( "Effect Leverage" ),
			Run(
				:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
				Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
				Plot Residual by Predicted( 1 ), Plot Studentized Residuals( 0 ),
				Plot Effect Leverage( 1 ), Plot Residual by Normal Quantiles( 0 ),
				Box Cox Y Transformation( 0 )}
			),
			Local Data Filter(
				Conditional,
				Add Filter( columns( :height ), Where( :height >= 56.994 & :height <= 70 ) )
			),
			SendToReport(
				Dispatch(
					{"Response weight", "Whole Model"},
					"Actual by Predicted Plot",
					OutlineBox,
					{Close( 1 )}
				),
				Dispatch(
					{"Response weight", "Whole Model"},
					"Effect Summary",
					OutlineBox,
					{Close( 1 )}
				),
				Dispatch(
					{"Response weight", "Whole Model"},
					"Lack Of Fit",
					OutlineBox,
					{Close( 1 )}
				),
				Dispatch(
					{"Response weight", "Whole Model"},
					"Residual by Predicted Plot",
					OutlineBox,
					{Close( 1 )}
				),
				Dispatch(
					{"Response weight", "Whole Model"},
					"Summary of Fit",
					OutlineBox,
					{Close( 1 )}
				),
				Dispatch(
					{"Response weight", "Whole Model"},
					"Analysis of Variance",
					OutlineBox,
					{Close( 1 )}
				),
				Dispatch(
					{"Response weight", "sex"},
					"Least Squares Means Table",
					OutlineBox,
					{Close( 1 )}
				)
			)
		)
	), New Script(
		"Fit Least Squares",
		Fit Model(
			Y( :weight ),
			Effects(
				:sex, :height, :"Custom Binning[height]"n, :sex * :height,
				:sex * :"Custom Binning[height]"n, :height * :"Custom Binning[height]"n
			),
			Personality( "Standard Least Squares" ),
			Emphasis( "Effect Leverage" ),
			Run(
				:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
				Parameter Estimates( 1 ), Scaled Estimates( 0 ), Plot Actual by Predicted( 1 ),
				Plot Regression( 0 ), Plot Residual by Predicted( 1 ),
				Plot Studentized Residuals( 0 ), Plot Effect Leverage( 1 ),
				Plot Residual by Normal Quantiles( 0 ), Box Cox Y Transformation( 0 )}
			)
		)
	)}
);
dt << run script( "Fit Model local datafilter" );
Georg
Grumpybaldprof
Level II

Re: Getting pooiiunt of signigficant divergence from Least squares compare slopes JMP® Pro 16.2.0

Thank you Georg,

 

Apologies for the long delay, I have long covid and could not face this stats question.

 

Hmm, this is way over my head. Its many years since I had to write my own stats routines. I am not sure I understand what this one does or indeed where it picks up the data in the first place.

 

Please advise.