Hierarchical meta-d' model
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tmpjags Added helper functions plotSamples and fit_meta_d_params Dec 15, 2015
.gitignore Update .gitignore Oct 23, 2015
Bayes_metad.txt Fixed mislabelling of M and FA counts Aug 9, 2016
Bayes_metad_group.txt Fixed mislabelling of M and FA counts Aug 9, 2016
Bayes_metad_group_corr.txt Fixed mislabelling of M and FA counts Aug 9, 2016
Bayes_metad_group_nodp.txt Fixed mislabelling of M and FA counts Aug 9, 2016
Bayes_metad_rc.txt Fixed mislabelling of M and FA counts Aug 9, 2016
Bayes_metad_rc_group.txt Fixed mislabelling of M and FA counts Aug 9, 2016
Bayes_metad_rc_group_nodp.txt Fixed mislabelling of M and FA counts Aug 9, 2016
LICENSE Create LICENSE Aug 20, 2017
README.md Update README.md Aug 18, 2017
calc_CI.m Added two ways of computing 95% CI Jan 22, 2017
calc_HDI.m Added two ways of computing 95% CI Jan 22, 2017
exampleFit.m Tidied up code, added correlation model Aug 8, 2016
exampleFit_corr.m update exampleFit_corr Dec 14, 2017
exampleFit_group.m Fixed bug in inputting type 1 criterion Jan 20, 2017
exampleFit_group_rc.m Tidied up code, added correlation model Aug 8, 2016
exampleFit_rc.m Added helper functions plotSamples and fit_meta_d_params Dec 15, 2015
exampleFit_twoGroups.m Tidied up code, added correlation model Aug 8, 2016
fit_meta_d_mcmc.m Fixed bug in inputting type 1 criterion Jan 20, 2017
fit_meta_d_mcmc_group.m Fixed bug in inputting type 1 criterion Jan 20, 2017
fit_meta_d_mcmc_groupCorr.m Fixed bug in inputting type 1 criterion Jan 20, 2017
fit_meta_d_params.m Fixed bug when changing number of chains Dec 21, 2016
matjags.m Added matjags function Jul 29, 2014
metad_sim.m Added helper functions plotSamples and fit_meta_d_params Dec 15, 2015
metad_visualise.m Updated group-level models to specify prior on log(Mratio) rather tha… Oct 12, 2015
plotSamples.m Added helper functions plotSamples and fit_meta_d_params Dec 15, 2015
plot_generative_model.m Specified empirical priors on log-Mratio for all models Feb 22, 2016
trials2counts.m Initial commit Jul 17, 2014
type2_SDT_sim.m Initial commit Jul 17, 2014

README.md

HMeta-d

Hierarchical meta-d' model (HMeta-d)

Steve Fleming stephen.fleming@ucl.ac.uk

This MATLAB toolbox implements the meta-d’ model (Maniscalco & Lau, 2012) in a hierarchical Bayesian framework using Matlab and JAGS, a program for conducting MCMC inference on arbitrary Bayesian models. A paper with more details on the method and the advantages of estimating meta-d’ in a hierarchal Bayesian framework is available here https://academic.oup.com/nc/article/doi/10.1093/nc/nix007/3748261/HMeta-d-hierarchical-Bayesian-estimation-of. For a more general introduction to Bayesian models of cognition see Lee & Wagenmakers, Bayesian Cognitive Modeling: A Practical Course http://bayesmodels.com/

The code is designed to work “out of the box” without much coding on the part of the user, and it receives data in the same format as Maniscalco & Lau’s toolbox, allowing easy switching and comparison between the two.

  1. To get started, you need to first ensure JAGS (an MCMC language similar to BUGS) is installed on your machine. See here for further details:

http://mcmc-jags.sourceforge.net/ The code has been tested on JAGS 3.4.0; there are compatibility issues between matjags and JAGS 4.X. The model files should work with later versions of JAGS when called from R.

  1. The main functions are fit_meta_d_mcmc (for fitting individual subject data) and fit_meta_d_mcmc_group (for hierarchical fits of group data). More information is contained in the help of these two functions and in the wiki https://github.com/smfleming/HMM/wiki/HMeta-d-tutorial. To get started try running exampleFit or exampleFit_group.

Please get in touch with your experiences with using the toolbox, and any bug reports or issues to me at stephen.fleming@ucl.ac.uk

License

This code is being released with a permissive open-source license. You should feel free to use or adapt the utility code as long as you follow the terms of the license, which are enumerated below. If you use the toolbox in a publication we ask that you cite the following paper:

Fleming, S.M. (2017) HMeta-d: hierarchical Bayesian estimation of metacognitive efficiency from confidence ratings, Neuroscience of Consciousness, 3(1) nix007, https://doi.org/10.1093/nc/nix007

Copyright (c) 2017, Stephen Fleming

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.