Learn R Programming

irregulAR1 (version 1.0.0)

ar1_cross_cov: Cross-covariance matrix of a stationary Gaussian AR(1) process.

Description

Creates the cross-covariance matrix of an AR(1) process with parameters rho and sigma, observed at (positive) integer times times1 and times2, which may be irregularly spaced. The process is assumed to be in stationarity and to have Gaussian errors.

Usage

ar1_cross_cov(times1, times2, rho, sigma)

Arguments

times1

An vector of positive integers, preferably ordered.

times2

An vector of positive integers, preferably ordered.

rho

A real number strictly less than 1 in absolute value.

sigma

A positive real number.

Value

A matrix with length(times2) rows and length(times1) columns.

Examples

Run this code
# NOT RUN {
times1 <- c(1, 3, 6)
times2 <- c(2, 4, 8:9)
rho <- 0.5
sigma <- 1
ar1_cross_cov(times1, times2, rho, sigma)
# }

Run the code above in your browser using DataLab