hmetad package in R
Department of Experimental Psychology
University College London
Nelson (1990)
Seow et al. (2021)
Decision about the world
Decision about yourself
Clarke et al. (1959)
To understand how well someone performs a task, why not just calculate:
Need to control for response bias!
How much do responses distinguish between stimuli?
Is one response more likely overall?
Green and Swets (1966)
How much does distinguish between correct and incorrect decisions?
How much evidence is required to respond with high confidence?
We would like the same dissociation as for type 1 decisions
But now we need to control for type 1 sensitivity and bias!
Fleming and Lau (2014)
| Stimulus = 0 | Stimulus = 1 | |
|---|---|---|
| Response = 0 | Correct Rejection | Miss |
| Response = 1 | False Alarm | Hit |
| Accuracy = 0 | Accuracy = 1 | |
|---|---|---|
| Confidence = 0 | Correct Rejection 2 | Miss 2 |
| Confidence = 1 | False Alarm 2 | Hit 2 |
Each approach determines metacognitive sensitivity using these probabilities
Fleming and Lau (2014)
Clarke et al. (1959)
Does not control for type 1 performance!
If we make assumptions about the distribution of evidence,
we can model the type 2 ROC!
Bayesian inference
Determine the model parameters (e.g., \(\textrm{meta-}d'\), \(\textrm{meta-}c_2\)) are most likely given the participant’s observed type 1 and type 2 responses
\[ \begin{align*} p(\theta \;\vert\; \mathcal{D}) \propto p(\mathcal{D} \;\vert\; \theta) p(\theta) \end{align*} \]
Posterior Likelihood Prior
In the hmetad package, we approximate this calculation using the probabilistic programming language Stan
Fleming (2017)
There are a wide range of other kinds of models of confidence:
Helpful reviews (Rausch et al. 2023; Rahnev 2025)
Open https://metacoglab.github.io/hmetad_workshop in your browser and follow along the instructions.
If you can’t get it installed/running, let me know! Otherwise, you can look at the pre-generated outputs.
\[ \begin{align*} \mathbf{y}_s &\sim \text{Multinomial}(\pi_s) \\ \pi_s &= \textrm{metad_pmf}_s(d', c, \textrm{meta-}d', \textrm{meta-}c, \mathbf{\textbf{meta-}c_{2}^0}, \mathbf{\textbf{meta-}c_{2}^{1}}) \\ \textrm{meta-}d' &= \textrm{exp}(\textrm{log-}M) \; d' \\ \textrm{meta-}c &= \begin{cases} c & \textrm{ABSOLUTE} \\ \textrm{exp}(\textrm{log-}M) \; c & \textrm{RELATIVE} \\ \end{cases} \\ \mathbf{\textbf{meta-}c_{2}^0} &= \textrm{meta-}c - \text{cumulative_sum}(\text{exp}(\mathbf{\textbf{log-dmeta-}c_2^0})) \\ \mathbf{\textbf{meta-}c_{2}^1} &= \textrm{meta-}c + \text{cumulative_sum}(\text{exp}(\mathbf{\textbf{log-dmeta-}c_2^1})) \end{align*} \]
Fleming (2017)
hmetad and the Hmeta-d toolboxhmetadR formula syntax for arbitrary model specifications