process_results {mmiCATs} | R Documentation |
Process Cluster-Adjusted Robust Inference Results
Description
This internal function processes results from cluster-specific model fittings for cluster-robust inference functions. It combines results, computes variance-covariance matrix, standard errors, t-statistics, p-values, and confidence intervals for each independent variable.
Usage
process_results(results, ind_variables, ci.level, drop, return.vcv)
Arguments
results |
A list of results from cluster-specific model fittings. |
ind_variables |
A vector of independent variable names for which the results are computed. |
ci.level |
Confidence level for the confidence intervals. |
drop |
Logical; if TRUE, clusters with failed model fits are omitted from the results. |
return.vcv |
Logical; if TRUE, returns the variance-covariance matrix of the cluster-averaged coefficients. |
Details
Workflow defined in clusterSEs::cluster.im.glm() function.
Value
A list containing the following elements:
- p.values
A matrix of p-values for each independent variable.
- ci
A matrix with the lower and upper bounds of the confidence intervals for each independent variable.
- vcv.hat
The variance-covariance matrix of the cluster-averaged coefficients, returned if
return.vcv
is TRUE.- beta.bar
The cluster-averaged coefficients, returned if
return.vcv
is TRUE.