% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nmfkc.ar.R
\name{nmfkc.ar.predict}
\alias{nmfkc.ar.predict}
\title{Forecast future values for NMF-VAR model}
\usage{
nmfkc.ar.predict(x, Y, degree = NULL, n.ahead = 1)
}
\arguments{
\item{x}{An object of class \code{nmfkc} (the fitted model).}

\item{Y}{The historical observation matrix used for fitting (or at least the last \code{degree} columns).}

\item{degree}{Optional integer. Lag order (D). If \code{NULL} (default), it is inferred
from \code{x$A.attr} (when available) or from the dimensions of \code{x$C}.}

\item{n.ahead}{Integer (>=1). Number of steps ahead to forecast.}
}
\value{
A list with components:
\item{pred}{A \eqn{P \times n.ahead} matrix of predicted values. Column names are future time points if time information is available.}
\item{time}{A numeric vector of future time points corresponding to the columns of \code{pred}.}
}
\description{
\code{nmfkc.ar.predict} computes multi-step-ahead forecasts for a fitted NMF-VAR model
using recursive forecasting.

If the fitted model contains time series property information (from \code{nmfkc.ar}),
the forecasted values will have appropriate time-based column names.
}
\examples{
# Forecast AirPassengers
d <- AirPassengers
ar_data <- nmfkc.ar(d, degree = 2)
result <- nmfkc(ar_data$Y, ar_data$A, rank = 1)
pred <- nmfkc.ar.predict(result, Y = matrix(d, nrow = 1), degree = 2, n.ahead = 3)
pred$pred

}
\seealso{
\code{\link{nmfkc}}, \code{\link{nmfkc.ar}}
}
