p_value_ml1: "m-l-1" approximation for SEs, CIs and p-values

Description Usage Arguments Details Value References See Also Examples

View source: R/p_value_ml1.R

Description

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

Usage

1
2
3
4
5
ci_ml1(model, ci = 0.95)

dof_ml1(model)

p_value_ml1(model, dof = NULL)

Arguments

model

A mixed model.

ci

Confidence Interval (CI) level. Default to 0.95 (95%).

dof

Degrees of Freedom.

Details

Small Sample Cluster corrected Degrees of Freedom

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 statistics (see Li and Redden 2015). 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()) and confidence intervals (ci(method = "ml1")).

Degrees of Freedom for Longitudinal Designs (Repeated Measures)

In particular for repeated measure designs (longitudinal data analysis), the m-l-1 heuristic is likely to be more accurate than simply using the residual or infinite degrees of freedom, because dof_ml1() returns different degrees of freedom for within-cluster and between-cluster effects.

Limitations of the "m-l-1" Heuristic

Note that the "m-l-1" heuristic is not applicable (or at least less accurate) 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.

Value

A data frame.

References

See Also

dof_ml1() is a small helper-function to calculate approximated degrees of freedom of model parameters, based on the "m-l-1" heuristic.

Examples

1
2
3
4
if (require("lme4")) {
  model <- lmer(Petal.Length ~ Sepal.Length + (1 | Species), data = iris)
  p_value_ml1(model)
}

parameters documentation built on Oct. 19, 2021, 1:07 a.m.