Movatterモバイル変換


[0]ホーム

URL:


bayes4psy—UserFriendly Bayesian Data Analysis for Psychology

R-CMD-checkCRAN_Status_BadgeDownloads

Authors

Jure Demšar, Grega Repovš and Erik Štrumbelj

The package

This is an R package intended for Bayesian statistical analysis inthe field of psychology. Psychology is one of the fields wherethe replicationcrisis is the most prominent. Scientist believe that one of the mainreason for this might be non-transparent and inappropriate use offrequentist statistics. We believe that using fully transparent Bayesianmethods provided in this package could greatly alleviate the replicationcrisis in psychology.

We also prepared several examples where we used thebayes4psy package to perform Bayesian data analysis forscientific publications on actual data gathered by psychological tests.These examples can be found on ourGitHubrepository. This repository also includes short test scenarios(these scenarios execute all developed functionalities on dummy data)intended for debugging the package.

This readme document provides only a brief overview of the package, adetailed description of all implemented functions is provided inpackage’s help pages.

Models

Bayesian models in thebayes4psy package are writtenwith theStan language. Stan functionsrequired for working with these models are accessed via theRStan package. There are currently five models in thepackage:

Model fitting

The fitted model objects returned by thebayes4psypackage are calledb_results objects. These objects containthree components,extract contains values of fitted parameters,fit is the originalstanfit object anddatais the input data used for fitting. To fit a model to the data one hasto first prepare the input data and then call an appropriate fittingfunction:

If no priors are provided as parameters for fitting functions, thenflat (improper) priors are put on all parameters. See provided examplesand tests to see how one can specify their own priors.

Analyzing fits

To enable users without extensive programming knowledge to performprofessional level Bayesian data analysis we developed a number ofcustom methods. Below is a short description of functions common to allmodels, for descriptions of functions specific to certain models consultthe package’s help pages.

Resources

Development Version

You can install the development version from GitHub. To do so youfirst have to install theRStan package and C++toolchain (instructions).OnceRStan and the toolchain are installed, you caninstallbayes4psy by using thedevtools package in R:

if (!require(devtools)) {install.packages("devtools")library(devtools)}install_github("bstatcomp/bayes4psy")

Funding

The research behind this software was partially funded by theSlovenian Research Agency (ARRS) through grants L1-7542 (Advancement ofcomputationally intensive methods for efficient modern general-purposestatistical analysis and inference), P3-0338 (Physiological mechanismsof neurological disorders and diseases), J3-9264 (Decomposing cognition:working memory mechanism and representations), P5-0410 (Digitalizationas driving force for sustainability of individuals, organizations, andsociety), and P5-0110 (Psychological and neuroscientific aspects ofcognition).


[8]ページ先頭

©2009-2025 Movatter.jp