Skip to contents

Ramsey RESET test for functional-form misspecification

Usage

ramsey_reset_test(y, X, powers = c(2, 3))

Arguments

y

Response vector.

X

Design matrix (with intercept).

powers

Integer vector of powers of fitted values to add to the auxiliary regression (default c(2, 3)).

Value

A morie_specification_test.

Examples

set.seed(1)
X <- cbind(1, rnorm(60)); y <- drop(X %*% c(1, 2)) + rnorm(60)
str(ramsey_reset_test(y, X), max.level = 1)
#> List of 5
#>  $ name      : chr "RESET"
#>  $ statistic : num 3.44
#>  $ p_value   : num 0.0389
#>  $ df        : int 2
#>  $ conclusion: chr "Reject functional form (p < 0.05): consider nonlinear terms."
#>  - attr(*, "class")= chr [1:2] "morie_specification_test" "list"