[R] Homogeneity of regression slopes

Doug Adams fog0 at gmx.com
Mon Sep 13 22:52:35 CEST 2010


Hello,

We've got a dataset with several variables, one of which we're using
to split the data into 3 smaller subsets.  (as the variable takes 1 of
3 possible values).

There are several more variables too, many of which we're using to fit
regression models using lm.  So I have 3 models fitted (one for each
subset of course), each having slope estimates for the predictor
variables.

What we want to find out, though, is whether or not the overall slopes
for the 3 regression lines are significantly different from each
other.  Is there a way, in R, to calculate the overall slope of each
line, and test whether there's homogeneity of regression slopes?  (Am
I using that phrase in the right context -- comparing the slopes of
more than one regression line rather than the slopes of the predictors
within the same fit.)

I hope that makes sense.  We really wanted to see if the predicted
values at the ends of the 3 regression lines are significantly
different... But I'm not sure how to do the Johnson-Neyman procedure
in R, so I think testing for slope differences will suffice!

Thanks to any who may be able to help!

Doug Adams



More information about the R-help mailing list