% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parameters.R
\name{parameter_types}
\alias{parameter_types}
\title{Parameter Types and Constraints in RTMB Models}
\description{
When declaring parameters in the \code{parameters} block using \code{Dim()},
you can specify a \code{type} to automatically apply structural constraints.
These constraints ensure that parameters remain within their valid mathematical
space during estimation.
}
\details{
\strong{Standard Types:}
\itemize{
  \item \code{"vector"}, \code{"matrix"}, \code{"array"}: Standard unconstrained containers.
  Use \code{lower} and \code{upper} for element-wise bounds.
}

\strong{Ordering Constraints:}
\itemize{
  \item \code{"ordered"}: A vector where $x_1 < x_2 < \dots < x_K$.
  \item \code{"positive_ordered"}: A vector where $0 < x_1 < x_2 < \dots < x_K$.
}

\strong{Constrained Vectors:}
\itemize{
  \item \code{"simplex"}: A vector where all elements are >= 0 and sum(x) = 1.
  \item \code{"centered"}: A vector of length K where sum(x) = 0. (Estimated using K-1 degrees of freedom).
}

\strong{Correlation and Covariance Matrices:}
\itemize{
  \item \code{"corr_matrix"}: A symmetric, positive-definite correlation matrix (diagonal elements are 1).
  \item \code{"cov_matrix"}: A symmetric, positive-definite covariance matrix.
  \item \code{"CF_corr"}: The Cholesky factor of a correlation matrix.
  \item \code{"CF_cov"}: The Cholesky factor of a covariance matrix (diagonal elements are positive).
}

\strong{Special Structural Matrices:}
\itemize{
  \item \code{"lower_tri"}: A lower-triangular matrix.
  \item \code{"positive_lower_tri"}: A lower-triangular matrix with positive diagonal elements.
  \item \code{"centered_matrix"}: A matrix where each column sums to zero.
  \item \code{"centered_tri"}: A triangular matrix with column-wise sum-to-zero constraints (often used for identification in factor analysis).
}
}
\seealso{
\code{\link{rtmb_code}}, \code{\link{math_functions}}, \code{\link{distributions}}
}
