[R] R equivalent to `estimate' in SAS proc mixed

From: Randy Johnson <rjohnson_at_ncifcrf.gov>
Date: Fri 19 Aug 2005 - 07:20:36 EST


Example: I have the following model

> model <- lmer(response ~ time * trt * bio + (time|id), data = dat)

    where time = time of observation
           trt = treatment group (0-no treatment / 1-treated)
           bio = biological factor (0-absent / 1-present)

and I would like to obtain an estimate (with standard error) of the change in response over time for individuals in the treatment group with the biological factor. The estimate is easy,

> sum(fixef(model)[c(2,5,6,8)])

    # ie time + time:trt + time:bio + time:trt:bio

but the standard error is a hassle to calculate by hand. Is there some better way to do this? In SAS for example there is an `estimate' option (see sample code below) that will calculate the estimate, SE, df, t statistic, etc... Is there some R equivalent?

Thanks,
Randy

proc mixed data=dat;
  class id;
  model response = time + trt + bio + time*trt + time*bio + trt*bio +

                   time*trt*bio;

  random time;

  estimate "est1" intercept 0 time 1 trt 0 bio 0 time*trt 1 time*bio 1

                  trt*bio 0 time*trt*bio 1;  /* or something like that */
run;

Randy Johnson
Laboratory of Genomic Diversity
NCI-Frederick
Bldg 560, Rm 11-85
Frederick, MD 21702
(301)846-1304


R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Aug 19 07:24:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:54 EST