% 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 linear predictor
(or fitted 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 mean linear predictor \eqn{\hat{\eta}_1};
\code{"fitted"} uses the fitted mean values \eqn{\hat{\mu}} on the (0, 1)
scale. For models with parametric link functions, \code{"lp"} is generally
preferred as it operates on an unrestricted 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 p-value of the test,
  \item \code{method}: Description of the test,
  \item \code{data.name}: Model formula.
}
}
\description{
Performs the Ramsey's RESET test for functional form in simplex
regression models.
}
\details{
The RESET test augments the original model by adding powers of the linear
predictor (or fitted values) as additional covariates. Under the null
hypothesis of correct functional form, these additional terms should not
be significant.

The likelihood ratio statistic follows a chi-squared distribution 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}, 31(2), 350-371.
}
\seealso{
\code{\link{simplexreg}}.
}
