Auxiliary models

Auxiliary models

Some simple auxiliary models are provided as building blocks.

Multivariate normal model

Model observations as drawn from a multivariate normal distribution. See MvNormalData for summarizing data for estimation and likelihood calculations.

source
MvNormalData(n, m, S)

Multivariate normal model summary statistics with n observations, mean m and sample covariance S. Only saves the summary statistics.

Usage

Use MvNormalData(X, [wv]) to construct from data.

source
MvNormalData(X)

Multivariate normal summary statistics from observations (each row of X is an observation).

source
MvNormalData(X, wv)

Multivariate normal summary statistics from observations (each row of X is an observation), with weights.

source
MvNormalParams(μ, Σ)

Parameters for the multivariate normal model $x ∼ MvNormal(μ, Σ)$.

source

Ordinary least squares model

Model data with a scalar- or vector-valued ordinary least squares regression. See OLSData for wrapping data.

source
OLSData(Y, X)

Ordinary least squares with dependent variable Y and design matrix X.

Either

  1. $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

  2. $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.

source
OLSParams(B, Σ)

Maximum likelihood estimated parameters for an OLS regression. See OLSData.

source
add_intercept(X)

Add an intercept to a matrix or vector of covariates.

source