Source profileQuality 97/100

NeuroAIHub/BrainPilot/packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md

drift-diffusion-model

Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science

Source repository stars
424
Declared platforms
0
Static risk flags
0
Last source update
2026-08-22
Source checked
2026-08-25

Decision brief

What it does: where it fits

Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science

Best for

  • Designing a study where two-alternative forced choice (2AFC) RT data will be collected and you want to decompose behavior into latent cognitive components
  • Choosing between DDM variants (classic DDM, full DDM, EZ-diffusion, HDDM, LBA) for a given dataset and research question
  • Setting up model fitting: selecting fitting method, preparing data, configuring software tools

Not for

  • Tasks with more than two response options require multi-accumulator models (see Racing Diffusion Model or LBA in references/model-variants.md)
  • Go/No-Go tasks violate the two-boundary assumption; use single-boundary models or SSP models instead (Ratcliff et al., 2018)

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/NeuroAIHub/BrainPilot --skill "packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model"
Safe inspection promptEditorial

Inspect the Agent Skill "drift-diffusion-model" from https://github.com/NeuroAIHub/BrainPilot/blob/e9ddc112cab9b1c6272dae0c8a6bdceb5c9c3880/packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md at commit e9ddc112cab9b1c6272dae0c8a6bdceb5c9c3880. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    ⚠️ Verification Notice

    This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.

    This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.
  2. 02

    Step 1: Assess Your Research Question

    Review the “Step 1: Assess Your Research Question” section in the pinned source before continuing.

    Review and apply the “Step 1: Assess Your Research Question” source section.
  3. 03

    Step 2: Assess Data Characteristics

    (Trial count thresholds: Ratcliff & Childers, 2015, simulation study)

    (Trial count thresholds: Ratcliff & Childers, 2015, simulation study)
  4. 04

    Step 3: Choose Variant

    See references/model-variants.md for detailed comparison of all variants.

    See references/model-variants.md for detailed comparison of all variants.
  5. 05

    Step 4: Select Fitting Method

    See references/fitting-guide.md for the complete fitting workflow.

    See references/fitting-guide.md for the complete fitting workflow.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score97/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars424SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
NeuroAIHub/BrainPilot
Skill path
packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md
Commit
e9ddc112cab9b1c6272dae0c8a6bdceb5c9c3880
License
AGPL-3.0
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Drift-Diffusion Model

Purpose

This skill encodes expert knowledge for applying drift-diffusion models (DDMs) to two-choice reaction time data. DDMs decompose observed accuracy and RT distributions into latent cognitive processes — evidence accumulation rate, response caution, and non-decision time. This skill guides researchers through model variant selection, parameter fitting, and result evaluation, encoding domain-specific judgment that requires specialized training in computational cognitive modeling.

When to Use This Skill

  • Designing a study where two-alternative forced choice (2AFC) RT data will be collected and you want to decompose behavior into latent cognitive components
  • Choosing between DDM variants (classic DDM, full DDM, EZ-diffusion, HDDM, LBA) for a given dataset and research question
  • Setting up model fitting: selecting fitting method, preparing data, configuring software tools
  • Evaluating model fit quality: checking parameter recovery, running posterior predictive checks, comparing nested models
  • Interpreting DDM parameters in terms of cognitive processes (e.g., drift rate as evidence quality, boundary separation as response caution)
  • Troubleshooting fitting problems: convergence failures, implausible parameter estimates, poor fits to RT quantiles

When NOT to Use This Skill

  • Tasks with more than two response options require multi-accumulator models (see Racing Diffusion Model or LBA in references/model-variants.md)
  • Go/No-Go tasks violate the two-boundary assumption; use single-boundary models or SSP models instead (Ratcliff et al., 2018)
  • Tasks where speed-accuracy tradeoff is not a meaningful dimension (e.g., pure accuracy tasks with unlimited time)
  • If you only need a coarse summary of RT effects and do not need process-level decomposition, standard ANOVA on mean RT may suffice

Research Planning Protocol

Before executing the domain-specific steps below, you MUST:

  1. State the research question — What cognitive process decomposition question is this DDM addressing?
  2. Justify the method choice — Why DDM (not simple RT analysis, Bayesian models, etc.)? What alternatives were considered?
  3. Declare expected outcomes — Which parameter(s) do you expect to differ across conditions, and in what direction?
  4. Note assumptions and limitations — What does the DDM assume (e.g., 2AFC, stationary drift)? Where could it mislead?
  5. Present the plan to the user and WAIT for confirmation before proceeding.

For detailed methodology guidance, see the research-literacy skill.

⚠️ Verification Notice

This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.

Core Concepts

What the DDM Models

The DDM assumes that on each trial, noisy evidence accumulates over time from a starting point toward one of two decision boundaries. The key insight: observed RT = decision time + non-decision time, and accuracy depends on which boundary is reached first (Ratcliff, 1978).

