Skip to content

re.form: query about documentation #569

@HywelMJ

Description

@HywelMJ

The Technical Note in https://easystats.github.io/modelbased/articles/mixed_models.html#generalized-linear-mixed-models says:

For backend = "marginaleffects", the re.form argument is set to NULL for mixed models by default, to calculate marginal predictions. You can use for instance re.form = NA in your estimate_means() call to change the default value (NA will produce conditional predictions).

Documentation of glmmTMB's predict function says:

re.form \code{NULL} to specify individual-level predictions; \code{~0} or \code{NA} to specify population-level predictions (i.e., setting all random effects to zero)

That seems contradictory to me, i.e. I read Tech Note as saying re.form=NA produces conditional predictions whereas glmmTMB is saying re.form=NA gives population-level predictions.

(I'm assuming that estimate_means with backend="marginaleffects" and estimate="average" calls marginaleffects::avg_predictions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions