Technical Notes

Users will be able to fit the edstan models without full knowledge of the technical details, though these are provided in this section. All that is really needed for interpreting results is to know the meanings assigned to the Greek letters.

Notation

Variables and parameters are similar across edstan models. The variables used are:

  • \(i = 1 \ldots I\) indexes items.

  • \(j = 1 \ldots J\) indexes persons.

  • \(m_i\) is simultaneously the maximum score and the number of step difficulty parameters for item $i$ for partial credit models. Alternatively, \(m\) is the same across all items for rating scale models.

  • \(s = 1 \ldots m_i\) or \(s = 1 \ldots m\) indexes steps within items.

  • \(y_{ij}\) is the scored response of person \(j\) to item \(i\). The lowest score for items must be zero (except for rating scale models).

The parameters used are:

  • For the Rasch and 2PL models, \(\beta_i\) is the difficulty for item \(i\). For the rating scale models, \(\beta_i\) is the mean difficulty for item \(i\). For partial credit models, \(\beta_{is}\) is the difficulty for step \(s\) of item \(i\).

  • \(\kappa_s\) is a step difficulty for the (generalized) rating scale model.

  • \(\alpha_i\) is the discrimination parameter for item \(i\) (when applicable).

  • \(\theta_j\) is the ability for person \(j\).

  • \(\lambda\) is mean of the ability distribution.

  • \(\sigma\) is standard deviation for the ability distribution..

The .stan files and the notation for the models below closely adhere to these conventions.

Rasch family models

Rasch model

rasch_latent_reg.stan

\[\mathrm{logit} [ \Pr(y_{ij} = 1 | \theta_j, \beta_i) ] = \theta_j - \beta_i\]

Partial credit model

pcm_latent_reg.stan

\[\Pr(Y_{ij} = y,~y > 0 | \theta_j, \beta_i) = \frac{\exp \sum_{s=1}^y (\theta_j - \beta_{is})} {1 + \sum_{k=1}^{m_i} \exp \sum_{s=1}^k (\theta_j - \beta_{is})}\]
\[\Pr(Y_{ij} = y,~y = 0 | \theta_j, \beta_i) = \frac{1} {1 + \sum_{k=1}^{m_i} \exp \sum_{s=1}^k (\theta_j - \beta_{is})}\]

Rating scale model

rsm_latent_reg.stan

\[\Pr(Y_{ij} = y,~y > 0 | \theta_j, \beta_i, \kappa_s) = \frac{\exp \sum_{s=1}^y (\theta_j - \beta_i - \kappa_s)} {1 + \sum_{k=1}^{m} \exp \sum_{s=1}^k (\theta_j - \beta_i - \kappa_s)}\]
\[\Pr(Y_{ij} = y,~y = 0 | \theta_j, \beta_i, \kappa_s) = \frac{1} {1 + \sum_{k=1}^{m} \exp \sum_{s=1}^k (\theta_j - \beta_i - \kappa_s)}\]

Models featuring discrimination parameters

Two-parameter logistic model

2pl_latent_reg.stan

\[\mathrm{logit} [ \Pr(y_{ij} = 1 | \alpha_i, \beta_i, \theta_j) ] = \alpha_i \theta_j - \beta_i\]

Generalized partial credit model

gpcm_latent_reg.stan

\[\Pr(Y_{ij} = y,~y > 0 | \theta_j, \alpha_i, \beta_i) = \frac{\exp \sum_{s=1}^y (\alpha_i \theta_j - \beta_{is})} {1 + \sum_{k=1}^{m_i} \exp \sum_{s=1}^k (\alpha_i \theta_j - \beta_{is})}\]
\[\Pr(Y_{ij} = y,~y = 0 | \theta_j, \alpha_i, \beta_i) = \frac{1} {1 + \sum_{k=1}^{m_i} \exp \sum_{s=1}^k (\alpha_i \theta_j + w_{j}' \lambda - \beta_{is})}\]

Generalized rating scale model

grsm_latent_reg.stan

\[\Pr(Y_{ij} = y,~y > 0 | \theta_j, \lambda, \alpha_i, \beta_i, \kappa_s) = \frac{\exp \sum_{s=1}^y (\alpha_i \theta_j - \beta_i - \kappa_s)} {1 + \sum_{k=1}^{m} \exp \sum_{s=1}^k (\alpha_i \theta_j - \beta_i - \kappa_s)}\]
\[\Pr(Y_{ij} = y,~y = 0 | \theta_j, \lambda, \alpha_i, \beta_i, \kappa_s) = \frac{1} {1 + \sum_{k=1}^{m} \exp \sum_{s=1}^k (\alpha_i \theta_j - \beta_i - \kappa_s)}\]

Prior distributions

For Rasch family models, the prior distributions for the person-related parameters are

  • \(\theta_j \sim \mathrm{N}(\lambda, \sigma^2)\)

  • \(\lambda \sim t_7(0, 2.5)\)

  • \(\sigma \sim \mathrm{gamma}(2, 1)\)

For models with discrimination parameters, the priors are

  • \(\theta_j \sim \mathrm{N}(\lambda, 1)\)

  • \(\lambda \sim t_7(0, 2.5)\)

The priors for the item parameters are

  • \(\alpha \sim \mathrm{lognormal}(.5, 1)\)

  • \(\beta \sim \mathrm{N}(0, 9)\)

  • \(\kappa \sim \mathrm{N}(0, 9)\)