Skip to content

Instantly share code, notes, and snippets.

@andrewheiss
Created September 16, 2023 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewheiss/94195abdab49e1efb57f0e1d2b3a67ae to your computer and use it in GitHub Desktop.
Save andrewheiss/94195abdab49e1efb57f0e1d2b3a67ae to your computer and use it in GitHub Desktop.
$$
\begin{align}
&\ \textbf{Registered provinces for INGO } i \\
\text{Count of provinces}\ \sim&\ \operatorname{Ordered\,Beta}(\mu_{i_j}, \phi_y, k_{0_y}, k_{1_y}) \\[8pt]
&\ \textbf{Model of outcome average} \\
% Put the huge equation in a nested \begin{aligned}[t] environment so that
% \mathrlap{} can go around it so that the annotations in the priors can be
% aligned closer to the math
\mu_i =&\
\mathrlap{\begin{aligned}[t]
& \beta_0 + \beta_1\ \text{Issue[Arts and culture]} + \beta_2\ \text{Issue[Education]}\ +\\
& \beta_3\ \text{Issue[Industry association]} + \beta_4\ \text{Issue[Economy and trade]}\ + \\
& \beta_5\ \text{Issue[Charity and humanitarian]} + \beta_6\ \text{Issue[General]}\ + \\
& \beta_7\ \text{Issue[Health]} + \beta_8\ \text{Issue[Environment]}\ + \\
& \beta_9\ \text{Issue[Science and technology]} + \beta_{10}\ \text{Local connections}\ + \\
& \beta_{11}\ \text{Years since law took effect} + \beta_{12}\ \text{Year registered}
\end{aligned}}\\[8pt]
&\ \textbf{Priors} \\
\beta_0\ \sim&\ \operatorname{Student\,t}(\nu = 3, \mu = 0, \sigma = 2.5) && \text{Intercept} \\
\beta_{1..12}\ \sim&\ \mathcal{N}(0, 5) && \text{Coefficients} \\
\phi_y\ \sim&\ \operatorname{Exponential}(1 / 100) && \text{Variability in province count} \\
k_{0_y}, k_{1_y}\ \sim&\ \operatorname{Dirichlet}(1, 1, 1) && \text{0–continuous and continuous–1 cutpoints}
\end{align}
$$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment