I am trying to fit GLMM's to my data using the glmer function available in R's lme4 package. The data is available under the name block1and2 at: https://onedrive.live.com/redir?resid=1B727FC7180E87DF%21119
I keep getting error or warning messages. Can anybody help me get rid of them. There is probably a problem with the low number of Virus positive samples.Can these problems be resolved using GLMMs or should I think of other statistical tests? N.B. this is a similar problem I had posted about concerning a similar data set and similar analyses (After trying various optimzers, model simplification running more iterations, when fitting GLMMs, R still produces warning messages)
Tried fitting the model:
Line.glmer<-glmer(Virus_DNA~Line+(1|Block/Day_of_Analyses),family=binomial,data=data)
Only to get the error message
Error: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in pwrssUpdate
When running the code, with more iterations:
Line.glmer<-glmer(Virus_DNA~Line+(1|Block/Day_of_Analyses),family=binomial,data=data,control=glmerControl(optCtrl=list(maxfun=1e9)))
I get the same message.
When running the code with the optimizer bobyqa:
Line.glmer<-glmer(Virus_DNA~Line+(1|Block/Day_of_Analyses),family=binomial,data=data,control=glmerControl(optimizer="bobyqa",optCtrl=list(maxfun=1e9)))
I get the warning messages:
Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.00163126 (tol = 0.001, component 5)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge: degenerate Hessian with 2 negative eigenvalues
When running the code with the optimizer Nelder_Mead: 'Line.Nelder_Mead.glmer<-glmer(Virus_DNA~Line+(1|Block/Day_of_Analyses),family=binomial,data=data,control=glmerControl(optimizer="Nelder_Mead",optCtrl=list(maxfun=1e9)))'
I get the error message:
Error: (maxstephalfit) PIRLS step-halvings failed to reduce deviance in pwrssUpdate
I have also tried the optimizer "nlminb" from the package "optimx". With the code
Line.nlminb.glmer<-glmer(Virus_DNA~Line+(1|Block/Day_of_Analyses),family=binomial,data=data, control=glmerControl(optimizer="optimx",optCtrl=list(method="nlminb")))
Getting the warning messages:
Warning messages:
1: In optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, :
Parameters or bounds appear to have different scalings.
This can cause poor performance in optimization.
It is important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.00184741 (tol = 0.001, component 5)
3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge: degenerate Hessian with 2 negative eigenvalues
Similarly with the optimizer "nlminb" from the package "optimx":
Line.LBFGSB.glmer<-glmer(Virus_DNA~Line+(1|Block/Day_of_Analyses),family=binomial,data=data,
control=glmerControl(optimizer="optimx",optCtrl=list(method="L-BFGS-B")))
Produces the warning messages:
Warning messages:
1: In optimx.check(par, optcfg$ufn, optcfg$ugr, optcfg$uhess, lower, :
Parameters or bounds appear to have different scalings.
This can cause poor performance in optimization.
It is important for derivative free methods like BOBYQA, UOBYQA, NEWUOA.
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.00330343 (tol = 0.001, component 5)
3: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model is nearly unidentifiable: large eigenvalue ratio
- Rescale variables?