[R] (no subject)

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Thu Feb 26 11:53:29 CET 2009

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

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.



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
tel. + 32 54/436 185
Thierry.Onkelinx at 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
~ 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)


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 <-
or(diab$fips)), family = binomial(link="logit"), data = diab,
Error in validObject(.Object) :
  invalid class "mer" object: Slot Zt must by dims['q']  by

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.


	[[alternative HTML version deleted]]

R-help at r-project.org mailing list
PLEASE do read the posting guide
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.

More information about the R-help mailing list