[R] Extracting error terms from an lme object

Erlend Birkeland Nilsen Erlend.Nilsen at sue.hihm.no
Tue Feb 21 09:50:15 CET 2006


Hi all,

I have a problem with extracting the right error terms from an lme-object.
The fixed part of the model is quite simple (y~x1*x2, where x1 and x2 are
factor variables with two levels), with random intercepts (random=~1|group).
As I work with factor variables here, I would like to display this with a
barplot (or something like that), with error bars representing the sem or sd
of the mean values for each group (i.e. four bars). However, I have not
figured out how to extract sem (sd) values for these means, or actually what
would be the appropriate error terms to use here. The summary.lme function
only provides me with the se for the parameter estimates (intercept and
slopes) while I want to display error terms for the different levels. Could
this be achieved by setting up an appropriate contrast matrix (or would any
of the established contrasts methods work), or is there another way of
getting error estimates that I could use in such a figure?

All the best, 

Erlend Nilsen




More information about the R-help mailing list