lme for long.data
Murali Haran <mharan at stat.umn.edu> writes:
I am attempting to fit a model for longitudinal data with the lme function. "sim" is a data set with sim$Y as response, sim$time as times of each observation, sim$id as patient id's.
I try to do the following : simcorExp <-corExp(form=(~time|id),nugget=T) simcorExp <- initialize(simcorExp, data=sim)
I think this should be done automatically in a call to lme.
sim.fit <- lme(fixed = Y~1, data=sim, random = ~1|id,correlation=simcorExp)
Try
sim.fit <- lme(Y ~ 1, data = sim, random = ~ 1 | id,
correlation = corExp(~ time | id, nugget = T))
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._