SSRT分布的贝叶斯参数估计方法

简要介绍

       使用停止信号任务(stop signal task)研究反应抑制时需要计算停止信号反应时(stop signal reaction time,SSRT),发现Matzke等人(2013)开发了一种贝叶斯参数方法(Bayesian parametric approach,BPA),可以估计SSRTs的整个分布。BPA假设SSRT是前高斯分布,并使用马尔可夫链蒙特卡罗抽样(Markov chain Monte Carlo sampling)来估计SSRT分布的参数。

       看了前三篇文献后下载了BEESTS软件,但是在运行过程中遇到了问题,因此给作者发邮件进行了询问,以下是他给我的回复。发现他们目前使用R的脚本进行分析。

The version you are using is outdated and no longer supported. The new R implementation is available at: OSF | Software.The corresponding papers is here: (第4篇文献).

This new BEESTS version is part of the DMC package and is more stable (so no integration errors) and more flexible than the original version; it can deal with multiple conditions, can also handle trigger as well as go failures, and can be used to model errors on the go task. The OSF site also provides 3 example scripts (dmc_6_4_SS_EXG2.R, dmc_6_4_SS_EXG3.R, and DMCPaper2.R) that explain how to set up the models and how to run the analysis.

参考文献

Matzke, D., Dolan, C. V., Logan, G. D., Brown, S. D., & Wagenmakers, E.-J. (2013). Bayesian parametric estimation of stop-signal reaction time distributions. Journal of Experimental Psychology. General, 142(4), 1047–1073. APA PsycNet

Matzke, D. (2013). Release the BEESTS: Bayesian Estimation of Ex-Gaussian STop-Signal reaction time distributions. Frontiers in Psychology, 4. https://doi.org/10.3389/fpsyg.2013.00918

Matzke, D., Love, J., & Heathcote, A. (2017). A Bayesian approach for estimating the probability of trigger failures in the stop-signal paradigm. Behavior Research Methods, 49(1), 267–281. A Bayesian approach for estimating the probability of trigger failures in the stop-signal paradigm | Behavior Research Methods

Heathcote, A., Lin, Y.-S., Reynolds, A., Strickland, L., Gretton, M., & Matzke, D. (2019). Dynamic models of choice. Behavior Research Methods, 51(2), 961–985. Dynamic models of choice | Behavior Research Methods

使用步骤

第一步:安装需要的R包

在使用DMC之前,进入packages目录,打开install_packages.R,运行1-31行

### Run this on first use of DMC to install requried packages. Run from RStudio
### in order to get help with dependencies.

# Standard packages from CRAN
install.packages("truncdist") # truncated t etc.
install.packages("msm")  # For truncated normal priors 
install.packages("loo") # For WAIC and looaic calculation
install.packages("hypergeo") # For population plausible values
install.packages("statmod") # Wald model
install.packages("rtdists") # For standard model distribution functions
install.packages("pracma")  # For gng and stop signal robust integration
install.packages("snowfall") # Parallel processing
install.packages("rlecuyer") # Parallel processing
install.packages("numDeriv") # Prior transformations
install.packages("vioplot") # Stop signal graphs
install.packages("ggplot2") # For fancy graphs
install.packages("gridExtra") # For fancy graphs
install.packages("mvtnorm") # For Bayes Factors
install.packages("Matrix") # For Bayes Factors
install.packages("Brobdingnag") # For Bayes Factors
install.packages("stringr") # For Bayes Factors
install.packages("LaplacesDemon") # For multivariate Cauchy

# Note: Before running commands scripts, the current working directory must be set 
# to the top-level folder containing the dmc and tutorial subfolders 

# Modifed packages distributed with DMC.

## Note that on some systems you will need to have admin rights to install 
## the followingl packages sucessfully and/or have your PATH set correctly. 
## It is also sometimes necessary to launch RStudio from an admin account.

对于34行,直接运行会报错。

# This modificaiton of coda allows for plotting of priors with plot.dmc
install.packages("packages/coda_0.19-3.tar.gz",repos=NULL,type="source")
## -- Installation Note
## On RStudio, you may use the "Install" button in the "Packages" tab.
## From its drop-down menu, choose "Package Archive File (.tar.gz)" to
## browser the location you store the source file "coda_0.19-2.tar.gz"
## Note that you may have to restart RStudio for the new version to take effect.

可以点击Tools→Install Packages→安装gz格式文件

第二步:下载示例数据

脚本中是需要在网络上下载数据,但是实际下载不了,又一次联系了作者,他表示可能之前的网页停止服务了,给了新的链接(注:需要科学上网才能下载)

https://www.dropbox.com/sh/fxq64xprk741xpk/AABUldQxoxNp_MdDc4gMzYppa?dl=0

https://www.dropbox.com/scl/fo/onqqthk3laa4yobbkroem/h?rlkey=awg5g9ktfvbebf1mqobe8khl8&dl=0

未完待续……(实在难懂学了再更,其实integration method计算SSRT也够用了)

  • 22
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值