IARtinterpolation: Interpolation from IAR-T model

View source: R/IARtinterpolation.R

IARtinterpolationR Documentation

Interpolation from IAR-T model

Description

Interpolation of missing values from models fitted by IARt

Usage

IARtinterpolation(x, y, st, nu = 3, yini = 0)

Arguments

x

A given array with the parameters of the IAR-T model. The first element of the array corresponding to the phi parameter and the second element to the scale parameter sigma

y

Array with the time series observations.

st

Array with the irregular observational times.

nu

degrees of freedom

yini

a single value, initial value for the estimation of the missing value of the time series.

Value

A list with the following components:

  • fitted Estimation of a missing value of the IAR-T process.

  • ll Value of the negative log likelihood evaluated in the fitted missing values.

References

\insertRef

Eyheramendy_2018iAR

See Also

gentime, IARtsample, IARt

Examples

set.seed(6714)
n<-100
st<-gentime(n)
y<-IARtsample(n,0.9,st,sigma2=1,nu=3)
model<-IARt(y$y, st=st)
napos=10
y0=y$y
y=y$y
y[napos]=NA
xest=c(model$phi,model$sigma)
yest=IARtinterpolation(x=xest,y=y,st=st)
yest$fitted
mse=(y0[napos]-yest$fitted)^2
print(mse)
plot(st,y,type='l',xlim=c(st[napos-5],st[napos+5]))
points(st,y,pch=20)
points(st[napos],yest$fitted,col="red",pch=20)

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

Related to IARtinterpolation in iAR...