Learn R Programming

parameters (version 0.4.0)

dof_ml1: p-values using the "m-l-1" heuristic

Description

Approximation of degrees of freedom based on a "m-l-1" heuristic as suggested by Elff et al. (2019).

Usage

dof_ml1(model)

p_value_ml1(model, dof = NULL)

se_ml1(model)

Arguments

model

A mixed model.

dof

Degrees of Freedom.

Value

The p-values.

Details

Inferential statistics (like p-values, confidence intervals and standard errors) may be biased in mixed models when the number of clusters is small (even if the sample size of level-1 units is high). In such cases it is recommended to approximate a more accurate number of degrees of freedom for such inferential statitics. The m-l-1 heuristic is such an approach that uses a t-distribution with fewer degrees of freedom (dof_ml1) to calculate p-values (p_value_ml1), standard errors (se_ml1) and confidence intervals (ci(method = "ml1")). Note that the "m-l-1" heuristic is not applicable for complex multilevel designs, e.g. with cross-classified clusters. In such cases, more accurate approaches like the Kenward-Roger approximation (dof_kenward()) is recommended. However, the "m-l-1" heuristic also applies to generalized mixed models, while approaches like Kenward-Roger or Satterthwaite are limited to linear mixed models only.

References

Elff, M.; Heisig, J.P.; Schaeffer, M.; Shikano, S. (2019): Multilevel Analysis with Few Clusters: Improving Likelihood-based Methods to Provide Unbiased Estimates and Accurate Inference, British Journal of Political Science.

See Also

dof_ml1() and se_ml1() are small helper-functions to calculate approximated degrees of freedom and standard errors of model parameters, based on the "m-l-1" heuristic.

Examples

Run this code
# NOT RUN {
library(lme4)
model <- lmer(Petal.Length ~ Sepal.Length + (1 | Species), data = iris)
p_value_ml1(model)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab