Dear Tanja,
R-Sig-Mixed-models is a better list for questions about lme4 and nlme.
There you are much more likely to get an answer from the mixed models
specialists.
First of all I would recommend you to write the random effect as
(1|fips) instead of (1|as.factor(diab$fips)). You will run into troubles
when you change the dataset as only the random effect explicitly refers
to the dataset.
I can think of two things that may cause the errors: a lack of data
points or an overspecified model. If you have a lot of data points then
you should have a look at the correlations between the covariates.
Highly correlated covariates can lead to unstable models with false
convergences as a result.
HTH,
Thierry
PS An informative subject line is recommended by the posting guide.
------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data.
~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey
-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
Namens Tanja Srebotnjak
Verzonden: donderdag 26 februari 2009 9:17
Aan: r-help at r-project.org
Onderwerp: [R] (no subject)
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.fact
or(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 at 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.
Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in this message
and any annex are purely those of the writer and may not be regarded as stating
an official position of INBO, as long as the message is not confirmed by a duly
signed document.