check_heterogeneity_bias: Check model predictor for heterogeneity bias

View source: R/check_heterogeneity_bias.R

check_heterogeneity_biasR Documentation

Check model predictor for heterogeneity bias

Description

check_heterogeneity_bias() checks if model predictors or variables may cause a heterogeneity bias, i.e. if variables have a within- and/or between-effect.

Usage

check_heterogeneity_bias(x, select = NULL, group = NULL)

Arguments

x

A data frame or a mixed model object.

select

Character vector (or formula) with names of variables to select that should be checked. If x is a mixed model object, this argument will be ignored.

group

Character vector (or formula) with the name of the variable that indicates the group- or cluster-ID. If x is a model object, this argument will be ignored.

See Also

For further details, read the vignette https://easystats.github.io/parameters/articles/demean.html and also see documentation for ?datawizard::demean.

Examples

data(iris)
iris$ID <- sample(1:4, nrow(iris), replace = TRUE) # fake-ID
check_heterogeneity_bias(iris, select = c("Sepal.Length", "Petal.Length"), group = "ID")

performance documentation built on Nov. 25, 2022, 9:08 a.m.