I've fit my model using lme (in nlme, R). However, this is not normally distributed. Taking the log of the outcome variable makes it normal. But my professor wants me to use a glmm with a log link instead of transforming the variable. What would be a good R package to do this (and still include the autocorrelation I know exists in the longitudinal data - so not glmer).

tsmodel8 <- lme(totalsupport ~ time+I(time^2) + (various fixed effects), 
                random = ~1+time+I(time^2)|id, correlation=corCAR1(form = ~1 | id),
                weights = varExp(form = ~time), data = dat, na.action = "na.exclude",
                method = "ML")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.