R/forecast.dfpca.R

Defines functions forecast.dfpca

forecast.dfpca <- function(object, h = 10, ...)
{
    k <- object$order
    y <- array(NA, dim = c(h, k))
    for(ik in 1:k)
    {
        y[, ik] <- forecast(auto.arima(object$coef[, ik]), h = h)$mean
    }
    f <- object$basis[, 2: (k+1)]%*%t(y) + object$basis[,1]
    return(f)
}

Try the ftsa package in your browser

Any scripts or data that you put into this service are public.

ftsa documentation built on Sept. 11, 2023, 5:09 p.m.