% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/forecast.R
\name{forecast_arvind}
\alias{forecast_arvind}
\title{Monte Carlo Forecasting for Arvind Models}
\usage{
forecast_arvind(
  fit,
  newdata_sims = NULL,
  h = 120,
  nsim = 5000,
  covariate_models = NULL,
  seed = 123
)
}
\arguments{
\item{fit}{an object of class \code{"ArvindFit"}.}

\item{newdata_sims}{optional named list of pre-computed covariate
simulation matrices, each of dimension \code{h x nsim}.}

\item{h}{integer; forecast horizon in time steps (default: 120).}

\item{nsim}{integer; number of Monte Carlo replicates (default: 5000).}

\item{covariate_models}{optional list of fitted SARIMA models for
covariates (auto-fitted if \code{NULL}).}

\item{seed}{integer; random seed for reproducibility (default: 123).}
}
\value{
A list with components:
\describe{
\item{sims}{matrix (\code{h x nsim}); full simulation matrix.}
\item{mean}{numeric vector length \code{h}; mean forecast.}
\item{median}{numeric vector length \code{h}; median forecast.}
\item{lo80}{numeric vector; lower 80 percent prediction interval.}
\item{hi80}{numeric vector; upper 80 percent prediction interval.}
\item{lo95}{numeric vector; lower 95 percent prediction interval.}
\item{hi95}{numeric vector; upper 95 percent prediction interval.}
}
}
\description{
Generates Monte Carlo forecasts with 80 percent and 95 percent prediction
intervals for any fitted \code{ArvindFit} model. Covariates are forecast
using SARIMA models (via the \pkg{forecast} package) if not supplied.
}
\examples{
\donttest{
dat <- simulate_arvind_data(n = 50, seed = 1)
m1 <- fit_rw1(Y ~ X1 + X2 + X3, dat, seed = 42)
fc <- forecast_arvind(m1, h = 12, nsim = 100, seed = 42)
head(fc$mean)
}

}
\seealso{
\code{\link[=fit_rw1]{fit_rw1()}}, \code{\link[=diagnostics_arvind]{diagnostics_arvind()}}, \code{\link[=cv_arvind]{cv_arvind()}}
}
