From acd4dc3d07992c93f08b0cdbd05a3c0205bb7ba5 Mon Sep 17 00:00:00 2001 From: Brian Ward Date: Mon, 3 Jun 2024 11:53:56 -0400 Subject: [PATCH] Latex fixes --- src/header.tex | 1 + src/stan-users-guide/finite-mixtures.qmd | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/header.tex b/src/header.tex index 314c7362f..83127ee80 100644 --- a/src/header.tex +++ b/src/header.tex @@ -3,6 +3,7 @@ \usepackage{mathpazo} \usepackage[scale=0.9]{sourcecodepro} \usepackage{amssymb} +\usepackage{mathtools} \linespread{1.03} \usepackage{titlesec} diff --git a/src/stan-users-guide/finite-mixtures.qmd b/src/stan-users-guide/finite-mixtures.qmd index 226639075..e6b3bfdd5 100644 --- a/src/stan-users-guide/finite-mixtures.qmd +++ b/src/stan-users-guide/finite-mixtures.qmd @@ -435,7 +435,7 @@ $$ As with other event probabilities, this can be calculated in the generated quantities block either by sampling $z_i$ and $z_j$ and using the indicator function on their equality, or by computing the -term inside the integral as a generated quantity. As with posterior +term inside the integral as a generated quantity. As with posterior predictive distribute, working in expectation is more statistically efficient than sampling. @@ -575,12 +575,12 @@ The hurdle model is similar to the zero-inflated model, but more flexible in that the zero outcomes can be deflated as well as inflated. Given the probability $\theta$ and the intensity $\lambda$, the distribution for $y_n$ can be written as -$$ +\[ \begin{align*} y_n & = 0 \quad\text{with probability } \theta, \text{ and}\\ y_n & \sim \textsf{Poisson}_{x\neq 0}(y_n \mid \lambda) \quad\text{with probability } 1-\theta, \end{align*} -$$ +\] Where $\textsf{Poisson}_{x\neq 0}$ is a truncated Poisson distribution, truncated at $0$. The corresponding likelihood function for the hurdle model is