Auxiliary models
Some simple auxiliary models are provided as building blocks.
Multivariate normal model
IndirectLikelihood.MvNormalModel
— Type.Model observations as drawn from a multivariate normal distribution. See MvNormalData
for summarizing data for estimation and likelihood calculations.
IndirectLikelihood.MvNormalData
— Type.MvNormalData(n, m, S)
Multivariate normal model summary statistics with n
observations, mean m
and sample covariance S
. Only saves the summary statistics.
Use MvNormalData(X, [wv])
to construct from data.
MvNormalData(X)
Multivariate normal summary statistics from observations (each row of X
is an observation).
MvNormalData(X, wv)
Multivariate normal summary statistics from observations (each row of X
is an observation), with weights.
MvNormalParams(μ, Σ)
Parameters for the multivariate normal model $x ∼ MvNormal(μ, Σ)$.
Construct using MLE(::MvNormalModel, ::MvNormalData)
.
Ordinary least squares model
IndirectLikelihood.OLSModel
— Type.Model data with a scalar- or vector-valued ordinary least squares regression. See OLSData
for wrapping data.
IndirectLikelihood.OLSData
— Type.OLSData(Y, X)
Ordinary least squares with dependent variable Y
and design matrix X
.
Either
$Y$ is an $n×m$ matrix, then $Y = X B + E$ where $X$ is a $n×k$ matrix, $B$ is a $k×m$ parameter matrix, and $Eᵢ ∼ N(0, Σ)$ is IID with $m×m$ variance matrix $Σ$ (multivariate linear regression), or
$Y$ is a length $n$ vector, then $Y = X β + ϵ$, where $X$ is a $n×k$ matrix, $β$ is a parameter vector of $k$ elements, and $ϵᵢ∼N(0,σ)$ where $σ$ is the variance of the normal error.
See also add_intercept
.
IndirectLikelihood.OLSParams
— Type.OLSParams(B, Σ)
Maximum likelihood estimated parameters for an OLS regression. See OLSData
.
IndirectLikelihood.add_intercept
— Function.add_intercept(X)
Add an intercept to a matrix or vector of covariates.