Description Usage Arguments Value Examples
View source: R/test_functions.R
Reset test. Tests the specification of a linear model adding and testing powers of fitted values.
1 2 3 4 5 6 7 | reset_test(
model,
robust = FALSE,
vcov = NULL,
max_power = 3,
quantiles = c(0.9, 0.95, 0.99)
)
|
model |
An existing fit from a model function such as 'lm', 'lfe' and others compatible with 'update'. |
robust |
Use robust 'varcov' matrix. |
vcov |
Particular variance and covariances matrix. |
max_power |
Max power of fitted values to add. |
quantiles |
Vector of quantiles to calculate pvalues. |
A 'tibble' with the Wald value, the corresponding pvalue, and the quantiles of the distribution.
1 2 3 4 5 6 7 8 | x <- 1:10 + rnorm(10)
y <- 1:10
model <- lm(y~x)
r_test <- reset_test(model)
r_test <- reset_test(model, robust = TRUE)
r_test <- reset_test(model, quantiles = c(.97))
r_test <- reset_test(model, max_power = 4)
r_test <- reset_test(model, robust = TRUE, max_power = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.