Skip to content

my_pred_full_glmer_response - possible to not have newdata argument? #46

@YoJimboDurant

Description

@YoJimboDurant

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions