ar: ngme AR(p) model specification

View source: R/models.R

arR Documentation

ngme AR(p) model specification

Description

ngme AR(p) model specification

Usage

ar(mesh = NULL, rho = NULL, order = NULL)

Arguments

mesh

integer vector or inla.mesh.1d object, index to build the mesh

rho

vector of AR coefficients of length p (should satisfy stationarity conditions)

order

integer, the AR order p. If provided and rho is not specified, rho will be initialized as rep(0, p)

Value

ngme_operator object

Examples

# AR(2) model with specified coefficients
ar(c(1:10), rho = c(0.5, -0.3))
# AR(3) model with specified coefficients
ar(c(1:10), rho = c(0.4, 0.2, -0.1))
# AR(2) model with default coefficients (zeros)
ar(c(1:10), order = 2)
# AR(3) model with specified order and coefficients
ar(c(1:10), order = 3, rho = c(0.4, 0.2, -0.1))

ngme2 documentation built on May 20, 2026, 9:10 a.m.