Hello, I have been searching for ways to obtain these for combinations of fixed factors and levels other than the 'baseline' group (contrasts coded all 0's) from a mixed-effects model in lme. I've modelled the continuous variable y as a function of a continuous covariate x, and fixed factors A, B, and C. The fixed factors have two levels each and I'd like to know whether the relationship between y and x varies between levels of the factors, and whether there are any interactions between these factors. I've therefore setup the model as this: lme.fit <- lme(y ~ x*A*B*C, data=df, random=~x | subjectID) The contrasts are default ("contr.treatment" and "contr.poly"). As usual, the summary provides the coefficients for the 'baseline' group. The rest of coefficients correspond to *differences* and their standard error with respect to this group. One can calculate the coefficients for any combination of factor levels by adding the appropriate coefficients in the results. However, I don't understand how to obtain the standard errors for these from the summary report. Can someone please let me know how to obtain these? Cheers, Sebastian
Sebastian, you might take a look at the function "estimable" in the package gregmisc. We've had a lot of luck with that. Andrew On Tuesday 23 March 2004 09:36, Sebastian Luque wrote:> Hello, > > I have been searching for ways to obtain these for combinations of fixed > factors and levels other than the 'baseline' group (contrasts coded all > 0's) from a mixed-effects model in lme. I've modelled the continuous > variable y as a function of a continuous covariate x, and fixed factors > A, B, and C. The fixed factors have two levels each and I'd like to know > whether the relationship between y and x varies between levels of the > factors, and whether there are any interactions between these factors. > I've therefore setup the model as this: > > lme.fit <- lme(y ~ x*A*B*C, data=df, random=~x | subjectID) > > The contrasts are default ("contr.treatment" and "contr.poly"). As > usual, the summary provides the coefficients for the 'baseline' group. > The rest of coefficients correspond to *differences* and their standard > error with respect to this group. One can calculate the coefficients for > any combination of factor levels by adding the appropriate coefficients > in the results. However, I don't understand how to obtain the standard > errors for these from the summary report. Can someone please let me know > how to obtain these? > > Cheers, > Sebastian > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html-- Andrew Robinson Ph: 208 885 7115 Department of Forest Resources Fa: 208 885 6226 University of Idaho E : andrewr at uidaho.edu PO Box 441133 W : http://www.uidaho.edu/~andrewr Moscow ID 83843 Or: http://www.biometrics.uidaho.edu No statement above necessarily represents my employer's opinion.
Hi all, a student of mine recently stumbled whilst reading the R help files for the statistical distributions. She was confused by their assertion that, for example, 'rnorm' generates random deviates. I have seen this label used elsewhere, although it does not seem universal - for example, Ripley (1987) doesn't have it in the index. Does anyone know why they're called random deviates, as opposed to random numbers? Andrew -- Andrew Robinson Ph: 208 885 7115 Department of Forest Resources Fa: 208 885 6226 University of Idaho E : andrewr at uidaho.edu PO Box 441133 W : http://www.uidaho.edu/~andrewr Moscow ID 83843 Or: http://www.biometrics.uidaho.edu No statement above necessarily represents my employer's opinion. Cited: Ripley, B.D. 1987. Stochastic Simulation. Wiley-Interscience;