[R] Help with response CIs for lme
Michael Kubovy
kubovy at virginia.edu
Mon Nov 27 03:07:07 CET 2006
Hi,
Can someone please offer a procedure for going from CIs produced by
intervals.lme() to fixed-effects response CIs.
Here's a simple example:
library(mlmRev)
library(nlme)
hsb.lme <- lme(mAch ~ minrty * sector, random = ~ 1 | cses, Hsb82)
(intervals(hsb.lme))
(hsb.new <- data.frame
minrty = rep(c('No', 'Yes'), 2),
sector = rep(c('Public', 'Catholic'), each = 2)))
cbind(hsb.new, predict(hsb.lme, hsb.new, level = 0))
Is the following correct (I know from the previous command that the
estimate is correct)?
cbind(hsb.new, rbind(hsb.int[[1]][1,], hsb.int[[1]][1,]+hsb.int[[1]]
[2,], hsb.int[[1]][1,]+hsb.int[[1]][3,], hsb.int[[1]][1,]+hsb.int[[1]]
[2,] + hsb.int[[1]][3,] + hsb.int[[1]][4,]))
If so, is there an easier way to write it?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102 Gilmer Hall
McCormick Road Charlottesville, VA 22903
Office: B011 +1-434-982-4729
Lab: B019 +1-434-982-4751
Fax: +1-434-982-4766
WWW: http://www.people.virginia.edu/~mk9y/
More information about the R-help
mailing list