World Statistics Day was yesterday, but we’re celebrating all week long! This celebration means acknowledging the impact statistics has on our world. Who is your favorite statistician? Share with us who they are and why they top your favorites list.
Choose Language Hide Translation Bar
Highlighted
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
Highlighted

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.

Learn it once, use it forever!

View solution in original post

Highlighted
ms
Super User ms
Super User

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
Highlighted

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. 

Learn it once, use it forever!
Highlighted
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!

 

Highlighted

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.

Learn it once, use it forever!

View solution in original post

Highlighted
ms
Super User ms
Super User

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

Article Labels

    There are no labels assigned to this post.