Hi Thomas, Thanks for the additional information.
Just wondering, and hoping to learn ... would any lack of homogeneity of variance (which is what I believe you mean by different stddev estimates) be found when performing standard regression diagnostics, such as residual plots, Levene's test (or equivalent), etc.? If so, then would a WLS routine or some type of variance stabilizing transformation be useful? Again, hoping to learn. I'll check out the gls() routine in the nlme package, as you mentioned. Thanks. Cliff On Mon, Sep 13, 2010 at 10:02 PM, Thomas Stewart <tgstew...@gmail.com>wrote: > Allow me to add to Michael's and Clifford's responses. > > If you fit the same regression model for each group, then you are also > fitting a standard deviation parameter for each model. The solution > proposed by Michael and Clifford is a good one, but the solution assumes > that the standard deviation parameter is the same for all three models. > > You may want to consider the degree by which the standard deviation > estimates differ for the three separate models. If they differ wildly, the > method described by Michael and Clifford may not be the best. Rather, you > may want to consider gls() in the nlme package to explicitly allow the > variance parameters to vary. > > -tgs > > On Mon, Sep 13, 2010 at 4:52 PM, Doug Adams <f...@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@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. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.