getSigma.VZ: Obtain 1D complete VV-VZ-ZZ or ZZ covariance matrix

View source: R/getSigma.VZ.R

getSigma.VZR Documentation

Obtain 1D complete VV-VZ-ZZ or ZZ covariance matrix

Description

Takes vector of times T and parameters nu, tau, v0, and returns either complete V-Z covariance matrix (if getSigma.VZ) or Z-Z portion of the covariance matrix (if getSigma.ZZ).

Usage

getSigma.VZ(T, nu, tau, t0 = 0)

getSigma.ZZ(T, nu, tau, t0 = 0)

Arguments

T

vector of times (length n).

nu

mean speed.

tau

characteristic time scale.

t0

initial time defaults to 0

Value

either a 2n x 2n VV-VZ-ZZ matrix or n x n ZZ matrix.

Examples


if (requireNamespace('gridExtra',quietly = TRUE)){
T <- cumsum(rexp(10))
# separated into Sigma_vv, Sigma_vz (assymetric), and Sigma_zz
Sigma <- Matrix::Matrix(getSigma.VZ(T, nu=2, tau=5, t0=2))
# Fix this
# i1 <- image(Sigma[1:10,1:10], main="V-V", colorkey=TRUE, useRaster=TRUE)
# i2 <- image(Sigma[11:20,1:10], main="V-Z", colorkey=TRUE, useRaster=TRUE)
# i3 <- image(Sigma[11:20,11:20], main="Z-Z", colorkey=TRUE, useRaster=TRUE)
# grid.arrange(i1,i2,i3,ncol=3)
# And the complete matrix (log transformed):
# image(log(Sigma), colorkey=TRUE, main="log(Sigma)")
}


EliGurarie/smoove documentation built on Aug. 2, 2022, 10:26 p.m.