% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reconc_t.R
\name{.compute_naive_cov}
\alias{.compute_naive_cov}
\title{Estimate covariance from naive or seasonal-naive residuals}
\usage{
.compute_naive_cov(y_train, freq = NULL, criterion = "RSS")
}
\arguments{
\item{y_train}{Multivariate time series object or numeric matrix of historical
observations, with dimensions \verb{T x n} (rows are time points, columns are series).}

\item{freq}{Positive integer seasonal frequency (optional).
If not provided and \code{y_train} is a multivariate time series, the frequency
of the data is used.}

\item{criterion}{Character string used when \code{freq > 1} to choose residuals.
Supported values are \code{"RSS"} (default) and \code{"seas-test"}.
\code{"RSS"} chooses the method with the lower residual sum of squares (RSS),
while \code{"seas-test"} uses a statistical test for seasonality (requires \code{forecast} package).}
}
\value{
A numeric \verb{n x n} shrinkage covariance matrix estimated with
\code{\link[=schaferStrimmer_cov]{schaferStrimmer_cov()}}.
}
\description{
Estimates via shrinkage the covariance matrix of the residuals of the naive
or seasonal naive forecasts.
If the frequency of the time series is > 1, the function chooses between the
two methods series-by-series according to a selection criterion.
If the frequency is 1 or is not provided, only the naive residuals are used.
}
\seealso{
\code{\link[=schaferStrimmer_cov]{schaferStrimmer_cov()}}, \code{\link[=reconc_t]{reconc_t()}}
}
\keyword{internal}
