Autoregressive order 2 - AR(2) precision matrix generator

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)
#> Error in t.default(R): argument is not a matrix
x <- INLA::inla.qsample(1, Q, 
  constr = list(A = matrix(1, ncol = nrow(Q)), e = 0))
#> Error in eval(expr, envir, enclos): object 'Q' not found
plot(x, type = 'l')
#> Error in eval(expr, envir, enclos): object 'x' not found