This is a study in which 3 mice were used as control, and 3 were mutant. >2000 measurements were taken per mouse. I want to fit a model as follows:
lmer(measurements ~ mouseID + (mouseID|treatment), data = alldata, REML = TRUE)
but this does not converge. I have tried modifying control using Nelder-Mead Method, and L-BFGS-B. Different models give different error messages.
The simple model above yields:
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : unable to evaluate scaled gradient
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge: degenerate Hessian with 7 negative eigenvalues
and the most "complex" if you will, model:
lmer(measurements ~ mouseID + (mouseID|treatment), data = alldata, control = lmerControl( optimizer ='optimx', optCtrl=list(method='L-BFGS-B')), REML = FALSE)
yields:
boundary (singular) fit: see ?isSingular
and there was at least one more warning with another model attempted. Is my problem that the mice did not also receive the other treatment? And if so, how would I adjust the model to reflect what did already happen AND converge?
I am of the impression that the random effect should be the treatment, and the fixed effect is the mouseID. Maybe my desired model is misnamed? Or maybe I have this random/fixed effect thought process wrong. Please advise.