% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/models.R
\name{ar}
\alias{ar}
\title{ngme AR(p) model specification}
\usage{
ar(mesh = NULL, rho = NULL, order = NULL)
}
\arguments{
\item{mesh}{integer vector or inla.mesh.1d object, index to build the mesh}

\item{rho}{vector of AR coefficients of length p (should satisfy stationarity conditions)}

\item{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
}
\description{
ngme AR(p) model specification
}
\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))
}
