CIARforecast {iAR} | R 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
Elorrieta, F, Eyheramendy, S, Palma, W (2019). “Discrete-time autoregressive model for unequally spaced time-series observations.” A&A, 627, A120. doi: 10.1051/0004-6361/201935560, https://doi.org/10.1051/0004-6361/201935560.
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)