CIARforecast: Forecast from CIAR model

View source: R/RcppExports.R

CIARforecastR Documentation

Forecast from CIAR model

Description

Forecast from models fitted by CIARkalman

Usage

CIARforecast(phiR, phiI, y1, st, tAhead)

Arguments

phiR

Real part of the phi coefficient of CIAR model.

phiI

Imaginary part of the phi coefficient of CIAR model.

y1

Array with the time series observations.

st

Array with the observational times.

tAhead

The time ahead for which the forecast is required.

Value

A list with the following components:

  • fitted Fitted values by the CIAR model.

  • forecast Point forecast in the time ahead required.

  • Lambda Lambda value estimated by the CIAR model at the last time point.

  • Sighat Covariance matrix estimated by the CIAR model at the last time point.

References

\insertRef

Elorrieta_2019iAR

See Also

CIARsample, CIARkalman, CIARfit

Examples

#Simulated Data
n=100
set.seed(6714)
st<-gentime(n)
x=CIARsample(n=n,phiR=0.9,phiI=0,st=st,c=1)
y=x$y
y1=y/sd(y)
n=length(y1)
p=trunc(n*0.99)
ytr=y1[1:p]
yte=y1[(p+1):n]
str=st[1:p]
ste=st[(p+1):n]
tahead=ste-str[p]

ciar=CIARkalman(y=ytr,t=str)
forCIAR<-CIARforecast(ciar$phiR,ciar$phiI,ytr,str,tAhead=tahead)

iAR documentation built on Nov. 25, 2022, 1:06 a.m.

Related to CIARforecast in iAR...