[R] errors with lme4
Alessio Unisi
franceschi6 at unisi.it
Thu Nov 24 09:04:46 CET 2011
Dear R-users,
i need help for this topic!
I'm trying to determine if the reproductive success (0=fail, 1=success) of a species of bird
is related to a list of covariates.
These are the covariates:
§ elev: elevation of nest (meters)
§ seadist: distance from the sea (meters)
§ meanterranova: records of temperature
§ minpengS1: records of temperature
§ wchillpengS1: records of temperature
§ minpengS2: records of temperature
§ wchillpengS2: records of temperature
§ nnd: nearest neighbour distance
§ npd: nearest penguin distance
§ eggs: numbers of eggs
§ lay: laying date (julian calendar)
§ hatch: hatching date (julian calendar)
I have some NAs in the data.
I want to test the model with all the variable then i want to remove
some, but the ideal model:
GLM.1 <-lmer(fledgesucc ~ +lay +hatch +elev +seadist +nnd +npd
+meanterranova +minpengS1 +minpengS2 +wchillpengS1 +wchillpengS2
+(1|territory), family=binomial(logit), data=fledge)
doesn't work because of these errors:
'Warning message: In mer_finalize(ans) : gr cannot be computed at
initial par (65)'.
"matrix is not symmetric [1,2]"
If i delete one or more of the T records (i.e. minpengS2 +wchillpengS2)
the model works...below and example:
GLM.16 <-lmer(fledgesucc ~ lay +hatch +elev +seadist +nnd +npd
+meanterranova +minpengS1 +(1|territory), family=binomial(logit),
data=fledge)
> summary(GLM.16)
Generalized linear mixed model fit by the Laplace approximation
Formula: fledgesucc ~ lay + hatch + elev + seadist + nnd + npd +
meanterranova + minpengS1 + (1 | territory)
Data: fledge
AIC BIC logLik deviance
174 204.2 -77 154
Random effects:
Groups Name Variance Std.Dev.
territory (Intercept) 0.54308 0.73694
Number of obs: 152, groups: territory, 96
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 14.136846 14.510089 0.974 0.330
lay -0.007642 0.267913 -0.028 0.977
hatch -0.025947 0.267318 -0.097 0.923
elev 0.007481 0.027765 0.270 0.788
seadist -0.004277 0.004550 -0.940 0.347
nnd -0.035535 0.026504 -1.341 0.180
npd 0.003788 0.005521 0.686 0.493
meanterranova 1.242570 1.426158 0.871 0.384
minpengS1 -0.399852 0.418722 -0.955 0.340
Correlation of Fixed Effects:
(Intr) lay hatch elev seadst nnd npd mntrrn
lay 0.411
hatch -0.515 -0.993
elev -0.015 0.141 -0.135
seadist -0.003 -0.023 0.019 -0.440
nnd -0.061 0.066 -0.059 -0.020 0.231
npd 0.033 -0.108 0.100 0.298 -0.498 -0.338
meanterranv 0.459 -0.118 0.075 -0.061 0.014 -0.048 0.130
minpengS1 -0.540 0.015 0.035 0.032 0.000 0.039 -0.086 -0.970
I try also with glmer() but the error are the same. I've attached an example of my dataset only 15 rows just to see the
dataset. Let me know if you need more informations.
I'm a new R user, so I apologize if the topic is already being addressed
by some other user.
Thanks in advance for your help and advices!
regards
--
Alessio Franceschi
Phd student
Dipartimento di Scienze Ambientali "G. Sarfatti"
Università di Siena
Via P.A. Mattioli, 8 - 53100 Siena (Italy)
Cell. +393384431806
email: franceschi6 at unisi.it; alfranceschi at alice.it
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dataset.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20111124/17759afe/attachment.txt>
More information about the R-help
mailing list