reset_test: Reset test. Tests the specification of a linear model adding...

Description Usage Arguments Value Examples

View source: R/test_functions.R

Description

Reset test. Tests the specification of a linear model adding and testing powers of fitted values.

Usage

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)
)

Arguments

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.

Value

A 'tibble' with the Wald value, the corresponding pvalue, and the quantiles of the distribution.

Examples

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)

FedericoGarza/lineartestr documentation built on Jan. 31, 2021, 11:11 a.m.