https://github.com/cran/lmtest
Raw File
Tip revision: 53970bce858228607f918a60214d8e1969b5a604 authored by Achim Zeileis on 09 September 2020, 04:30:11 UTC
version 0.9-38
Tip revision: 53970bc
resettest.Rd
\name{resettest}
\alias{resettest}
\alias{reset}
\encoding{latin1}
\title{RESET Test}

\description{Ramsey's RESET test for functional form.}

\usage{
resettest(formula, power = 2:3, type = c("fitted", "regressor",
  "princomp"), data = list(), vcov = NULL, \dots)
}

\arguments{
  \item{formula}{a symbolic description for the model to be tested
    (or a fitted \code{"lm"} object).}
 \item{power}{integers. A vector of positive integers indicating
    the powers of the variables that should be included. By default,
    the test is for quadratic or cubic influence of the fitted response.}
 \item{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.}
 \item{data}{an optional data frame containing the variables in the model.
    By default the variables are taken from the environment which \code{resettest}
    is called from.}
 \item{vcov, \dots}{optional arguments to be passed to \code{\link{waldtest}}
    for carrying out the F test.}
}

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

This function was called \code{reset} in previous versions of the package. Please
use \code{resettest} instead.

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

\value{An object of class \code{"htest"} containing:
  \item{statistic}{the test statistic.}
  \item{p.value}{the corresponding p-value.}
  \item{parameter}{degrees of freedom.}
  \item{method}{a character string with the method used.}
  \item{data.name}{a character string with the data name.}
}
\references{

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

W. Krämer & H. Sonnberger (1986),
\emph{The Linear Regression Model under Test}. Heidelberg: Physica

}

\seealso{\code{\link{lm}}}

\examples{
x <- c(1:30)
y1 <- 1 + x + x^2 + rnorm(30)
y2 <- 1 + x + rnorm(30)
resettest(y1 ~ x, power=2, type="regressor")
resettest(y2 ~ x, power=2, type="regressor")
}

\keyword{htest}
back to top