{ "cells": [ { "cell_type": "markdown", "id": "intro", "metadata": {}, "source": [ "# Choose a prior for statement preferences\n", "\n", "Check how much preference an intercept prior puts on any one ranking\n", "before fitting the model. Compare two intercept priors on the same triplet\n", "design." ] }, { "cell_type": "markdown", "id": "response-model", "metadata": {}, "source": [ "## Link the intercept prior to ranking probabilities\n", "\n", "For statement $j$, let $b_j$ be the intercept, $a_j>0$ the loading\n", "magnitude, $q_j$ the keying sign and $\\theta_{p,t(j)}$ the score of person\n", "$p$ on the statement's trait. [MGPPM](mgppm_workflow.ipynb#model-the-ranking-patterns)\n", "uses statement utility $u_{pj}=q_j a_j\\theta_{p,t(j)}-b_j$. The order\n", "$A>B>C$ has weight $\\exp(2u_{pA}+u_{pB})$, and its probability is that\n", "weight divided by the sum over the six orders. Large differences in\n", "intercepts can make one order much more likely than the rest.\n", "\n", "The two models in this prior predictive comparison use the same design\n", "and reference intercepts. They differ only in the scale of the prior\n", "for free intercepts:\n", "\n", "$$\n", "b_j\\sim\\mathcal N(0,\\sigma^2),\\qquad\n", "\\sigma=2\\ \\text{(default)}\\quad\\text{or}\\quad\\sigma=0.5\\ \\text{(narrower)}.\n", "$$\n", "\n", "In each simulated set of answers, let $n_r$ be the count for order $r$\n", "in block B1 and $n$ the total count. The check uses\n", "\n", "$$\n", "T=\\max_r(n_r/n).\n", "$$\n", "\n", "This is the observed share for the most common order in that simulated\n", "dataset. It is $1/6$ for six equally frequent orders and 1 when everybody\n", "gives the same order." ] }, { "cell_type": "markdown", "id": "data-intro", "metadata": {}, "source": [ "## Use one design for both priors\n", "\n", "Use 80 respondents from the bundled MGPPM simulation. B1 presents three\n", "statements, giving six possible complete orders." ] }, { "cell_type": "code", "execution_count": 1, "id": "data", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | block_id | \n", "position | \n", "statement_id | \n", "trait | \n", "keying | \n", "
|---|---|---|---|---|---|
| 0 | \n", "B1 | \n", "1 | \n", "S1 | \n", "theta1 | \n", "1 | \n", "
| 1 | \n", "B1 | \n", "2 | \n", "S2 | \n", "theta2 | \n", "1 | \n", "
| 2 | \n", "B1 | \n", "3 | \n", "S3 | \n", "theta3 | \n", "1 | \n", "