% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simplexreg_resettest.R
\name{resettest}
\alias{resettest}
\title{RESET Test for Simplex Regression}
\usage{
resettest(model, dispersion = TRUE, power = 2, type = c("lp", "fitted"))
}
\arguments{
\item{model}{An object of class \code{"simplexregression"}.}

\item{dispersion}{Logical. If \code{TRUE}, includes the augmented terms
in the dispersion submodel as well. Default is \code{TRUE}.}

\item{power}{Integer vector specifying which powers of the fitted mean linear predictor
(or fitted mean values) to include as additional regressors. Default is \code{2}
(squared term only). Use \code{power = 2:3} to include both squared and
cubic terms, following the convention of \code{lmtest::resettest}.}

\item{type}{Character string specifying the base for the augmented terms.
\code{"lp"} (default) uses the fitted mean linear predictor \eqn{\boldsymbol{\hat{\eta}_1}};
\code{"fitted"} uses the fitted mean values \eqn{\boldsymbol{\hat{\mu}}} on the (0, 1)
scale.}
}
\value{
An object of class \code{"htest"} containing:
\itemize{
  \item \code{statistic}: The likelihood ratio test statistic,
  \item \code{parameter}: Degrees of freedom,
  \item \code{p.value}: The \eqn{p}-value of the test,
  \item \code{method}: Description of the test,
  \item \code{data.name}: Model formula.
}
}
\description{
Performs the Ramsey's RESET misspecification test in simplex
regression models.
}
\details{
The RESET test augments the original model by adding powers of the fitted mean linear
predictor (or fitted mean values) as additional covariates. Under the null
hypothesis of correct functional form, these additional terms should not
be significant.

Under H0, the likelihood ratio statistic is asymptotically distributed
as chi-squared with degrees of freedom equal to the number of augmented
terms added (i.e., \code{length(power)} if \code{dispersion = FALSE}, or
\code{2 * length(power)} if \code{dispersion = TRUE}).

If \code{dispersion = TRUE}, the augmented terms are added to both the
mean and dispersion submodels. If \code{FALSE}, they are only added to
the mean submodel.
}
\examples{
data(ReadingSkills, package = "SimplexRegression")
fit <- simplexreg(accuracy ~ dyslexia * iq | dyslexia + iq + I(iq^2),
                 data = ReadingSkills)

# Default: squared linear predictor in both submodels
resettest(fit)

# RESET test only for mean submodel
resettest(fit, dispersion = FALSE)

# Include squared and cubic terms
resettest(fit, power = 2:3)

# Use fitted values instead of linear predictor
resettest(fit, type = "fitted")

}
\references{
Ramsey, J. B. (1969). Tests for specification errors in classical linear
least-squares regression analysis. \emph{Journal of the Royal Statistical
Society: Series B}, \bold{31}(2), 350--371.
\doi{10.1111/j.2517-6161.1969.tb00796.x}
}
\seealso{
\code{\link{simplexreg}}.
}
