ar2precision {INLAspacetime} | R Documentation |
Precision matrix for an AR2 model.
Description
Creates a precision matrix as a sparse matrix object
considering the specification stated in Details.
Usage
ar2precision(n, a)
Arguments
n |
the size of the model.
|
a |
a length three vector with the coefficients.
See details.
|
Value
the precision matrix as a sparse matrix object with edge correction.
Details
Let the second order auto-regression model be defined as
a0xt+a1xt−1+a2xt−2=wt,wt N(0,1).
The n times n symmetric precision matrix Q
for x_1, x_2, ..., x_n
has the following non-zero elements:
Q1,1=Qn,n=a02
Q2,2=Qn−1,n−1=a02+a12
Q1,2=Q2,1=Qn−1,n=Qn,n−1=a0a1
Qt,t=q0=a02+a12+a22,t=3,4,...,n−2
Qt,t−1=Qt−1,t=q1=a1(a0+a2),t=3,4,...,n−1
Qt,t−2=Qt−2,t=q2=a2a0,t=3,4,...,n
See Also
ar2cor
Examples
ar2precision(7, c(1, -1.5, 0.9))
[Package
INLAspacetime version 0.1.8
Index]