Description Usage Arguments Value References Examples

View source: R/test_functions.R

Tests the specification of a linear model using wild-bootstrap.

1 2 3 4 5 6 7 8 9 | ```
dominguez_lobato_test(
model,
distribution = "rnorm",
statistic = "cvm_value",
times = 300,
quantiles = c(0.9, 0.95, 0.99),
verbose = FALSE,
n_cores = 1
)
``` |

`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. |

A list with dataframe results and the ordered values of each bootstrap iteration.

Manuel A. Dominguez and Ignacio N. Lobato (2019). Specification Testing with Estimated Variables. Econometric Reviews.

1 2 3 4 5 6 | ```
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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.