Closed sriharitn closed 4 years ago
iMAPA does not return forecast. Should we add return function at the end of iMAPA function ?
iMAPA <- function(x, h){ mal <- round(mean(intervals(x)),0) frc <- NULL for (al in 1:mal){ frc <- rbind(frc, rep(SexpS(as.numeric(na.omit(as.numeric(rollapply(tail(x, (length(x) %/% al)*al), al, FUN=sum, by = al)))), 1)/al, h)) } forecast <- colMeans(frc) return(forecast) }
Thanks for mentioning this. Just updated the code.
iMAPA does not return forecast. Should we add return function at the end of iMAPA function ?