% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projection.R
\name{choose.next}
\alias{choose.next}
\title{Next variable to enter the current submodel}
\usage{
choose.next(x, sigma2, fit, fitp, chosen, is.logistic)
}
\arguments{
\item{x}{Design matrix.}
\item{sigma2}{Residual variance (1 for logistic regression).}
\item{fit}{Matrix of fitted values for the full model.}
\item{fitp}{Matrix of fitted values for the projected model.}
\item{chosen}{Vector of indices of the columns of \code{x} in the current submodel.}
\item{is.logistic}{Set to \code{TRUE} for a logistic regression model.}
}
\description{
Return the index of the variable that should be added to the current model
according to the smallest KL-divergence (linear regression) or the largest
score test (logistic regression).
}
\keyword{internal}