Cluster robust wild bootstrap for linear models | R Documentation |
Cluster robust wild bootstrap for linear models.
wild.boot(y, x, cluster, ind = NULL, R = 999, parallel = FALSE)
y |
The dependent variable, a numerical vector with numbers. |
x |
A matrix or a data.frame with the indendent variables. |
cluster |
A vector indicating the clusters. |
ind |
A vector with the indices of the variables for which wild bootstrap p-values will be computed. If NULL (default value), the p-values are computed for each variable. |
R |
The number of bootstrap replicates to perform. |
parallel |
Do you want the process to take place in parallel? If yes, then set this equal to TRUE. |
A linear regression model for clustered data is fitted. For more information see Chapter 4.21 of Hansen (2019).
A matrix with 5 columns, the estimated coefficients of the linear model, their cluster robust standard error, their cluster robust test statistic, their cluster robust p-value, and their cluster robust wild bootstrap p-value.
Michail Tsagris and Stefanos Fafalios.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Stefanos Fafalios stefanosfafalios@gmail.com.
Cameron A. Colin, Gelbach J.B., and Miller D.L. (2008). Bootstrap-Based Improvements for Inference with Clustered Errors. The Review of Economics and Statistics 90(3): 414-427.
gee.reg, cluster.lm
y <- rnorm(200)
id <- sample(1:20, 200, replace = TRUE)
x <- matrix( rnorm(200 * 3), ncol = 3 )
wild.boot(y, x, cluster = id)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.