Package: ream 1.0-5

ream: Density, Distribution, and Sampling Functions for Evidence Accumulation Models

Calculate the probability density functions (PDFs) for two threshold evidence accumulation models (EAMs). These are defined using the following Stochastic Differential Equation (SDE), dx(t) = v(x(t),t)*dt+D(x(t),t)*dW, where x(t) is the accumulated evidence at time t, v(x(t),t) is the drift rate, D(x(t),t) is the noise scale, and W is the standard Wiener process. The boundary conditions of this process are the upper and lower decision thresholds, represented by b_u(t) and b_l(t), respectively. Upper threshold b_u(t) > 0, while lower threshold b_l(t) < 0. The initial condition of this process x(0) = z where b_l(t) < z < b_u(t). We represent this as the relative start point w = z/(b_u(0)-b_l(0)), defined as a ratio of the initial threshold location. This package generates the PDF using the same approach as the 'python' package it is based upon, 'PyBEAM' by Murrow and Holmes (2023) <doi:10.3758/s13428-023-02162-w>. First, it converts the SDE model into the forwards Fokker-Planck equation dp(x,t)/dt = d(v(x,t)*p(x,t))/dt-0.5*d^2(D(x,t)^2*p(x,t))/dx^2, then solves this equation using the Crank-Nicolson method to determine p(x,t). Finally, it calculates the flux at the decision thresholds, f_i(t) = 0.5*d(D(x,t)^2*p(x,t))/dx evaluated at x = b_i(t), where i is the relevant decision threshold, either upper (i = u) or lower (i = l). The flux at each thresholds f_i(t) is the PDF for each threshold, specifically its PDF. We discuss further details of this approach in this package and 'PyBEAM' publications. Additionally, one can calculate the cumulative distribution functions of and sampling from the EAMs.

Authors:Raphael Hartmann [aut, cre], Matthew Murrow [aut]

ream_1.0-5.tar.gz
ream_1.0-5.zip(r-4.5)ream_1.0-5.zip(r-4.4)ream_1.0-5.zip(r-4.3)
ream_1.0-5.tgz(r-4.4-x86_64)ream_1.0-5.tgz(r-4.4-arm64)ream_1.0-5.tgz(r-4.3-x86_64)ream_1.0-5.tgz(r-4.3-arm64)
ream_1.0-5.tar.gz(r-4.5-noble)ream_1.0-5.tar.gz(r-4.4-noble)
ream_1.0-5.tgz(r-4.4-emscripten)ream_1.0-5.tgz(r-4.3-emscripten)
ream.pdf |ream.html
ream/json (API)

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

Peer review:

Bug tracker:https://github.com/raphaelhartmann/ream/issues

Uses libs:
  • c++– GNU Standard C++ Library v3

On CRAN:

5.00 score 2 stars 2 scripts 263 downloads 76 exports 0 dependencies

Last updated 2 months agofrom:b3514f9114. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKOct 26 2024
R-4.5-win-x86_64OKOct 26 2024
R-4.5-linux-x86_64OKOct 26 2024
R-4.4-win-x86_64OKOct 26 2024
R-4.4-mac-x86_64OKOct 26 2024
R-4.4-mac-aarch64OKOct 26 2024
R-4.3-win-x86_64OKOct 26 2024
R-4.3-mac-x86_64OKOct 26 2024
R-4.3-mac-aarch64OKOct 26 2024

Exports:dCDSTPdCDSTP_griddCSTM_TdCSTM_T_griddCSTM_TWdCSTM_TW_griddCSTM_TXdCSTM_TX_griddDMCdDMC_griddETMdETM_griddLIMdLIM_griddLIMFdLIMF_griddLTMdLTM_griddPAMdPAM_griddRDMCdRDMC_griddRTMdRTM_griddSDDMdSDDM_griddSDPMdSDPM_griddSSPdSSP_griddUGMdUGM_griddUGMFdUGMF_griddWDSTPdWDSTP_griddWTMdWTM_gridpCDSTPpCSTM_TpCSTM_TWpCSTM_TXpDMCpETMpLIMpLIMFpLTMpPAMpRDMCpRTMpSDDMpSDPMpSSPpUGMpUGMFpWDSTPpWTMrCDSTPrCSTM_TrCSTM_TWrCSTM_TXrDMCrETMrLIMrLIMFrLTMrPAMrRDMCrRTMrSDDMrSDPMrSSPrUGMrUGMFrWDSTPrWTM

