Autoregressive Models

For a hands-on example, check out the tutorial Building autoregressive models.

GaussianMarkovRandomFields.generate_car_modelFunction
generate_car_model(W::SparseMatrixCSC, ρ::Real; σ=1.0, μ=nothing)

Generate a conditional autoregressive model (CAR) in GMRF form from an adjacency matrix.

Input

  • W – Adjacency / weight matrix. Specifies the conditional dependencies between variables
  • ρ – Weighting factor of the inter-node dependencies. Fulfills 0 < ρ < 1.
  • σ – Variance scaling factor (i.e. output scale)
  • μ – Mean vector

Output

A GMRF with the corresponding mean and precision.

Algorithm

The CAR is constructed using a variant of the graph Laplacian, i.e.

\[Q = \sigma^{-1} \cdot (W 1 - ρ \cdot W).\]

source