Hi. When I try to run add_ci with a glmerMod, I get the following error:
Error in [.data.frame(fr, vars) : undefined columns selected
After tracing and running in debug, it seems the error is being thrown by a call to lme4::bootMer and the issue is in the newdata argument.
Would it be incorrect to change my_pred_fixed_glmer_linear to drop the newdata argument? When I changed the my_pred function in bootstrap_ci_glmermod from
function (fit, lvl) { predict(fit, newdata = ciTools_data$tb_temp, re.form = NULL, family = fit@resp$family$family, type = "response") }
to
my_pred = function (fit, lvl) { predict(fit, re.form = NULL, family = fit@resp$family$family, type = "response") }
it seems to work. Since the data are contained inside the glmerMod object I don't see any need to have the newdata argument.
Hi. When I try to run add_ci with a glmerMod, I get the following error:
Error in
[.data.frame
(fr, vars) : undefined columns selectedAfter tracing and running in debug, it seems the error is being thrown by a call to lme4::bootMer and the issue is in the newdata argument.
Would it be incorrect to change
my_pred_fixed_glmer_linear
to drop the newdata argument? When I changed themy_pred
function inbootstrap_ci_glmermod
fromfunction (fit, lvl) { predict(fit, newdata = ciTools_data$tb_temp, re.form = NULL, family = fit@resp$family$family, type = "response") }
to
my_pred = function (fit, lvl) { predict(fit, re.form = NULL, family = fit@resp$family$family, type = "response") }
it seems to work. Since the data are contained inside the glmerMod object I don't see any need to have the newdata argument.