Dependencies:

ream: guideline

Rendered fromguidline.Rmdusingknitr::rmarkdownon Oct 26 2024.

Last update: 2024-09-13
Started: 2024-07-15

Readme and manuals

Help Manual

Help pageTopics
Continuous Dual-Stage Two-Phase Model of Selective AttentionCDSTP dCDSTP pCDSTP rCDSTP
Custom Time-Dependent Drift Diffusion ModelCSTM_T dCSTM_T pCSTM_T rCSTM_T
Custom Time- and Weight-Dependent Drift Diffusion ModelCSTM_TW dCSTM_TW pCSTM_TW rCSTM_TW
Custom Time- and Evidence-Dependent Drift Diffusion ModelCSTM_TX dCSTM_TX pCSTM_TX rCSTM_TX
Generate Grid for PDF of the Continuous Dual-Stage Two-Phase Model of Selective AttentiondCDSTP_grid
Generate Grid for PDF of Custom Time-Dependent Drift Diffusion ModeldCSTM_T_grid
Generate Grid for PDF of Custom Time- and Weight-Dependent Drift Diffusion ModeldCSTM_TW_grid
Generate Grid for PDF of Custom Time- and Evidence-Dependent Drift Diffusion ModeldCSTM_TX_grid
Generate Grid for PDF of Diffusion Model of Conflict TasksdDMC_grid
Generate Grid for PDF of the Exponential Threshold ModeldETM_grid
Generate Grid for PDF of the Leaky Integration ModeldLIM_grid
Generate Grid for PDF of the Leaky Integration Model With FlipdLIMF_grid
Generate Grid for PDF of the Linear Threshold ModeldLTM_grid
Diffusion Model for Conflict TasksdDMC DMC pDMC rDMC
Generate Grid for PDF of Piecewise Attention ModeldPAM_grid
Generate Grid for PDF of the Revised Diffusion Model of Conflict TasksdRDMC_grid
Generate Grid for PDF of the Rational Threshold ModeldRTM_grid
Generate Grid for PDF of the Simple Drift Diffusion ModeldSDDM_grid
Generate Grid for PDF of the Sequential Dual Process ModeldSDPM_grid
Generate Grid for PDF of the Shrinking Spotlight ModeldSSP_grid
Generate Grid for PDF of the Urgency Gating ModeldUGM_grid
Generate Grid for PDF of the Urgency Gating Model With FlipdUGMF_grid
Generate Grid for PDF of the Weibull Dual-Stage Two-Phase Model of Selective AttentiondWDSTP_grid
Generate Grid for PDF of the Weibull Threshold ModeldWTM_grid
Exponential Threshold ModeldETM ETM pETM rETM
Leaky Integration ModeldLIM LIM pLIM rLIM
Leaky Integration Model With FlipdLIMF LIMF pLIMF rLIMF
Linear Threshold ModeldLTM LTM pLTM rLTM
Piecewise Attention ModeldPAM PAM pPAM rPAM
Revised Diffusion Model of Conflict TasksdRDMC pRDMC RDMC rRDMC
Rational Threshold ModeldRTM pRTM rRTM RTM
Simple Drift Diffusion ModeldSDDM pSDDM rSDDM SDDM
Sequential Dual Process ModeldSDPM pSDPM rSDPM SDPM
Shrinking Spotlight ModeldSSP pSSP rSSP SSP
Urgency Gating ModeldUGM pUGM rUGM UGM
Urgency Gating Model With FlipdUGMF pUGMF rUGMF UGMF
Weibull Dual-Stage Two-Phase Model of Selective AttentiondWDSTP pWDSTP rWDSTP WDSTP
Weibull Threshold ModeldWTM pWTM rWTM WTM