BIARsample {iAR} | R Documentation |
Simulate from a BIAR Model
Description
Simulates a BIAR Time Series Model
Usage
BIARsample(n, st, phiR, phiI, delta1 = 0, delta2 = 0, rho = 0)
Arguments
n |
Length of the output bivariate time series. A strictly positive integer. |
st |
Array with observational times. |
phiR |
Autocorrelation coefficient of BIAR model. A value between -1 and 1. |
phiI |
Crosscorrelation coefficient of BIAR model. A value between -1 and 1. |
delta1 |
Array with the measurements error standard deviations of the first time series of the bivariate process. |
delta2 |
Array with the measurements error standard deviations of the second time series of the bivariate process. |
rho |
Contemporary correlation coefficient of BIAR model. A value between -1 and 1. |
Details
The chosen phiR and phiI values must satisfy the condition $|phiR + i phiI| < 1$.
Value
A list with the following components:
y Matrix with the simulated BIAR process.
t Array with observation times.
Sigma Covariance matrix of the process.
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
Examples
n=300
set.seed(6714)
st<-gentime(n)
x=BIARsample(n=n,phiR=0.9,phiI=0.3,st=st)
plot(st,x$y[1,],type='l')
plot(st,x$y[2,],type='l')
x=BIARsample(n=n,phiR=-0.9,phiI=-0.3,st=st)
plot(st,x$y[1,],type='l')
plot(st,x$y[2,],type='l')