robust_mixed: Cluster robust standard errors with degrees of freedom adjustments for lmerMod/lme objects
Description
Function to compute the CR2/CR0 cluster
robust standard errors (SE) with Bell and McCaffrey (2002)
degrees of freedom (dof) adjustments. Suitable even with a low number of clusters.
The model based (mb) and cluster robust standard errors are shown for comparison purposes.
Usage
robust_mixed(m1, digits = 3, type = "CR2", satt = TRUE, Gname = NULL)
Value
A data frame (results) with the cluster robust adjustments with p-values.
Estimate
The regression coefficient.
mb.se
The model-based (regular, unadjusted) SE.
cr.se
The cluster robust standard error.
df
degrees of freedom: Satterthwaite or between-within.
p.val
p-value using CR0/CR2 standard error.
stars
stars showing statistical significance.
Arguments
m1
The lmerMod or lme model object.
digits
Number of decimal places to display.
type
Type of cluster robust standard error to use ("CR2" or "CR0").
satt
If Satterthwaite degrees of freedom are to be computed (if not, between-within df are used).
Gname
Group/cluster name if more than two levels of clustering (does not work with lme).
Bell, R., & McCaffrey, D. (2002). Bias reduction in standard errors for linear regression with multi-stage samples. Survey Methodology, 28, 169-182.
(link)
Liang, K.Y., & Zeger, S. L. (1986). Longitudinal data analysis using generalized linear models. Biometrika, 73(1), 13-22.
(tools:::Rd_expr_doi("10.1093/biomet/73.1.13"))