Cluster robust wild bootstrap for linear models {Rfast2} | R Documentation |
Cluster robust wild bootstrap for linear models
Description
Cluster robust wild bootstrap for linear models.
Usage
wild.boot(y, x, cluster, ind = NULL, R = 999, parallel = FALSE)
Arguments
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. |
Details
A linear regression model for clustered data is fitted. For more information see Chapter 4.21 of Hansen (2019).
Value
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.
Author(s)
Michail Tsagris and Stefanos Fafalios.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Stefanos Fafalios stefanosfafalios@gmail.com.
References
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.
See Also
Examples
y <- rnorm(200)
id <- sample(1:20, 200, replace = TRUE)
x <- matrix( rnorm(200 * 3), ncol = 3 )
wild.boot(y, x, cluster = id)