[R-sig-ME] glmmADMB question
Jennifer Botting
jlb53 at st-andrews.ac.uk
Sun Jan 8 15:32:53 CET 2017
Hi,
I'm having trouble running a ZIPGLMM in glmmADMB. I am comparing the
number of behaviours exhibited by 12 individuals over 7 conditions. Each
subject was tested 4 times.
> str(Dat)
'data.frame': 329 obs. of 26 variables:
$ Subject : Factor w/ 12 levels "Baraka","Batang",..: 11 11 11 11 11
11 11 11 11 11 ...
$ Sex : Factor w/ 2 levels "F","M": 1 1 1 1 1 1 1 1 1 1 ...
$ History : Factor w/ 2 levels "HR","MR": 1 1 1 1 1 1 1 1 1 1 ...
$ Session : int 1 2 3 4 1 2 3 4 1 2 ...
$ Order : int 3 1 1 4 5 5 5 2 1 2 ...
$ Condition : Factor w/ 7 levels "A ","B","BE",..: 1 1 1 1 2 2 2 2 3 3
...
$ Voc: int 0 0 0 0 7 1 5 5 6 3 ...
$ Non : int 0 0 0 0 0 0 0 0 0 0 ...
$ Fac : int 0 0 0 0 0 0 0 0 0 0 ...
$ Ges : int 0 0 0 0 0 0 0 1 0 0 ...
...............................
The data include a very large number of zeros, so I tried the following
formula in glmmADMB, starting with Ges as my outcome variable:
*> m <- glmmadmb(formula = Ges ~ Condition + (1 | Subject), data = Dat,
family = "poisson", zeroInflation = TRUE) *
and got the following error:
Parameters were estimated, but standard errors were not: the most likely
problem is that the curvature at MLE was zero or negative
Error in glmmadmb(formula = Ges~ Condition + (1 | Subject), data = Dat, :
The function maximizer failed (couldn't find parameter file)
Troubleshooting steps include (1) run with 'save.dir' set and inspect
output files; (2) change run parameters: see '?admbControl';(3) re-run with
debug=TRUE for more information on failure mode
In addition: Warning message:
running command 'C:\windows\system32\cmd.exe /c glmmadmb -maxfn 500 -maxph
5 -noinit -shess' had status 1
When I ran it with debug=TRUE, I got the following output:
Parameters were estimated, but standard errors were not: the most likely
problem is that the curvature at MLE was zero or negative
run failed: Initial statistics: 7 variables; iteration 0; function
evaluation 0; phase 1 Function value 3.7639324e+002; maximum gradient
component mag 1.2938e+001 Var Value Gradient |Var Value
Gradient |Var Value Gradient 1 0.00000 1.2938e+001 | 2
0.00000 9.7086e-001 | 3 0.00000 1.6197e+000 4 0.00000 -2.6734e+000
| 5 0.00000 -5.9309e-002 | 6 0.00000 -2.6798e+000 7 0.00000
-4.9402e-001 | - final statistics: 7 variables; iteration 7; function
evaluation 10 Function value 3.2460e+002; maximum gradient component mag
-8.0580e-005 Exit code = 1; converg criter 1.0000e-004 Var Value
Gradient |Var Value Gradient |Var Value Gradient 1
-7.41263 1.8275e-006 | 2 -0.58080 3.4938e-005 | 3 -0.99038 1.6835e-005
4 1.59079 8.0028e-005 | 5 0.06984 3.2566e-005 | 6 1.63706
-8.0580e-005 7 0.32457 7.7648e-005 | Initial statistics: 8 variables;
iteration 0; function evaluation 0; phase 2 Function value 3.2460159e+002;
maxi... <truncated>
Error in glmmadmb(formula = Ges ~ Condition + (1 | Subject), data = Dat, :
The function maximizer failed (couldn't find parameter file)
Troubleshooting steps include (1) run with 'save.dir' set and inspect
output files; (2) change run parameters: see '?admbControl';(3) re-run with
debug=TRUE for more information on failure mode
In addition: Warning message:
running command 'C:\windows\system32\cmd.exe /c glmmadmb -maxfn 500 -maxph
5 -noinit -shess' had status 1
restored working directory to I:/xxxxx
removed temp directory
C:\Users\BO~1\AppData\Local\Temp\1\RtmpiwJxjv\glmmADMB12a03acd7a0c
I tried adding another fixed effect and the model ran, but gave crazy
values for the condition levels:
Call:
glmmadmb(formula = Ges ~ Condition + History + (1 | Subject),
data = Dat, family = "poisson", zeroInflation = TRUE)
AIC: 257.9
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -91.28 91007.00 0.00 0.999
ConditionB 89.63 91007.00 0.00 0.999
ConditionBE 88.69 91007.00 0.00 0.999
ConditionEYC 91.28 91007.00 0.00 0.999
ConditionF 90.54 91007.00 0.00 0.999
ConditionFE 91.17 91007.00 0.00 0.999
ConditionHA 89.59 91007.00 0.00 0.999
HistoryMR -2.48 1.02 -2.43 0.015 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Number of observations: total=329, Subject=12
Random effect variance(s):
Group=Subject
Variance StdDev
(Intercept) 1.837 1.355
Zero-inflation: 0.15369 (std. err.: 0.13609 )
Log-likelihood: -118.968
Warning message:
In .local(x, sigma, ...) :
'sigma' and 'rdig' arguments are present for compatibility only: ignored
I tried changing some controls that people had suggested online, such as
*admb.opts=admbControl(shess=FALSE,noinit=FALSE)*
but this didn't work with my model.
Some issues with my data are that for one of the conditions, the count of
Ges was 0 for all subjects. Similarly, for some subjects, the count for Ges
was 0 across all conditions.
I'd be extremely grateful if you had any advice.
Jenny
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models
mailing list