I'm running an LME model with the lme4
package and then following up with pairwise comparisons using the lsmeans
package.
Here is my code:
lmer_full <- lmer (VOT ~ Place*Laryngeal + (1+Place+Laryngeal|Sp),
data = LME,control=lmerControl(optCtrl=list(maxfun=50000)))
lsmeans (lmer_full, pairwise~Laryngeal|Place)
However, I get the following error message after running the lmer
:
fixed-effect model matrix is rank deficient so dropping 1 column / coefficient
Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : unable to evaluate scaled gradient
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge: degenerate Hessian with 1 negative eigenvalues
Then another error after running lsmeans
:
Error in
base::chol2inv(x, ...) : 'a'
must be a numeric matrix
Here is the structure of my data:
I would really appreciate if someone can tell me what's wrong with the model.