[R] multivariate lme?
Constantinos Antoniou
antoniou at central.ntua.gr
Tue Jul 5 23:34:17 CEST 2005
Dear all,
is it possible to estimate a multivariate multilevel model in R (I
guess the term in R is mixed-effects model). I can estimate
univariate models using either lme{nlme} or lmer{lme4}, but when I
use a multivariate response, I get the same output as if I was trying
to estimate a univariate model.
[For a reproducible example, please download http://mit.edu/costas/
www/parav.txt and run:
>Parav<-read.table("parav.txt",header=T)
>library(nlme)
>attach(Parav)
]
>myResponse <- cbind(accidents,Killed)
I get the same thing as if I used only accidents as the response.
For example:
>parav7.lme <- lme(accidents~alcontrols,random=~1+alcontrols|
department/prefecture,data=Parav)
yields the same output as:
>parav8.lme <- lme(myResponse~alcontrols,random=~1+alcontrols|
department/prefecture,data=Parav)
Thank you,
Costas
PS. I am working on R-2.1.0a on a Mac 10.4.1.
--
Constantinos Antoniou, Ph.D.
Department of Transportation Planning and Engineering
National Technical University of Athens
5, Iroon Polytechniou str. GR-15773, Athens, Greece
More information about the R-help
mailing list