mod_is_valid: Validate 'mod'

View source: R/mod_results.R

mod_is_validR Documentation

Validate 'mod'

Description

Checks if 'mod' argument is valid. This argument must be either '"1"' (indicating an intercept-only model) or a moderator that is included in the meta-analytic model (as specified in 'model$formula.mods').

Usage

mod_is_valid(model, mod)

Arguments

model

A meta-analytic model from the metafor package.

mod

A string specifying the moderator to check. Must be '"1"' or one of the moderators included in model$formula.mods.

Value

A logical value: TRUE if 'mod' is valid, strop and throw an error otherwise.


daniel1noble/orchaRd documentation built on Feb. 23, 2025, 9:17 a.m.