Learn R Programming

orchaRd (version 2.2.1)

.run_leave1out: Fit Multiple Meta-Analytic Models For Leave-One-Out Analysis

Description

Iteratively refits a meta-analytic model, leaving out one level of a specified grouping variable in each iteration. This internal function handles the actual model refitting process for the leave-one-out analysis.

Usage

.run_leave1out(
  model,
  group,
  vcalc_args = NULL,
  robust_args = NULL,
  phylo_args = NULL
)

Value

A named list of models, each fitted after omitting one group. Names correspond to the omitted group IDs. Any failed model fits will be NULL.

Arguments

model

A fitted metafor model object containing a data element and call object.

group

A character string specifying the column in model$data that defines the groups to be omitted one at a time.

vcalc_args

Optional list of arguments for the variance-covariance calculation using metafor's vcalc function. See leave_one_out() for details.

robust_args

Optional list of arguments for robust variance estimation using metafor's robust function. See leave_one_out() for details.

phylo_args

Optional list of arguments for phylogenetic matrix calculation. See leave_one_out() for details.

Author

Facundo Decunta - fdecunta@agro.uba.ar

Details

The function creates a subset of the original data for each unique value in the grouping variable, removing that group and refitting the model using the same specification as the original model. If variance-covariance matrices or phylogenetic corrections were used in the original model, these are recalculated for each subset. If a model fails to fit, NULL is returned for that group.