% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/svp_information_criteria.R
\name{svp_AR_order}
\alias{svp_AR_order}
\title{AR-order selection sweep for SV(p)}
\usage{
svp_AR_order(
  y,
  pmax = 6L,
  J = 10L,
  leverage = FALSE,
  errorType = "Gaussian",
  rho_type = "pearson",
  del = 1e-10,
  trunc_lev = TRUE,
  wDecay = FALSE,
  logNu = FALSE,
  sigvMethod = "factored",
  winsorize_eps = 0L,
  filter_method = "mixture",
  proxy = c("bayes_optimal", "u"),
  K = 7L,
  M = 1000L,
  seed = 42L,
  criteria = c("BIC_Kalman", "AIC_Kalman", "BIC_HR", "AIC_HR")
)
}
\arguments{
\item{y}{Numeric vector. Observed returns.}

\item{pmax}{Integer. Maximum AR order to consider. Default 6.}

\item{J}{Integer. Winsorizing parameter passed to \code{\link{svp}}.
Default 10.}

\item{leverage}{Logical. Whether to estimate leverage. Default
\code{FALSE}.}

\item{errorType}{Character. \code{"Gaussian"}, \code{"Student-t"}, or
\code{"GED"}. Default \code{"Gaussian"}.}

\item{rho_type, del, trunc_lev, wDecay, logNu, sigvMethod, winsorize_eps}{Other
arguments passed to \code{\link{svp}}.}

\item{filter_method}{Character. Filter method for \code{*_Kalman}
criteria. Default \code{"mixture"}.}

\item{proxy}{Character. Leverage proxy. Default \code{"bayes_optimal"}
for IC consistency under Student-t leverage. See \code{\link{svp_IC}}.}

\item{K, M, seed}{Filter arguments passed to \code{\link{filter_svp}}.}

\item{criteria}{Character vector of criteria to compute. Default
returns the four recommended criteria: \code{c("BIC_Kalman",
"AIC_Kalman", "BIC_HR", "AIC_HR")}. See \code{\link{svp_IC}} for the
full set of eight valid names and the rationale for each opt-in
criterion.}
}
\value{
A list with components:
\describe{
  \item{IC}{Numeric matrix, one row per criterion, one column per
    candidate \code{p} in \code{1:pmax}.}
  \item{argmin}{Named integer vector, one entry per criterion, giving the
    selected \code{p}. \code{NA_integer_} if all entries for that
    criterion are \code{NA}.}
  \item{fits}{List of length \code{pmax} containing the fitted
    \code{svp()} objects (or \code{NULL} if a fit failed).}
}
}
\description{
Convenience wrapper around \code{\link{svp_IC}}: fits \code{\link{svp}}
at each \code{p = 1, ..., pmax} and returns a matrix of information
criteria along with the argmin per criterion.
}
\examples{
\donttest{
set.seed(1)
y <- sim_svp(2000, phi = 0.95, sigy = 1, sigv = 0.5)$y
res <- svp_AR_order(y, pmax = 4)
res$IC
res$argmin
}

}
\seealso{
\code{\link{svp_IC}}, \code{\link{svp}}, \code{\link{filter_svp}}
}
