Learn R Programming

mixedbiastest (version 1.0.2)

mixedbiastest-package: mixedbiastest: Bias Diagnostics for Linear Mixed Models

Description

The `mixedbiastest` package provides a function to perform bias diagnostics on linear mixed models fitted with `lmer` from the `lme4` package. It implements permutation tests for assessing the bias of fixed effects, as described in Karl and Zimmerman (2021).

Arguments

Functions

mixedbiastest

Performs the bias diagnostic test.

print.mixedbiastest

Prints the results of the bias diagnostic.

plot.mixedbiastest

Plots the permutation distributions and observed test statistics for each fixed effect.

list_fixed_effects

List Fixed Effects from an merMod Object.

Acknowledgments

Development of this package was assisted by GPT o1-preview and GPT 5 Pro, which helped in constructing the structure of much of the code and the roxygen documentation. The code is based on the R code provided by Karl and Zimmerman (2020).

Author

Maintainer: Andrew T. Karl akarl@asu.edu (ORCID)

Details

The methods in this package are designed for Gaussian linear mixed models with diagonal random-effects covariance matrices and homoskedastic residual errors with covariance \(\sigma^2 I_n\). Models with more general random-effects structures or residual covariance patterns are currently not supported.

While the bias diagnostic of Karl and Zimmerman (2021) is derived for general linear mixed models with arbitrary random-effects and residual covariance matrices \(G\) and \(R\), the current mixedbiastest implementation focuses on the practically important case described above. Extending the package to handle correlated random effects or more general residual covariance structures would require additional work on both the underlying linear algebra and the permutation scheme, and is therefore left for future research.

References

Karl, A. T., & Zimmerman, D. L. (2021). A diagnostic for bias in linear mixed model estimators induced by dependence between the random effects and the corresponding model matrix. Journal of Statistical Planning and Inference, 212, 70–80. tools:::Rd_expr_doi("10.1016/j.jspi.2020.06.004")

Karl, A., & Zimmerman, D. (2020). Data and Code Supplement for 'A Diagnostic for Bias in Linear Mixed Model Estimators Induced by Dependence Between the Random Effects and the Corresponding Model Matrix'. Mendeley Data, V1. tools:::Rd_expr_doi("10.17632/tmynggddfm.1")