The Four Core Parameters

ParameterSymbolCognitive InterpretationTypical RangeSource
Drift ratevQuality/strength of evidence accumulation0.1 – 5.0 (commonly 0.5–3.0)Ratcliff & McKoon, 2008; Voss et al., 2004, Table 2
Boundary separationaResponse caution (speed-accuracy tradeoff)0.5 – 2.5 (commonly 0.8–2.0)Ratcliff & McKoon, 2008; Voss et al., 2004, Table 2
Non-decision timet0 (or Ter)Encoding + motor execution time0.1 – 0.6 s (commonly 0.2–0.5 s)Ratcliff & McKoon, 2008; Matzke & Wagenmakers, 2009, Table 1
Starting pointzResponse bias (relative to boundaries)a/2 (unbiased) ± 20%Ratcliff & McKoon, 2008; Voss et al., 2013

Trial-to-Trial Variability Parameters (Full DDM)

ParameterSymbolInterpretationTypical RangeSource
Drift rate variabilitysvCross-trial variation in evidence quality0 – 2.0Ratcliff & McKoon, 2008
Starting point variabilityszCross-trial variation in bias0 – 0.3 × aRatcliff & McKoon, 2008
Non-decision time variabilityst0Cross-trial variation in encoding/motor time0 – 0.3 sRatcliff & McKoon, 2008

Decision Logic: Choosing a Model Variant

Step 1: Assess Your Research Question

Is the goal to decompose RT data into cognitive components?
├── YES → Continue to Step 2
└── NO → DDM may not be needed; consider simpler analyses

Step 2: Assess Data Characteristics

How many trials per condition do you have?
├── < 20 trials → Insufficient for any DDM variant (Ratcliff & Childers, 2015)
├── 20-40 trials → Use EZ-diffusion only (Wagenmakers et al., 2007)
├── 40-100 trials → Classic 4-parameter DDM or EZ-diffusion
├── 100-200 trials → Full DDM possible but fix some variability parameters
└── > 200 trials → Full DDM with all 7 parameters estimable

(Trial count thresholds: Ratcliff & Childers, 2015, simulation study)

Step 3: Choose Variant

Are you comparing groups or conditions at the population level?
├── YES, with moderate sample size (N > 15 participants)
│ └── Consider HDDM for hierarchical/Bayesian estimation (Wiecki et al., 2013)
├── YES, with large trial counts per person
│ └── Classic or Full DDM per participant, then group-level tests on parameters
└── Exploratory / individual differences focus
 └── HDDM or hierarchical Bayesian approach
How many response alternatives?
├── 2 → Standard DDM variants
├── > 2 → LBA or Racing Diffusion Model (see references/model-variants.md)
└── Go/No-Go → Single-boundary model (not covered here)

See references/model-variants.md for detailed comparison of all variants.

Step 4: Select Fitting Method

What variant did you choose?
├── EZ-diffusion → Closed-form solution, no fitting needed (Wagenmakers et al., 2007)
├── Classic/Full DDM → Use fast-dm (Voss & Voss, 2007) or PyDDM (Shinn et al., 2020)
│ ├── MLE: Best for large trial counts (>100 per condition)
│ ├── Chi-square: Robust for moderate trial counts (Ratcliff & Tuerlinckx, 2002)
│ └── Quantile-based (QMP): Most robust to outliers (Heathcote et al., 2002)
└── HDDM → Use HDDM Python package, Bayesian estimation (Wiecki et al., 2013)

See references/fitting-guide.md for the complete fitting workflow.

Fitting Workflow Summary

  1. Data Preparation: Clean RTs, apply cutoffs (remove < 200 ms and > 3000-5000 ms; Ratcliff, 1993; Ratcliff & Tuerlinckx, 2002), code accuracy
  2. Model Specification: Choose parameters to estimate vs. fix; decide which parameters vary across conditions
  3. Parameter Estimation: Run fitting with chosen method and tool
  4. Convergence Check: Verify optimizer converged; run multiple starting points
  5. Model Comparison: Use BIC (for MLE-fitted models) or DIC/WAIC (for Bayesian; Spiegelhalter et al., 2002) to compare nested models
  6. Posterior Predictive Check: Simulate data from fitted parameters; compare predicted vs. observed RT quantiles (Ratcliff & McKoon, 2008, Fig. 2)
  7. Parameter Recovery: Simulate data with known parameters; verify your pipeline can recover them (Heathcote et al., 2015)

See references/fitting-guide.md for detailed guidance on each step.

Interpreting Parameters

Drift Rate (v)

  • Higher v = faster, more accurate decisions
  • Sensitive to: stimulus difficulty, attention, perceptual quality
  • Manipulations that typically affect v: stimulus contrast, coherence (motion dots), word frequency (Ratcliff et al., 2004)
  • If v is near 0 for a condition, participants are essentially guessing

