Indicator Function

For

\begin{equation} Y_{i} = \beta{1} + \beta_{2}I_{2}[\mathbf{x}{i}] + \ldots + \beta{j}I_{j}[\mathbf{x}{i}] + \ldots + \beta{g}I_{g}[\mathbf{x}{i}] + \epsilon{i}, \quad j \in 2, \ldots, g (#eq:0001) \end{equation}

the term

\begin{equation} I_{j}[\mathbf{x}{i}] = \begin{cases} 1 & \text{if} \: Y{i} \in \text{group} \: j \ \nonumber 0 & \text{if} \: Y_{i} \notin \text{group} \: j (#eq:0002) \end{cases} \end{equation}

The term $I_{1}[\mathbf{x}{i}] = 1$ $\rightarrow$ $\beta{1}$ is the reference/default value of $Y_{i}$ if - at a bare minimum - $Y_{i}$ can'tbe assigned to any of the identified groups.

\clearpage

Mixed Effects

In the case of the mixed effects model

\begin{equation} Y = X\mathbf{\beta} + Z\mathbf{b} + \mathbf{\epsilon} (#eq:0003) \end{equation}

wherein

$$\mathbf{b} \sim \mathcal{N}(\mathbf{0}, \Sigma_{\mathbf{b}})$$ $$\mathbf{\epsilon} \sim \mathcal{N}(\mathbf{0}, \Sigma_{\mathbf{\epsilon}})$$

\vspace{20pt}

The Conditional Distribution

\vspace{10pt}

Conditional Expectation

The expectation of the conditional distribution $Y \vert \mathbf{b}$ is

\begin{align} \mathbb{E}[Y \vert \mathbf{b}] & = \mathbb{E}\Big[X\mathbf{\beta} + Z\mathbf{b} + \mathbf{\epsilon} \; \Big{\vert} \; \mathbf{b}\Big] \ & = \mathbb{E}[X\mathbf{\beta}\vert\mathbf{b}] + \mathbb{E}[Z\mathbf{b}\vert\mathbf{b}] + \mathbb{E}[\mathbf{\epsilon}\vert\mathbf{b}] \ & = \mathbb{E}[X\mathbf{\beta}] + Z\mathbb{E}[\mathbf{b}\vert\mathbf{b}] + \mathbb{E}[\mathbf{\epsilon}] \ & = X\mathbf{\beta} + Z\mathbf{b} + 0 \ & = X\mathbf{\beta} + Z\mathbf{b} (#eq:0004) \end{align}

because

and

\clearpage

Conditional Variance

In terms of variance

\begin{align} var\Big( X\mathbf{\beta} + Z\mathbf{b} + \mathbf{\epsilon} \; \Big{\vert} \; \mathbf{b} \Big) & = var(X\mathbf{\beta} \: \vert \: \mathbf{b}) + var(Z\mathbf{b} \: \vert \: \mathbf{b}) + var(\mathbf{\epsilon} \: \vert \: \mathbf{b}) \ & = \mathbb{E}\Bigg[ \Big(X\mathbf{\beta} - \mathbb{E}[X\mathbf{\beta} \: \vert \: \mathbf{b}]\Big)^{T} \Big(X\mathbf{\beta} - \mathbb{E}[X\mathbf{\beta} \: \vert \: \mathbf{b}]\Big) \; \Big{\vert} \; \mathbf{b} \Bigg] \ \nonumber & \quad + \mathbb{E}\Bigg[ \Big(Z\mathbf{b} - \mathbb{E}[Z\mathbf{b} \: \vert \: \mathbf{b}]\Big)^{T} \Big(Z\mathbf{b} - \mathbb{E}[Z\mathbf{b} \: \vert \: \mathbf{b}]\Big) \; \Big{\vert} \; \mathbf{b} \Bigg] \ \nonumber & \quad \quad + \mathbb{E}\Bigg[ \Big(\mathbf{\epsilon} - \mathbb{E}[\mathbf{\epsilon} \: \vert \: \mathbf{b}]\Big)^{T} \Big(\mathbf{\epsilon} - \mathbb{E}[\mathbf{\epsilon} \: \vert \: \mathbf{b}]\Big) \; \Big{\vert} \; \mathbf{b} \Bigg] \ & = \mathbb{E}\Bigg[ \Big(X\mathbf{\beta} - X\mathbf{\beta}\Big)^{T}\Big(X\mathbf{\beta} - X\mathbf{\beta}\Big) \; \Big{\vert} \; \mathbf{b} \Bigg] \ \nonumber & \quad + \mathbb{E}\Bigg[ \Big(Z\mathbf{b} - Z\mathbf{b}\Big)^{T}\Big(Z\mathbf{b} - Z\mathbf{b}\Big) \; \Big{\vert} \; \mathbf{b} \Bigg] \ \nonumber & \quad \quad + \mathbb{E}\Bigg[ \Big(\mathbf{\epsilon} - \mathbf{0}\Big)^{T}\Big(\mathbf{\epsilon} - \mathbf{0}\Big) \; \Big{\vert} \; \mathbf{b} \Bigg] \ & = \mathbb{E}[\mathbf{0} \: \vert \: \mathbf{b}] + \mathbb{E}[\mathbf{0} \: \vert \: \mathbf{b}] + \mathbb{E}[\mathbf{\epsilon}^{\text{\tiny{T}}}\mathbf{\epsilon} \: \vert \: \mathbf{b}] \ & = \mathbb{E}[\mathbf{\epsilon}^{\text{\tiny{T}}}\mathbf{\epsilon}] \ & = var(\mathbf{\epsilon}) = \Sigma (#eq:0005) \end{align}

Noting that

and

and

\begin{align} var(\mathbf{\epsilon}) & = \mathbb{E}[\mathbf{\epsilon}^{\text{\tiny{T}}}\mathbf{\epsilon}] - \mathbb{E}[\mathbf{\epsilon}]^2 \ \nonumber & = \mathbb{E}[\mathbf{\epsilon}^{\text{\tiny{T}}}\mathbf{\epsilon}] (#eq:0006) \end{align}

\vspace{20pt}

Distribution

By \cref{eq:0004} & \cref{eq:0005}

\begin{equation} Y \vert \mathbf{b} \sim \mathcal{N}\big( X\mathbf{\beta} + Z\mathbf{b}, \Sigma \big) \end{equation}

\vspace{35pt}

Marginal

\begin{align} var(X\mathbf{\beta} + Z\mathbf{b} + \mathbf{\epsilon}) & = var(X\mathbf{\beta}) + var(Z\mathbf{b}) + var(\mathbf{\epsilon}) \ & = 0 + Zvar(\mathbf{b})Z^{T} + \Sigma_{\epsilon} \ & = Z \Sigma_{\mathbf{b}} Z^{T} + \Sigma_{\mathbf{\epsilon}} \end{align}

because



premodelling/mixed documentation built on April 25, 2022, 6:27 a.m.