AR2_Q: Autoregressive order 2 - AR(2) precision matrix generator

View source: R/tmbutils.R

AR2_QR Documentation

Autoregressive order 2 - AR(2) precision matrix generator

Description

Autoregressive order 2 - AR(2) precision matrix generator

Usage

AR2_Q(n = 10, sd = 1, rho = c(0.9, 0.05))

Arguments

n

length

sd

standard deviation

rho

two AR2 coefficients

Examples

QQ <- AR2_Q(10)
x <- INLA::inla.qsample(1, Q, 
  constr = list(A = matrix(1, ncol = nrow(Q)), e = 0))
plot(x, type = 'l')

kklot/ktools documentation built on Aug. 13, 2024, 7:08 p.m.