[R] Homogeneity of regression slopes
Michael Bedward
michael.bedward at gmail.com
Tue Sep 14 02:12:50 CEST 2010
Hello Doug,
Perhaps it would just be easier to keep your data together and have a
single regression with a term for the grouping variable (a factor with
3 levels). If the groups give identical results the coefficients for
the two non-reference grouping variable levels will include 0 in their
confidence interval.
Michael
On 14 September 2010 06:52, Doug Adams <fog0 at gmx.com> wrote:
> 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
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list