Description Usage Arguments Value Note Author(s) References
Calculate cluster robust p-values and confidence intervals using wild cluster bootstrapped t-statistics based on Webb (2013) which is the prefered method to use when the number of clusters are < 15. Webb, M. D. (2013). <Reworking wild bootstrap based inference for clustered errors (No. 1315). Queen's Economics Department Working Paper>.
1 2 3 |
mod |
A linear model estimated using glm. |
dat |
the data set used to estimate mod. |
cluster |
The clustering variable. |
vars.boot |
The variables to bootstrap over when null is imposed. Default is p-values for all variables. Displays p-values for all variables with null not imposed. |
ci.level |
The confidence level of the confidence interval. Reported when impose.null = FALSE |
impose.null |
Should null be imposed? |
boot.reps |
The number of bootstrap repititions. |
report |
Report the result to the console? |
prog.bar |
Show a progress bar of the bootstrap? |
output.replicates |
Should the cluster bootstrap replicates be outputted as well? |
p.values |
A vector of estimated p-values. |
ci |
A matrix of confidence intervals, reported when null is not imposed. |
Original code to estimate p-values and ci from GLM wild cluster robust bootstrap-t statistics by Justin Esarey: <https://cran.r-project.org/web/packages/clusterSEs/clusterSEs.pdf> modified in the following ways. 1. Modified code to be based on Webb (2013) (rather than be based on CGM (2004) 2. included an option to obtain bootstrap p-values for specific variables (when null hypothesis is imposed) to reduce run-time. Previously bootstrap p-values were calculated for every variable in the model. 3. Changed the way results are printed (when report = TRUE) to reduce run-time. Results reported look less pretty now. Overall, run time for reduced from 12 mins to 18 secs.
Savita Ramaprasad
Esarey, Justin, and Andrew Menger. 2017. "Practical and Effective Approaches to Dealing with Clustered Data."<c2><a0>Political Science Research and Methods<c2><a0>forthcoming: 1-35. <URL:http://jee3.web.rice.edu/cluster-paper.pdf>.
Reworking wild bootstrap based inference for clustered errors (No. 1315). Queen's Economics Department Working Paper
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.