Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

lme can't find functions to set correlation / covariance structure and weights

I’m currently trying to model a multivariate mixed model.

Im trying to include weights and a covariance structure like so:

model <- nlme::lme(fixed = ..., data = ...., random = ..., weights = varIdent(form = ~ 1 | Gender))

or

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

model <- nlme::lme(fixed = ..., data = ...., random = ..., corr = corAR1())

I also tried using correlation instead of corr.

However, I get error-messages:

Error in corAR1() : could not find function "corAR1"

Error in varIdent(form = ~1 | Gender) : could not find function "varIdent"

I have tried deleting the Global enviroment and loading everything fresh.
I also reinstalled nlme and typed getAnywhere(corAR1) and getAnywhere(varIdent) as suggested in this post.

Do you have any ideas?
Many thanks!

>Solution :

Do you call library(nlme) before running? And did you try including nlme::corAR1()/nlme::varIdent() inside the call itself ?

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading