Learn R Programming

lmtest (version 0.9-5)

reset: RESET Test

Description

Ramsey's RESET test for functional relation.

Usage

reset(formula, power = 2:3, type = c("fitted", "regressor",
  "princomp"), data = list())

Arguments

formula
a symbolic description for the model to be tested.
power
integers. A vector of positive integers indicating the powers of the variables that should be included. By default it is tested for a quadratic or cubic influence of the fitted response.
type
a string indicating whether powers of the fitted response, the regressor variables (factors are left out) or the first principal component of the regressor matrix should be included in the extended model.
data
an optional data frame containing the variables in the model. By default the variables are taken from the environment which reset is called from.

Value

  • An object of class "htest" containing:
    • statistic
    {the test statistic.}
  • p.valuethe corresponding p-value.
  • parameterdegrees of freedom.
  • methoda character string with the method used.
  • data.namea character string with the data name.

Details

RESET test is popular means of diagnostic for correctness of functional form. The basic assumption is that under the alternative, the model can be written by the regression $y = X\beta + Z\gamma + u$. Z is generated by taking powers either of the fitted response, the regressor variables or the first principal component of X. A standard F-Test is then applied to determin whether these additional variables have significant influence. The test statistic under $H_0$ follows an F distribution with parameter degrees of freedom.

Examples can not only be found on this page, but also on the help pages of the data sets bondyield, currencysubstitution, growthofmoney, moneydemand, unemployment, wages.

References

J.B. Ramsey (1969), Tests for Specification Error in Classical Linear Least Squares Regression Analysis. Journal of the Royal Statistical Society, Series B 31, 350--371

W. Kr�mer & H. Sonnberger (1986), The Linear Regression Model under Test. Heidelberg: Physica

See Also

lm

Examples

Run this code
x <- c(1:30)
y1 <- 1 + x + x^2 + rnorm(30)
y2 <- 1 + x + rnorm(30)
reset(y1 ~ x , power=2, type="regressor")
reset(y2 ~ x , power=2, type="regressor")

Run the code above in your browser using DataLab