Hello, I'm trying to fit a generalized linear mixed model to estimate diabetes prevalence at US county level. To do this I'm using the glmer() function in package lme4. I can fit relatively simple models (i.e. few covariates) but when expanding the number of covariates I usually encounter the following error message.
gm8 <- glmer(DIAB05F~AGE+as.factor(SEX)+poolt+poolx+poverty+fastfood+(1|as.factor(diab$fips)), family = binomial(link="logit"), data = diab, doFit=TRUE) Error in validObject(.Object) : invalid class "mer" object: Slot Zt must by dims['q'] by dims['n']*dims['s'] In the above, the response is person-level diabetes status as a function of AGE=age, SEX=sex, poolt=average county diabetes prevalence for previous years, poolx=pooled county diabetes prevalence for counties with similar age, sex, race, and income structure, poverty=county poverty rate, fastfood=number of fastfood places per 100,000 people in the county, and a county random effect. If I leave out fastfood, the model gets at least fitted - although it doesn't converge (yet): Warning message: In mer_finalize(ans) : false convergence (8) I would be grateful for any advice on what the problem could be and how to resolve it. Thanks, Tanja [[alternative HTML version deleted]] ______________________________________________ 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.