BIARphikalman {iAR}R Documentation

Minus Log Likelihood of the BIAR Model

Description

This function return the negative log likelihood of the BIAR process given specific values of phiR and phiI

Usage

BIARphikalman(yest, phiValues, y1, y2, t, yerr1, yerr2, zeroMean = TRUE)

Arguments

yest

An array with the estimate of a missing value in one or both time series of the bivariate process. This function recognizes a missing value with a NA. If the bivariate time series does not have a missing value, this value does not affect the computation of the likelihood.

phiValues

An array with the parameters of the BIAR model. The elements of the array are, in order, the real (phiR) and the imaginary (phiI) part of the coefficient of BIAR model.

y1

Array with the observations of the first time series of the BIAR process.

y2

Array with the observations of the second time series of the BIAR process.

t

Array with the irregular observational times.

yerr1

Array with the measurements error standard deviations of the first time series of the BIAR process.

yerr2

Array with the measurements error standard deviations of the second time series of the BIAR process.

zeroMean

logical; if TRUE, the array y has zero mean; if FALSE, y has a mean different from zero.

Value

Value of the negative log likelihood evaluated in phiR and phiI.

References

Elorrieta F, Eyheramendy S, Palma W, Ojeda C (2021). “A novel bivariate autoregressive model for predicting and forecasting irregularly observed time series.” Monthly Notices of the Royal Astronomical Society, 505(1), 1105–1116. ISSN 0035-8711, doi: 10.1093/mnras/stab1216, https://academic.oup.com/mnras/article-pdf/505/1/1105/38391762/stab1216.pdf.

See Also

gentime, BIARsample

Examples

n=300
set.seed(6714)
st<-gentime(n)
x=BIARsample(n=n,phiR=0.9,phiI=0.3,st=st)
y=x$y
y1=y[1,]
y2=y[2,]
yerr1=rep(0,n)
yerr2=rep(0,n)
BIARphikalman(phiValues=c(0.8,0.2),y1=y1,y2=y2,t=st,yerr1=yerr1,yerr2=yerr2,yest=c(0,0))

[Package iAR version 1.2.0 Index]