Boundary Separation (a)

  • Higher a = more cautious (slower but more accurate)
  • Sensitive to: speed-accuracy instructions, emphasis conditions
  • Manipulations that typically affect a: speed vs. accuracy instruction (Ratcliff & McKoon, 2008), reward structure
  • If a changes across stimulus conditions (rather than instruction conditions), reconsider the model specification

Non-Decision Time (t0)

  • Reflects encoding + response execution time
  • Sensitive to: stimulus degradation, response modality (key press vs. voice)
  • Manipulations that typically affect t0: stimulus masking, response complexity (Ratcliff & McKoon, 2008)
  • If t0 > 0.5 s, check for unusually slow motor responses or task-specific encoding demands

Starting Point (z)

  • Reflects a priori bias toward one response
  • Sensitive to: prior probability, payoff asymmetry
  • When z = a/2, no bias; z > a/2 = bias toward upper boundary
  • Manipulations that typically affect z: unequal base rates, cue validity (Ratcliff & McKoon, 2008; Voss et al., 2004)

Common Pitfalls

  1. Fitting too many free parameters with too few trials: The full 7-parameter DDM requires >200 trials per condition for stable estimates (Ratcliff & Childers, 2015). With fewer trials, fix variability parameters or use EZ-diffusion.

  2. Ignoring RT outliers: Extremely fast (< 200 ms) or slow (> 3000–5000 ms) RTs likely reflect non-decision processes (guesses, lapses). Include these and they distort parameter estimates (Ratcliff, 1993; Ratcliff & Tuerlinckx, 2002). Apply cutoffs BEFORE fitting.

  3. Not checking parameter recovery: Always simulate data with known parameters using your exact pipeline and verify you can recover them. Poor recovery means your results are uninterpretable (Heathcote et al., 2015; White et al., 2018).

  4. Confusing drift rate and boundary effects: Speed-accuracy tradeoff instructions should primarily affect boundary separation (a), not drift rate (v). If both change, the model may be misspecified or the manipulation has multiple effects (Ratcliff & McKoon, 2008).

  5. Using mean RT instead of full RT distributions: DDMs leverage the shape of the entire RT distribution. Analyzing only mean RT discards the information DDMs are designed to capture (Ratcliff, 1978; Wagenmakers et al., 2007).

  6. Neglecting error RT distributions: Correct and error RT distributions are jointly constrained by the DDM. Fitting only correct RTs loses critical information about the generative process (Ratcliff & McKoon, 2008).

  7. Treating HDDM posterior modes as point estimates: Bayesian models yield posterior distributions. Report and interpret the full posterior, including credible intervals, rather than treating the mode as a frequentist point estimate (Wiecki et al., 2013).

Key References

  • Ratcliff, R. (1978). A theory of memory retrieval. Psychological Review, 85(2), 59–108.
  • Ratcliff, R., & McKoon, G. (2008). The diffusion decision model: Theory and data for two-choice decision tasks. Neural Computation, 20(4), 873–922.
  • Wagenmakers, E.-J., van der Maas, H. L. J., & Grasman, R. P. P. P. (2007). An EZ-diffusion model for response time and accuracy. Psychonomic Bulletin & Review, 14(1), 3–22.
  • Voss, A., Nagler, M., & Lerche, V. (2013). Diffusion models in experimental psychology: A practical introduction. Experimental Psychology, 60(6), 385–402.
  • Wiecki, T. V., Sofer, I., & Frank, M. J. (2013). HDDM: Hierarchical Bayesian estimation of the drift-diffusion model in Python. Frontiers in Neuroinformatics, 7, 14.
  • See references/model-variants.md for DDM family details.
  • See references/fitting-guide.md for the complete fitting workflow.

Frequently asked questions

What to verify before installation and use

What does the drift-diffusion-model source document cover?

Expert guidance on selecting, fitting, and evaluating drift-diffusion models for two-choice response time data in cognitive science

How do I install drift-diffusion-model?

The source record exposes this install command: npx skills add https://github.com/NeuroAIHub/BrainPilot --skill "packages/skills/skills/03_Cognitive_Psychology/drift-diffusion-model". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 10045,511

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10045,511

coreyhaines31/marketingskills

churn-prevention

When the user wants to reduce churn, build cancellation flows, set up save offers, recover failed payments, or implement retention strategies. Also use when the user mentions 'churn,' 'cancel flow,' 'offboarding,' 'save offer,' 'dunning,' 'failed payment recovery,' 'win-back,' 'retention,' 'exit survey,' 'pause subscription,' 'involuntary churn,' 'people keep canceling,' 'churn rate is too high,' 'how do I keep users,' or 'customers are leaving.' Use this whenever someone is losing subscribers o

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 10015,122

wanshuiyin/Auto-claude-code-research-in-sleep

citation-audit

Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.