Package: hmetad 0.2.1

Kevin ONeill

hmetad: Fit the Meta-D' Model of Confidence Ratings Using 'brms'

Implementation of Bayesian regressions over the meta-d' model of psychological data from two alternative forced choice tasks with ordinal confidence ratings. For more information, see Maniscalco & Lau (2012) <doi:10.1016/j.concog.2011.09.021>. The package is a front-end to the 'brms' package, which facilitates a wide range of regression designs, as well as tools for efficiently extracting posterior estimates, plotting, and significance testing.

Authors:Kevin O'Neill [aut, cre, cph], Stephen Fleming [aut, cph]

hmetad_0.2.1.tar.gz
hmetad_0.2.1.zip(r-4.7-any)hmetad_0.2.1.zip(r-4.6-any)hmetad_0.2.1.zip(r-4.5-any)
hmetad_0.2.1.tgz(r-4.6-any)hmetad_0.2.1.tgz(r-4.5-any)
hmetad_0.2.1.tar.gz(r-4.7-any)hmetad_0.2.1.tar.gz(r-4.6-any)
hmetad_0.2.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
hmetad/json (API)

# Install 'hmetad' in R:
install.packages('hmetad', repos = c('https://metacoglab.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/metacoglab/hmetad/issues

Pkgdown/docs site:https://metacoglab.github.io

On CRAN:

Conda:

6.54 score 7 stars 9 scripts 270 downloads 74 exports 80 dependencies

Last updated from:0fa4149598. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK213
source / vignettesOK364
linux-releaseOK249
macos-releaseOK181
macos-oldrelOK133
windows-develOK154
windows-releaseOK158
windows-oldrelOK163
wasm-releaseOK137

Exports:add_auroc1_drawsadd_auroc1_rvarsadd_auroc2_drawsadd_auroc2_rvarsadd_epred_draws_metadadd_epred_rvars_metadadd_linpred_draws_metadadd_linpred_rvars_metadadd_mean_confidence_drawsadd_mean_confidence_rvarsadd_metacognitive_bias_drawsadd_metacognitive_bias_rvarsadd_predicted_draws_metadadd_predicted_rvars_metadadd_roc1_drawsadd_roc1_rvarsadd_roc2_drawsadd_roc2_rvarsadd_type1_drawsadd_type1_rvarsadd_type2_drawsadd_type2_rvarsaggregate_metadauroc1auroc1_drawsauroc1_rvarsauroc2auroc2_drawsauroc2_rvarscor_matrixcov_matrixepred_draws_metadepred_rvars_metadexample_dataexample_modelfit_metadjoint_probabilitiesjoint_responselinpred_draws_metadlinpred_rvars_metadmean_confidencemean_confidence_drawsmean_confidence_rvarsmetac2_parametersmetacognitive_bias_drawsmetacognitive_bias_rvarsmetadmetad_pmfnormal_lccdfnormal_lcdfpredicted_draws_metadpredicted_rvars_metadrmatrixnormroc1roc1_drawsroc1_rvarsroc2roc2_drawsroc2_rvarssim_metadsim_metad_conditionsim_metad_participantsim_metad_participant_conditionstanvars_metadto_signedto_unsignedtype1_drawstype1_probabilitiestype1_responsetype1_rvarstype2_drawstype2_probabilitiestype2_responsetype2_rvars

Dependencies:abindarrayhelpersbackportsbayesplotBHbridgesamplingbrmsBrobdingnagcallrcheckmateclicodacodetoolscpp11descdigestdistributionaldplyrfarverfuturefuture.applygenericsggdistggplot2ggridgesglobalsgluegridExtragtableinlineisobandlabelinglatticelifecyclelistenvloomagrittrMatrixmatrixStatsmgcvmvtnormnleqslvnlmenumDerivotelparallellypillarpkgbuildpkgconfigplyrposteriorprocessxpspurrrquadprogQuickJSRR6RColorBrewerRcppRcppEigenRcppParallelreshape2rlangrstanrstantoolsS7scalesStanHeadersstringistringrsvUnittensorAtibbletidybayestidyrtidyselectutf8vctrsviridisLitewithr

Fitting the meta-d' model
Introduction | Data preparation | Type 1, type 2, and joint responses | Signed and unsigned binary numbers | Data aggregation | Model fitting | Manual model fitting | Extract model estimates | Parameter estimates | Posterior predictions | Posterior expectations | Mean confidence | Metacognitive bias | Pseudo Type 1 ROC | Type 2 ROC | References

Last update: 2026-08-19
Started: 2026-02-20

Parameterization of the meta-d' model
Introduction | Model for type 1 decisions | Model for type 2 decisions | Joint model for type 1 and type 2 decisions | Fixing the type 1 threshold for type 2 responses | Model parameterization | References

Last update: 2026-08-19
Started: 2026-02-10

Estimating trial-level effects
Introduction | Standard model with data aggregation | Data preparation | Model fitting | Extracting model estimates | Other benefits

Last update: 2026-08-15
Started: 2026-02-20

Using alternative signal distributions with the meta-d' model
Introduction | Implementing a distribution function for use with hmetad | Data simulation | Model fitting | Model estimates | References

Last update: 2026-08-15
Started: 2026-02-10

History of the hmetad package
References

Last update: 2026-04-10
Started: 2026-02-20

Readme and manuals

Help Manual

Help pageTopics
Aggregate 'data' by 'response', 'confidence', and other columnsaggregate_metad
Calculate area under the empirical pseudo-type 1 receiver operating characteristic curveauroc1
Obtain posterior draws of the area under the pseudo type 1 receiver operating characteristic (ROC) curve.add_auroc1_draws add_auroc1_rvars auroc1_draws auroc1_rvars
Calculate the area under empirical type 2 receiver operating characteristic curvesauroc2
Obtain posterior draws of the area under the type 2 receiver operating characteristic (ROC) curve.add_auroc2_draws add_auroc2_rvars auroc2_draws auroc2_rvars
Generate a correlation matrix with all off-diagonal values equal to 'r'cor_matrix
Generate a covariance matrix.cov_matrix
Obtain posterior draws of joint response probabilitiesadd_epred_draws_metad add_epred_rvars_metad epred_draws_metad epred_rvars_metad
Simulated data for example model fittingexample_data
Example meta-d' model for model post-processingexample_model
Fit the meta-d' model using 'brms' packagefit_metad
Calculate empirical joint type 1/type 2 response probabilitiesjoint_probabilities
Convert between separate and joint type 1/type 2 responsesjoint_response type1_response type2_response
Obtain posterior draws of meta-d' model parametersadd_linpred_draws_metad add_linpred_rvars_metad linpred_draws_metad linpred_rvars_metad
Calculate empirical mean confidencemean_confidence
Obtain posterior draws of mean confidenceadd_mean_confidence_draws add_mean_confidence_rvars mean_confidence_draws mean_confidence_rvars
Obtain a vector of the names of the 'K-1' parameters representing the differences between successive confidence criteria for the meta-d' model with 'K' levels of confidence.metac2_parameters
Obtain posterior draws of an index of metacognitive biasadd_metacognitive_bias_draws add_metacognitive_bias_rvars metacognitive_bias_draws metacognitive_bias_rvars
'brms' family for the metad' modelmetad
Generate (log) probability simplex over the joint type 1/type 2 responsesmetad_pmf
Normal cumulative distribution functionsnormal_lccdf normal_lcdf
Obtain posterior predictions of joint responsesadd_predicted_draws_metad add_predicted_rvars_metad predicted_draws_metad predicted_rvars_metad
Sample from a matrix-normal distributionrmatrixnorm
Calculate empirical pseudo-type 1 receiver operating characteristic curvesroc1
Obtain posterior draws of the pseudo type 1 receiver operating characteristic (ROC) curve.add_roc1_draws add_roc1_rvars roc1_draws roc1_rvars
Calculate empirical type 2 receiver operating characteristic curveroc2
Obtain posterior draws of the response-specific type 2 receiver operating characteristic (ROC) curves.add_roc2_draws add_roc2_rvars roc2_draws roc2_rvars
Simulate from the meta-d' modelsim_metad
Simulate from the meta-d' model across separate conditionssim_metad_condition
Simulate from the hierarchical meta-d' modelsim_metad_participant
Simulate from the hierarchical meta-d' model across within-participant conditionssim_metad_participant_condition
Generate Stan code for the meta-d' modelstanvars_metad
Convert binary variable x between \{0, 1\} and \{-1, 1\}to_signed to_unsigned
Calculate posterior draws of type 1 response probabilitiesadd_type1_draws add_type1_rvars type1_draws type1_rvars
Calculate empirical type 1 response probabilitiestype1_probabilities
Calculate posterior draws of type 2 response probabilitiesadd_type2_draws add_type2_rvars type2_draws type2_rvars
Calculate empirical type 2 response probabilitiestype2_probabilities