cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
syretted
Level II

How Do I Determine the Slope at Different Levels of an Interaction Term?

Hi there,

I am running a mixed model linear regression through the standard fit model dialog.  My input variables are two categorical variables: speed (two levels: fast and slow) and trial (5 levels), as well as one continous variable: perceived demand.  My outcome variable is a continuous variable: outcome score.  I found that there is a significant interaction between speed and perceived demand.  Looking at the interaction plots, there is a definite difference in slope between the perceived demand vs. outcome score relationship depending on the level of the speed variable.  Is there a way that I can figure out the slope of the line at each speed level (ie, the slope of the relationship at the fast speed and the slope of the relationship at the slow speed)?  I cannot seem to find an option that will allow me to report those numbers.  Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: How Do I Determine the Slope at Different Levels of an Interaction Term?

If you save the fitted model as a new column with a formula (Save Columns > Save Prediction Formula), then examine the formula. Look for the Match() function. It will return the slope for each level of the categorical factor.

View solution in original post

ms
Super User (Alumni) ms
Super User (Alumni)

Re: How Do I Determine the Slope at Different Levels of an Interaction Term?

In the Fit Model report there is an option Compare Slopes (Red triangle/Estimates). If selected, an outline box is created. Select Show Summary Report by clicking the red triangle in the sub-outline box Comparisons with Overall... The resulting table box lists the estimated slopes of the contiuous covariate and their confidence intervals for all levels of the categorical variable.

 

JSL example:

dt = Open("$SAMPLE_DATA/Big Class.jmp");
fm = dt << Fit Model(Y(:height), Effects(:sex, :weight, :sex * :weight), Personality("Standard Least Squares"), Emphasis("Minimal Report"), Run);
fm << Compare Slopes(ANOM(1, Show Summary Report(1)));

 

View solution in original post

4 REPLIES 4

Re: How Do I Determine the Slope at Different Levels of an Interaction Term?

If your two factors are both categorical, then there is no slope. There is a change in the response that is visualized, for example in the Prediction Profiler, as a line drawn between the levels. 

syretted
Level II

Re: How Do I Determine the Slope at Different Levels of an Interaction Term?

Thank you for your reply!  I think I might not have been super clear, and I apologize for that.  The interaction is actually between a categorical term (with two levels) and a continuous term and the outcome is also a continuous term.  Would that change your answer, or would it be the same?  Thanks!

 

Re: How Do I Determine the Slope at Different Levels of an Interaction Term?

If you save the fitted model as a new column with a formula (Save Columns > Save Prediction Formula), then examine the formula. Look for the Match() function. It will return the slope for each level of the categorical factor.

ms
Super User (Alumni) ms
Super User (Alumni)

Re: How Do I Determine the Slope at Different Levels of an Interaction Term?

In the Fit Model report there is an option Compare Slopes (Red triangle/Estimates). If selected, an outline box is created. Select Show Summary Report by clicking the red triangle in the sub-outline box Comparisons with Overall... The resulting table box lists the estimated slopes of the contiuous covariate and their confidence intervals for all levels of the categorical variable.

 

JSL example:

dt = Open("$SAMPLE_DATA/Big Class.jmp");
fm = dt << Fit Model(Y(:height), Effects(:sex, :weight, :sex * :weight), Personality("Standard Least Squares"), Emphasis("Minimal Report"), Run);
fm << Compare Slopes(ANOM(1, Show Summary Report(1)));