% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{companionMat}
\alias{companionMat}
\title{Construct Companion Matrix for AR(p) Process}
\usage{
companionMat(phi, p, q)
}
\arguments{
\item{phi}{Numeric vector of AR coefficients (length p).}

\item{p}{Integer. Order of the AR process.}

\item{q}{Integer. Dimension of each block (typically 1 for univariate).}
}
\value{
A \code{(q*p) x (q*p)} companion matrix.
}
\description{
Builds the companion matrix representation for an AR(p) process, which is
used in the state-space formulation of SV(p) models.
}
\keyword{internal}
