[R] Compare linear regressios for significant differences of the slopes
Dieter Menne
dieter.menne at menne-biomed.de
Fri Nov 3 11:27:41 CET 2006
Rainer M Krug wrote:
> > I have (8 measures * 96 groups) = 768 datasets for which I did linear
> > regressions using lm().
> >
> > Now I want to compare the slopes for each of the 8 measures in each of
> > the 96 groups. As I understand , I can not use
> >> anova(lm1, ..., lm8)
> > as the lm1 ... lm8 are based on different datasets.
> >
Instead of doing this in two steps, you would better use lme in package nlme to
test the hypothesis in one run. I don't understand the details of you design,
but is looks like the oxboys example in Pinheiro/Bates (the book of nlme) could
give you a first starter.
Dieter
More information about the R-help
mailing list