Dear all Apologies in advance as this seems like a trivial question. Nonetheless, a question I haven't been able to resolve myself !. Within a single repetition of a simulation (to be repeated many times) I am fitting the following linear mixed model using lme...
Y_{gtr} = \mu + U_{g} + W_{gt} + Z_{gtr} U_{g} ~ N(0,\gamma^{2}), W_{gt} ~ N(0,\kappa^{2}), Z_{gtr} ~ N(0,\tau^{2}) g = 1,...,G t = 1,...,T r= 1,...,R ...by doing > Model.fit <- lme(Y ~ 1, data=data, random= ~1|gene/treatment) I would like to be able to extract the estimated covariance parameters contained within the lme object. I know if I type... > Model.fit$sigma ...then I get the estimated residual variance, i.e. within the context of the above model, the estimate for \tau. But I would also like to extract the estimates for \gamma and \kappa by doing Model.fit$"something". I am aware that I can view the output using the extractor function "summary", but within a single repetition of my simulation routine I want to be able to code something like gamma <- Model.fit$..... kappa <- Model.fit$..... and then plug `gamma' and `kappa' into some formulae. This process of fitting and extracting will be repeated many times, which is why I wish to automate everything. Again, any help would be greatly appreciated Best Gerwyn Green School of Health and Medicine Lancaster University Any help would be greatly appreciated Best Gerwyn Green School of Health and Medicine Lancaster Uinversity ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.