forecast: acp Forecast

Description Usage Arguments Value Author(s) Examples

View source: R/acp.R

Description

Recursive forecasting of an acp model.

Usage

1
forecast(object, sample, ydata,...)

Arguments

object

an object of class "acp", i.e., a fitted model.

sample

the point of sample from which the recursive forecast process will begin.

ydata

a data frame containing the real values of the dependent varible.

...

not used.

Value

a series of forecasted values

Author(s)

Siakoulis Vasileios

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(polio)

#Create time trend and seasonality variables
trend=(1:168/168)
cos12=cos((2*pi*(1:168))/12)
sin12=sin((2*pi*(1:168))/12)
cos6=cos((2*pi*(1:168))/6)
sin6=sin((2*pi*(1:168))/6)
polio_data<-data.frame(polio, trend , cos12, sin12, cos6, sin6)

mod1 <- acp(polio~-1+trend+cos12+sin12+cos6+sin6,data=polio_data)
fitfor<-forecast(mod1,158,polio_data[[1]])

mpiktas/acp documentation built on May 19, 2019, 11:40 a.m.