dominguez_lobato_test {lineartestr} | R Documentation |
Tests the specification of a linear model using wild-bootstrap.
Description
Tests the specification of a linear model using wild-bootstrap.
Usage
dominguez_lobato_test(
model,
distribution = "rnorm",
statistic = "cvm_value",
times = 300,
quantiles = c(0.9, 0.95, 0.99),
verbose = FALSE,
n_cores = 1
)
Arguments
model |
An existing fit from a model function such as 'lm', 'lfe' and others compatible with 'update'. |
distribution |
Type of noise added to residuals, ej 'rnorm' or 'rrademacher'. |
statistic |
Type of statistic to be used, can be one of 'cvm_value' or 'kmv_value'. |
times |
Number of bootstrap samples. |
quantiles |
Vector of quantiles to calculate pvalues. |
verbose |
TRUE to print each bootstrap iteration. |
n_cores |
Number of cores to be used. |
Value
A list with dataframe results and the ordered values of each bootstrap iteration.
References
Manuel A. Dominguez and Ignacio N. Lobato (2019). Specification Testing with Estimated Variables. Econometric Reviews.
Examples
x <- 1:10 + rnorm(10)
y <- 1:10
model <- lm(y~x)
dl_test <- dominguez_lobato_test(model)
dl_test <- dominguez_lobato_test(model, distribution = "rmammen_point", statistic = "kmv_value")
dl_test <- dominguez_lobato_test(model, times = 100)
[Package lineartestr version 1.0.0 Index]