@brainpilot/skills 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
- package/skills/01_Meta-Skills/contribute-skill/SKILL.md +277 -0
- package/skills/01_Meta-Skills/contribute-skills-via-pr/SKILL.md +163 -0
- package/skills/01_Meta-Skills/paper-to-skill/SKILL.md +435 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/extraction-guide.md +286 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/skill-template.md +250 -0
- package/skills/01_Meta-Skills/repo-to-skill/SKILL.md +289 -0
- package/skills/01_Meta-Skills/share-case/SKILL.md +253 -0
- package/skills/01_Meta-Skills/share-usage/README.md +63 -0
- package/skills/01_Meta-Skills/share-usage/SKILL.md +395 -0
- package/skills/01_Meta-Skills/verify-skill/SKILL.md +331 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/SKILL.md +194 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/effect-sizes.md +352 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/sample-size-guide.md +407 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/SKILL.md +361 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/references/common-analyses.md +517 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/SKILL.md +292 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/references/plot-recipes.md +709 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/SKILL.md +286 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/common-assumptions.md +320 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/planning-template.md +143 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/SKILL.md +197 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/references/instruction-templates.md +60 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/SKILL.md +246 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/classic-paradigms.md +435 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/design-principles.md +256 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/SKILL.md +270 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/references/lavaan-templates.md +172 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/SKILL.md +238 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/references/scoring-rubric.md +143 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md +203 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/fitting-guide.md +571 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/model-variants.md +427 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/SKILL.md +310 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/references/ez-diffusion-formulas.md +137 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/SKILL.md +300 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/application-guide.md +278 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/sdt-formulas.md +318 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/SKILL.md +283 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/references/array-generation-parameters.yaml +111 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/SKILL.md +301 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/references/measure-computation-guide.md +195 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/SKILL.md +257 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/analysis-guide.md +356 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/region-segmentation.md +266 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/SKILL.md +346 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/references/lexical-databases-guide.md +184 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/SKILL.md +226 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/component-paradigm-map.md +276 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/timing-parameters.md +244 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/SKILL.md +367 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/references/parameter-lookup-tables.md +138 -0
- package/skills/05_EEG_ERP/erp-analysis/SKILL.md +185 -0
- package/skills/05_EEG_ERP/erp-analysis/references/erp-components.md +447 -0
- package/skills/05_EEG_ERP/erp-analysis/references/preprocessing-pipeline.md +277 -0
- package/skills/05_EEG_ERP/erp-analysis/references/statistical-approaches.md +351 -0
- package/skills/05_EEG_ERP/mne-python-guide/SKILL.md +174 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/decoding.md +178 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/io_formats.md +160 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/preprocessing.md +259 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/simulation.md +173 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/source_localization.md +234 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/statistics.md +196 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/time_frequency.md +165 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/visualization.md +175 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/SKILL.md +296 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/design-matrix-guide.md +214 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/statistical-inference.md +288 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/SKILL.md +274 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/quality-control.md +336 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/step-by-step-pipeline.md +380 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/SKILL.md +264 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/references/design-optimization-examples.md +114 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/SKILL.md +123 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/database-subjects.md +179 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/dataset-types.md +208 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/freesurfer-fmriprep.md +162 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mapping-transforms.md +181 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mni-utils.md +207 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/surface-analysis.md +219 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/visualization.md +251 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/SKILL.md +297 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/model-patterns.md +197 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/parameter-table.yaml +204 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/SKILL.md +294 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/diagnostics-checklist.md +351 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/prior-selection-guide.md +241 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/SKILL.md +269 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/references/recovery-diagnostics.md +207 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/SKILL.md +305 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/data-requirements.md +60 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/method-comparison.md +151 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/SKILL.md +376 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/hh-parameters.md +117 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/network-regimes.md +130 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/SKILL.md +258 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/indicator-parameters.md +242 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/pipeline-details.md +211 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/SKILL.md +261 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/opsin-catalog.md +124 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/stimulation-parameters.md +304 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/SKILL.md +367 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/disconnection-guide.md +152 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/vlsm-pipeline.md +182 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/SKILL.md +250 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/deficit-profiles.md +302 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/test-catalog.md +304 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/SKILL.md +345 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/references/age-parameters.yaml +186 -0
- package/skills/12_Social_Cognition/tom-task-selector/SKILL.md +379 -0
- package/skills/12_Social_Cognition/tom-task-selector/references/task-database.md +317 -0
- package/skills/13_Visualization/nature-figure/README.md +442 -0
- package/skills/13_Visualization/nature-figure/SKILL.md +60 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-01-bar-charts.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-02-line-trends.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-03-heatmaps.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-04-scatter-bubble.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-05-radar-polar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-06-distributions.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-07-forest-interval.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-08-area-stacked.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-09-image-plates.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-10-network-matrix.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_motivation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation_distillation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_contrastive.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_CEDAR.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/RNAGenScape_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/comparison.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_ablation.py +86 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_comparison.py +109 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/diffusion_swiss_roll.py +97 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/diffusion_swiss_roll.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Ablation.py +64 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_GeneRegulatory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Trajectory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/idea.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/illustration.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_idea.py +76 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_illustration.py +404 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/figures/freq_prior.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/plot_freq_prior.py +146 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/plot_bars.py +216 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/raw_data.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold_holes.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_optimization.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_speed.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_sweep.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_comparison.py +228 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_hole_manifold.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_manifold.py +61 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_sweep.py +77 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_posttraining.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_radar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_comparison_radar.py +173 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_posttraining.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/brute_force.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_category.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_subcategory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/rewriting.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/selfcorrection_math.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_brute_force.py +248 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_category.py +132 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_subcategory.py +131 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_rewriting.py +105 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_selfcorrection_math.py +99 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/composition_heatmap.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/trend_by_month.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_composition.py +81 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_trend.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig1-material-mechanism-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig2-spatial-imaging-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig3-in-vivo-efficacy-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig4-single-cell-systems-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig5-validation-perturbation-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/evals/evals.json +37 -0
- package/skills/13_Visualization/nature-figure/manifest.yaml +57 -0
- package/skills/13_Visualization/nature-figure/references/api.md +428 -0
- package/skills/13_Visualization/nature-figure/references/backend-selection.md +100 -0
- package/skills/13_Visualization/nature-figure/references/chart-types.md +281 -0
- package/skills/13_Visualization/nature-figure/references/common-patterns.md +350 -0
- package/skills/13_Visualization/nature-figure/references/demos.md +65 -0
- package/skills/13_Visualization/nature-figure/references/design-theory.md +436 -0
- package/skills/13_Visualization/nature-figure/references/figure-contract.md +93 -0
- package/skills/13_Visualization/nature-figure/references/nature-2026-observations.md +112 -0
- package/skills/13_Visualization/nature-figure/references/qa-contract.md +119 -0
- package/skills/13_Visualization/nature-figure/references/r-template-index.md +66 -0
- package/skills/13_Visualization/nature-figure/references/r-workflow.md +161 -0
- package/skills/13_Visualization/nature-figure/references/tutorials.md +251 -0
- package/skills/13_Visualization/nature-figure/static/core/contract.md +29 -0
- package/skills/13_Visualization/nature-figure/static/core/stance.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/python.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/r.md +44 -0
- package/skills/14_Writing/markdown-report-writing/SKILL.md +306 -0
- package/skills/14_Writing/markdown-report-writing/references/compatibility-matrix.md +72 -0
- package/skills/14_Writing/markdown-report-writing/references/templates.md +299 -0
- package/skills/15_Others/neuroimaging-power-guide/SKILL.md +324 -0
- package/skills/15_Others/neuroimaging-power-guide/references/effect-size-lookup-tables.md +102 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/SKILL.md +330 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/references/worked-examples.md +220 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Prior Selection Guide for Bayesian Cognitive Models
|
|
2
|
+
|
|
3
|
+
This reference provides detailed prior recommendations for cognitive model parameters, organized by model family. Every numerical recommendation includes a citation or justification.
|
|
4
|
+
|
|
5
|
+
## General Prior Selection Workflow
|
|
6
|
+
|
|
7
|
+
1. **Identify the parameter type** (location, scale, probability, positive continuous, bounded)
|
|
8
|
+
2. **Check the domain-specific table below** for your model family
|
|
9
|
+
3. **Run a prior predictive check** to verify plausibility (see procedure at bottom)
|
|
10
|
+
4. **Document your prior choices** with justifications in your manuscript
|
|
11
|
+
|
|
12
|
+
## Prior Families Overview
|
|
13
|
+
|
|
14
|
+
### Normal / Gaussian
|
|
15
|
+
|
|
16
|
+
- **Use for**: Unbounded continuous parameters (regression coefficients, latent abilities, d')
|
|
17
|
+
- **Parameterization**: Normal(mean, sd)
|
|
18
|
+
- **Weakly informative default**: Center at theoretically neutral value (often 0), set sd to cover plausible range such that 95% prior mass spans roughly 2x the expected parameter range (Gelman et al., 2008)
|
|
19
|
+
|
|
20
|
+
### Student-t
|
|
21
|
+
|
|
22
|
+
- **Use for**: Unbounded continuous parameters when robustness to outliers is desired
|
|
23
|
+
- **Parameterization**: Student-t(df, location, scale)
|
|
24
|
+
- **Recommendation**: df=3 for heavy tails, df=7 for moderate tails (Gelman et al., 2013, Ch. 2)
|
|
25
|
+
- **Note**: Converges to Normal as df increases; Cauchy is the special case df=1
|
|
26
|
+
|
|
27
|
+
### Half-Normal / Half-Cauchy
|
|
28
|
+
|
|
29
|
+
- **Use for**: Standard deviation (scale) parameters, which must be positive
|
|
30
|
+
- **Half-Normal(0, sd)**: Recommended when you have a reasonable expectation for the scale; more informative than Half-Cauchy (Gelman, 2006)
|
|
31
|
+
- **Half-Cauchy(0, sd)**: Heavier tails; recommended as a default for group-level SDs when little is known; largely superseded by Half-Normal with thoughtful sd choice (Polson & Scott, 2012)
|
|
32
|
+
- **Current recommendation**: Half-Normal is generally preferred over Half-Cauchy for hierarchical SDs (Stan Prior Choice Recommendations wiki, 2023)
|
|
33
|
+
|
|
34
|
+
### Beta
|
|
35
|
+
|
|
36
|
+
- **Use for**: Parameters bounded in [0, 1] (probabilities, learning rates, proportions)
|
|
37
|
+
- **Parameterization**: Beta(alpha, beta)
|
|
38
|
+
- **Key shapes**:
|
|
39
|
+
- Beta(1, 1) = Uniform on [0,1] -- non-informative (Kruschke, 2015, Ch. 6)
|
|
40
|
+
- Beta(1.1, 1.1) -- weakly informative, gently regularizes away from 0 and 1
|
|
41
|
+
- Beta(2, 2) -- weakly informative, mildly peaked at 0.5
|
|
42
|
+
- Beta(a, b) with a, b > 2 -- increasingly informative toward a/(a+b)
|
|
43
|
+
|
|
44
|
+
### Gamma / Inverse-Gamma
|
|
45
|
+
|
|
46
|
+
- **Use for**: Positive continuous parameters (rate parameters, precision)
|
|
47
|
+
- **Parameterization**: Gamma(shape, rate) where mean = shape/rate
|
|
48
|
+
- **Caution**: Inverse-Gamma priors on variance parameters can be overly informative near zero; prefer Half-Normal or Half-Cauchy on SD parameters instead (Gelman, 2006)
|
|
49
|
+
|
|
50
|
+
### Lognormal
|
|
51
|
+
|
|
52
|
+
- **Use for**: Positive continuous parameters where multiplicative effects are expected (reaction times, neural firing rates)
|
|
53
|
+
- **Parameterization**: Lognormal(mu, sigma) where the parameter's log is Normal(mu, sigma)
|
|
54
|
+
- **Advantage**: Natural for parameters that span orders of magnitude; provides soft lower bound at zero
|
|
55
|
+
|
|
56
|
+
### LKJ (Lewandowski-Kurowicka-Joe)
|
|
57
|
+
|
|
58
|
+
- **Use for**: Correlation matrices in multivariate hierarchical models
|
|
59
|
+
- **Parameterization**: LKJ(eta)
|
|
60
|
+
- **Key values**:
|
|
61
|
+
- eta = 1: Uniform over valid correlation matrices (Lewandowski et al., 2009)
|
|
62
|
+
- **eta = 2**: Weakly informative; mildly favors smaller correlations; **Stan's recommended default** (Stan User's Guide, Section 1.13)
|
|
63
|
+
- eta > 2: Increasingly concentrates around the identity matrix (zero correlations)
|
|
64
|
+
- **Implementation note**: Always use the Cholesky factor parameterization (`lkj_corr_cholesky` in Stan, `LKJCholeskyCov` in PyMC) for numerical stability
|
|
65
|
+
|
|
66
|
+
### Dirichlet
|
|
67
|
+
|
|
68
|
+
- **Use for**: Probability vectors that sum to 1 (mixture weights, multinomial probabilities)
|
|
69
|
+
- **Parameterization**: Dirichlet(alpha_1, ..., alpha_K)
|
|
70
|
+
- **Key shapes**:
|
|
71
|
+
- All alpha_k = 1: Uniform on the simplex (Gelman et al., 2013, Ch. 2)
|
|
72
|
+
- All alpha_k = 0.5: Jeffreys prior; concentrates near vertices (sparse)
|
|
73
|
+
- All alpha_k = 2: Weakly informative; concentrates toward center (1/K, ..., 1/K)
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Cognitive-Domain-Specific Prior Tables
|
|
78
|
+
|
|
79
|
+
### Drift-Diffusion Model (DDM) Parameters
|
|
80
|
+
|
|
81
|
+
All ranges below assume the within-trial noise scaling parameter s = 1.0 (Navarro & Fuss, 2009 convention). If using s = 0.1 (Ratcliff, 1978 convention), divide all values by 10.
|
|
82
|
+
|
|
83
|
+
| Parameter | Symbol | Constraint | Recommended Prior | Justification | Source |
|
|
84
|
+
|-----------|--------|------------|-------------------|---------------|--------|
|
|
85
|
+
| Drift rate | v | Unbounded (typically -5 to 5) | Normal(0, 2) | Centers at no evidence; 95% mass covers -4 to 4, matching empirical range | Matzke & Wagenmakers, 2009; Wiecki et al., 2013 |
|
|
86
|
+
| Boundary separation | a | Positive (typically 0.5 to 2.5) | Half-Normal(0, 1) or Gamma(2, 2) | Must be positive; empirical values cluster around 0.5-2.0 | Matzke & Wagenmakers, 2009; Wiecki et al., 2013 |
|
|
87
|
+
| Non-decision time | t | Positive (typically 0.1 to 0.5 s) | Uniform(0.1, 1.0) or Gamma(4, 15) | Lower bound reflects minimum sensory+motor time (~100 ms); upper bound prevents absorbing observed RT | Matzke & Wagenmakers, 2009; Ratcliff & McKoon, 2008 |
|
|
88
|
+
| Starting point bias | z | (0, 1) as proportion of a | Beta(5, 5) centered at 0.5 | Weakly informative around no bias; allows moderate deviations | Wiecki et al., 2013 |
|
|
89
|
+
| Drift rate variability | sv | Positive | Half-Normal(0, 1) | Across-trial variability; can be difficult to estimate -- consider fixing to 0 if data are sparse | Ratcliff & McKoon, 2008 |
|
|
90
|
+
| Non-decision time variability | st | Positive, < t | Uniform(0, 0.3) or Half-Normal(0, 0.1) | Typically small; bounded by non-decision time itself | Ratcliff & McKoon, 2008 |
|
|
91
|
+
|
|
92
|
+
### Signal Detection Theory (SDT) Parameters
|
|
93
|
+
|
|
94
|
+
| Parameter | Symbol | Constraint | Recommended Prior | Justification | Source |
|
|
95
|
+
|-----------|--------|------------|-------------------|---------------|--------|
|
|
96
|
+
| Sensitivity | d' | Unbounded (typically 0 to 4) | Normal(0, 2) | Weakly informative; covers typical experimental range; allows negative d' for below-chance performance | Macmillan & Creelman, 2005; Rouder & Lu, 2005 |
|
|
97
|
+
| Criterion | c | Unbounded (typically -2 to 2) | Normal(0, 1.5) | Centered at no bias; covers liberal to conservative range | Macmillan & Creelman, 2005 |
|
|
98
|
+
| Hit rate | H | (0, 1) | Beta(1, 1) | Uniform; let data inform | Rouder & Lu, 2005 |
|
|
99
|
+
| False alarm rate | F | (0, 1) | Beta(1, 1) | Uniform; let data inform | Rouder & Lu, 2005 |
|
|
100
|
+
| Unequal variance ratio | sigma_s/sigma_n | Positive | Lognormal(0, 0.5) centered near 1 | Typical values 1.0-1.5 in recognition memory | Mickes et al., 2007 |
|
|
101
|
+
|
|
102
|
+
### Reinforcement Learning (RL) Parameters
|
|
103
|
+
|
|
104
|
+
| Parameter | Symbol | Constraint | Recommended Prior | Justification | Source |
|
|
105
|
+
|-----------|--------|------------|-------------------|---------------|--------|
|
|
106
|
+
| Learning rate | alpha | (0, 1) | Beta(1.1, 1.1) | Weakly informative; allows full range; gently regularizes away from 0 and 1 | Daw, 2011; Gershman, 2016 |
|
|
107
|
+
| Inverse temperature | beta | Positive (typically 0.5 to 20) | Gamma(2, 1) or Lognormal(1, 1) | Must be positive; empirical values commonly 1-10; higher values rare | Daw, 2011 |
|
|
108
|
+
| Decay rate | gamma | (0, 1) | Beta(2, 2) | Weakly informative centered at 0.5; values near 0 or 1 are unlikely in most tasks | Sutton & Barto, 2018, Ch. 3 |
|
|
109
|
+
| Perseveration | rho | Unbounded | Normal(0, 1) | Centered at no perseveration; can be positive (stay) or negative (switch) | Lau & Glimcher, 2005 |
|
|
110
|
+
| Dual learning rates (pos/neg PE) | alpha+, alpha- | (0, 1) each | Beta(1.1, 1.1) each | Same rationale as single learning rate; allows asymmetric updating | Frank et al., 2007 |
|
|
111
|
+
|
|
112
|
+
### Multinomial Processing Tree (MPT) Parameters
|
|
113
|
+
|
|
114
|
+
| Parameter | Symbol | Constraint | Recommended Prior | Justification | Source |
|
|
115
|
+
|-----------|--------|------------|-------------------|---------------|--------|
|
|
116
|
+
| Processing probabilities | p_i | (0, 1) | Beta(1, 1) for non-informative; Beta(a, b) from prior literature | Each processing path probability is independently bounded | Klauer, 2010 |
|
|
117
|
+
| Latent-trait (probit-transformed) | Phi^(-1)(p_i) | Unbounded | Normal(0, 1) | Standard probit prior for hierarchical MPT | Klauer, 2010 |
|
|
118
|
+
| Correlation of latent traits | R | Correlation matrix | LKJ(2) | Weakly informative; regularizes toward independence | Klauer, 2010; Stan User's Guide |
|
|
119
|
+
|
|
120
|
+
### Item Response Theory (IRT) Parameters
|
|
121
|
+
|
|
122
|
+
| Parameter | Symbol | Constraint | Recommended Prior | Justification | Source |
|
|
123
|
+
|-----------|--------|------------|-------------------|---------------|--------|
|
|
124
|
+
| Person ability | theta | Unbounded | Normal(0, 1) by convention | Identifies the scale; standard in IRT | de Boeck & Wilson, 2004 |
|
|
125
|
+
| Item difficulty | b | Unbounded | Normal(0, 2) | Weakly informative; typical range -3 to 3 on the logit scale | de Boeck & Wilson, 2004 |
|
|
126
|
+
| Item discrimination | a | Positive | Lognormal(0, 0.5) | Must be positive; typical range 0.5-3.0; Lognormal prevents negative values | de Boeck & Wilson, 2004; Buerkner, 2020 |
|
|
127
|
+
| Guessing parameter | c | (0, 0.5) | Beta(5, 23) | Peaked near 0.2 (1/5 for 5-option MC); upper bound reflects that guessing above chance is rare | de Boeck & Wilson, 2004 |
|
|
128
|
+
|
|
129
|
+
### Neural/Electrophysiological Parameters
|
|
130
|
+
|
|
131
|
+
| Parameter | Symbol | Constraint | Recommended Prior | Justification | Source |
|
|
132
|
+
|-----------|--------|------------|-------------------|---------------|--------|
|
|
133
|
+
| Firing rate | lambda | Positive | Gamma(2, 0.1) or Lognormal(2, 1) | Must be positive; typical cortical rates 1-100 Hz; allows wide range | Dayan & Abbott, 2001, Ch. 1 |
|
|
134
|
+
| ERP amplitude | A | Unbounded | Normal(0, 10) in microvolts | ERP components typically -15 to +15 uV; generous coverage | Luck, 2014, Ch. 1 |
|
|
135
|
+
| ERP latency | tau | Positive (ms) | Normal(expected_peak, 50) truncated at 0 | Component-specific: e.g., N400 expected at 400 ms; truncation enforces positivity | Luck, 2014, Ch. 2 |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Hierarchical Prior Structure
|
|
140
|
+
|
|
141
|
+
For any parameter theta with individual-level values theta_j (j = 1, ..., J participants):
|
|
142
|
+
|
|
143
|
+
### Standard Two-Level Hierarchy
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
Group level:
|
|
147
|
+
mu_theta ~ [weakly informative prior from tables above]
|
|
148
|
+
sigma_theta ~ Half-Normal(0, sd_hyper)
|
|
149
|
+
|
|
150
|
+
Individual level (non-centered):
|
|
151
|
+
eta_j ~ Normal(0, 1)
|
|
152
|
+
theta_j = mu_theta + sigma_theta * eta_j
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Choosing sd_hyper for Group-Level SD
|
|
156
|
+
|
|
157
|
+
The hyperprior on sigma_theta (the between-participant SD) is often the most consequential prior choice. Recommendations:
|
|
158
|
+
|
|
159
|
+
- **Half-Normal(0, 1)**: Safe default when parameters are on a standardized scale (Gelman, 2006)
|
|
160
|
+
- **Half-Normal(0, sd)** where sd is set to roughly the expected magnitude of individual differences. For example, if you expect drift rates to vary by roughly 0.5 across participants, use Half-Normal(0, 0.5) (Gelman, 2006)
|
|
161
|
+
- **Exponential(1)**: Alternative that assigns more mass near zero; useful when you suspect small individual differences (Gelman et al., 2013, Ch. 5)
|
|
162
|
+
|
|
163
|
+
> **Warning**: Do not use Inverse-Gamma(epsilon, epsilon) (e.g., Inverse-Gamma(0.001, 0.001)) as a "non-informative" prior on variance. This is a legacy BUGS/JAGS practice that creates an informative prior concentrated away from zero, distorting hierarchical shrinkage (Gelman, 2006).
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Prior Predictive Checking Procedure
|
|
168
|
+
|
|
169
|
+
### Step-by-Step Protocol
|
|
170
|
+
|
|
171
|
+
1. **Define the full generative model** including all priors and hyperpriors
|
|
172
|
+
2. **Sample N_sim = 500-1000 parameter sets** from the prior (no data involved)
|
|
173
|
+
3. **For each parameter set, simulate a complete dataset** with the same structure as your real data (same number of participants, trials, conditions)
|
|
174
|
+
4. **Compute summary statistics** on each simulated dataset:
|
|
175
|
+
- For RT models: mean RT, SD of RT, quantiles (0.1, 0.5, 0.9), proportion of RTs < 100 ms, proportion > 5 s
|
|
176
|
+
- For accuracy models: overall accuracy, accuracy by condition
|
|
177
|
+
- For learning models: learning curve shape, final performance level
|
|
178
|
+
5. **Visualize the distribution of summary statistics** across simulations
|
|
179
|
+
6. **Check for absurdities**:
|
|
180
|
+
|
|
181
|
+
| Red Flag | Likely Cause | Fix |
|
|
182
|
+
|----------|-------------|-----|
|
|
183
|
+
| Negative RTs or RTs > 60 s | Non-decision time prior too diffuse, or drift rate prior allows values near 0 | Tighten lower bound on t; ensure v prior has reasonable mass away from 0 |
|
|
184
|
+
| Accuracy always near 50% | Drift rate prior centered at 0 with small SD | Widen drift rate prior or add condition-specific means |
|
|
185
|
+
| Accuracy always near 100% | Boundary separation prior too high relative to drift | Lower the upper tail of boundary separation prior |
|
|
186
|
+
| Learning rate = 0 or 1 for most draws | Beta prior concentrating at boundaries | Use Beta(1.1, 1.1) or Beta(2, 2) |
|
|
187
|
+
| Predicted firing rates > 1000 Hz | Gamma/Lognormal prior too diffuse | Tighten the rate prior; cortical neurons rarely exceed 200 Hz (Dayan & Abbott, 2001) |
|
|
188
|
+
|
|
189
|
+
7. **Iterate** until prior predictive distributions cover the plausible data space without substantial mass on implausible values
|
|
190
|
+
8. **Document** the final prior specification and the prior predictive check results
|
|
191
|
+
|
|
192
|
+
### Example: Prior Predictive Check for Hierarchical DDM
|
|
193
|
+
|
|
194
|
+
```
|
|
195
|
+
# Pseudocode for prior predictive check
|
|
196
|
+
for i in 1:1000:
|
|
197
|
+
mu_v ~ Normal(0, 2) # Group mean drift rate
|
|
198
|
+
sigma_v ~ Half-Normal(0, 1) # Between-participant SD
|
|
199
|
+
mu_a ~ Half-Normal(0, 1) # Group mean boundary
|
|
200
|
+
sigma_a ~ Half-Normal(0, 0.5)
|
|
201
|
+
mu_t ~ Uniform(0.1, 1.0) # Group mean non-decision time
|
|
202
|
+
sigma_t ~ Half-Normal(0, 0.1)
|
|
203
|
+
|
|
204
|
+
for j in 1:30: # 30 simulated participants
|
|
205
|
+
v_j = mu_v + sigma_v * Normal(0,1)
|
|
206
|
+
a_j = |mu_a + sigma_a * Normal(0,1)| # enforce positive
|
|
207
|
+
t_j = clip(mu_t + sigma_t * Normal(0,1), 0.05, 2.0)
|
|
208
|
+
|
|
209
|
+
Simulate 100 DDM trials with (v_j, a_j, t_j)
|
|
210
|
+
|
|
211
|
+
Store summary statistics (mean RT, accuracy, RT quantiles)
|
|
212
|
+
|
|
213
|
+
Plot distributions of summary statistics
|
|
214
|
+
Check: Are simulated RTs in [0.2, 5.0] s? Is accuracy in [0.5, 1.0]?
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## References
|
|
218
|
+
|
|
219
|
+
- Buerkner, P. C. (2020). Bayesian item response modeling in R with brms and Stan. *arXiv:1905.09501*.
|
|
220
|
+
- Daw, N. D. (2011). Trial-by-trial data analysis using computational models. In *Decision Making, Affect, and Learning*. Oxford University Press.
|
|
221
|
+
- Dayan, P., & Abbott, L. F. (2001). *Theoretical Neuroscience*. MIT Press.
|
|
222
|
+
- de Boeck, P., & Wilson, M. (2004). *Explanatory Item Response Models*. Springer.
|
|
223
|
+
- Frank, M. J., Moustafa, A. A., Haughey, H. M., Curran, T., & Hutchison, K. E. (2007). Genetic triple dissociation reveals multiple roles for dopamine in reinforcement learning. *PNAS*, 104(41), 16311-16316.
|
|
224
|
+
- Gelman, A. (2006). Prior distributions for variance parameters in hierarchical models. *Bayesian Analysis*, 1(3), 515-534.
|
|
225
|
+
- Gelman, A., Jakulin, A., Pittau, M. G., & Su, Y. S. (2008). A weakly informative default prior distribution for logistic and other regression models. *Annals of Applied Statistics*, 2(4), 1360-1383.
|
|
226
|
+
- Gelman, A., et al. (2013). *Bayesian Data Analysis* (3rd ed.). Chapman and Hall/CRC.
|
|
227
|
+
- Gershman, S. J. (2016). Empirical priors for reinforcement learning models. *Journal of Mathematical Psychology*, 71, 1-6.
|
|
228
|
+
- Klauer, K. C. (2010). Hierarchical multinomial processing tree models: A latent-trait approach. *Psychometrika*, 75(1), 70-98.
|
|
229
|
+
- Kruschke, J. K. (2015). *Doing Bayesian Data Analysis* (2nd ed.). Academic Press.
|
|
230
|
+
- Lau, B., & Glimcher, P. W. (2005). Dynamic response-by-response models of matching behavior in rhesus monkeys. *Journal of the Experimental Analysis of Behavior*, 84(3), 555-579.
|
|
231
|
+
- Lewandowski, D., Kurowicka, D., & Joe, H. (2009). Generating random correlation matrices based on vines and extended onion method. *Journal of Multivariate Analysis*, 100(9), 1989-2001.
|
|
232
|
+
- Luck, S. J. (2014). *An Introduction to the Event-Related Potential Technique* (2nd ed.). MIT Press.
|
|
233
|
+
- Macmillan, N. A., & Creelman, C. D. (2005). *Detection Theory: A User's Guide* (2nd ed.). Lawrence Erlbaum Associates.
|
|
234
|
+
- Matzke, D., & Wagenmakers, E. J. (2009). Psychological interpretation of the ex-Gaussian and shifted Wald parameters: A diffusion model analysis. *Psychonomic Bulletin & Review*, 16, 798-817.
|
|
235
|
+
- Mickes, L., Wixted, J. T., & Wais, P. E. (2007). A direct test of the unequal-variance signal detection model of recognition memory. *Psychonomic Bulletin & Review*, 14(5), 858-865.
|
|
236
|
+
- Polson, N. G., & Scott, J. G. (2012). On the half-Cauchy prior for a global scale parameter. *Bayesian Analysis*, 7(4), 887-902.
|
|
237
|
+
- Ratcliff, R. (1978). A theory of memory retrieval. *Psychological Review*, 85(2), 59-108.
|
|
238
|
+
- Ratcliff, R., & McKoon, G. (2008). The diffusion decision model: Theory and data for two-choice decision tasks. *Neural Computation*, 20(4), 873-922.
|
|
239
|
+
- Rouder, J. N., & Lu, J. (2005). An introduction to Bayesian hierarchical models with an application in the theory of signal detection. *Psychonomic Bulletin & Review*, 12, 573-604.
|
|
240
|
+
- Sutton, R. S., & Barto, A. G. (2018). *Reinforcement Learning: An Introduction* (2nd ed.). MIT Press.
|
|
241
|
+
- 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.
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "parameter-recovery-checker"
|
|
3
|
+
description: "Guides parameter recovery studies to validate model identifiability before trusting fitted parameter values"
|
|
4
|
+
domain: "computational-cognitive-modeling"
|
|
5
|
+
version: "1.0.0"
|
|
6
|
+
papers:
|
|
7
|
+
- "Heathcote et al., 2015"
|
|
8
|
+
- "Wilson & Collins, 2019"
|
|
9
|
+
- "Wagenmakers et al., 2004"
|
|
10
|
+
- "Navarro, 2019"
|
|
11
|
+
dependencies:
|
|
12
|
+
required:
|
|
13
|
+
- research-literacy
|
|
14
|
+
review_status: "ai-generated"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Parameter Recovery Checker
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
This skill encodes expert methodological knowledge for conducting parameter recovery studies -- a critical validation step before interpreting fitted model parameters. Parameter recovery determines whether a model's parameters are identifiable given the experimental design and sample size. A general-purpose programmer unfamiliar with computational modeling would not know that fitting a model is insufficient validation, or how to diagnose parameter tradeoffs and non-identifiability.
|
|
22
|
+
|
|
23
|
+
## When to Use This Skill
|
|
24
|
+
|
|
25
|
+
- Before trusting fitted parameter values from any computational cognitive model
|
|
26
|
+
- When developing a new model and assessing whether parameters can be distinguished from data
|
|
27
|
+
- When planning an experiment and determining the minimum trial count for reliable parameter estimation
|
|
28
|
+
- When a reviewer asks for evidence of model identifiability
|
|
29
|
+
- When comparing models and needing to ensure each model can be distinguished (model recovery)
|
|
30
|
+
- When fitted parameters produce suspiciously extreme values or hit bounds
|
|
31
|
+
|
|
32
|
+
## Research Planning Protocol
|
|
33
|
+
|
|
34
|
+
Before executing the domain-specific steps below, you MUST:
|
|
35
|
+
|
|
36
|
+
1. **State the research question** -- What specific question is this analysis/paradigm addressing?
|
|
37
|
+
2. **Justify the method choice** -- Why is this approach appropriate? What alternatives were considered?
|
|
38
|
+
3. **Declare expected outcomes** -- What results would support vs. refute the hypothesis?
|
|
39
|
+
4. **Note assumptions and limitations** -- What does this method assume? Where could it mislead?
|
|
40
|
+
5. **Present the plan to the user and WAIT for confirmation** before proceeding.
|
|
41
|
+
|
|
42
|
+
For detailed methodology guidance, see the `research-literacy` skill.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## ⚠️ Verification Notice
|
|
46
|
+
|
|
47
|
+
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](https://github.com/HaoxuanLiTHUAI/awesome_cognitive_and_neuroscience_skills/issues).
|
|
48
|
+
|
|
49
|
+
## Why Parameter Recovery Matters
|
|
50
|
+
|
|
51
|
+
Fitting a model to data and obtaining parameter estimates does NOT guarantee those estimates are meaningful (Wilson & Collins, 2019; Navarro, 2019). Common failure modes:
|
|
52
|
+
|
|
53
|
+
1. **Non-identifiability**: Multiple parameter combinations produce identical model predictions (e.g., drift rate and boundary in DDM trade off; Ratcliff & Tuerlinckx, 2002)
|
|
54
|
+
2. **Insufficient data**: Too few trials for the fitting procedure to recover true values
|
|
55
|
+
3. **Local minima**: Optimization converges to wrong parameter values
|
|
56
|
+
4. **Model misspecification**: The fitting procedure recovers parameters that do not reflect the assumed cognitive process
|
|
57
|
+
|
|
58
|
+
Parameter recovery is the standard diagnostic for these problems (Heathcote et al., 2015; Wilson & Collins, 2019).
|
|
59
|
+
|
|
60
|
+
## Step-by-Step Recovery Procedure
|
|
61
|
+
|
|
62
|
+
### Step 1: Define the Parameter Space
|
|
63
|
+
|
|
64
|
+
Choose ground-truth parameter values that span the plausible range for each parameter.
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
How many parameter sets to simulate?
|
|
68
|
+
|
|
|
69
|
+
+-- Minimum: 100 parameter sets (Wilson & Collins, 2019)
|
|
70
|
+
|
|
|
71
|
+
+-- Recommended: 500-1000 parameter sets for smooth recovery landscapes
|
|
72
|
+
|
|
|
73
|
+
+-- For publication: 1000+ parameter sets (Heathcote et al., 2015)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**Sampling strategy:**
|
|
77
|
+
|
|
78
|
+
| Strategy | When to Use | Source |
|
|
79
|
+
|----------|-------------|--------|
|
|
80
|
+
| Uniform grid | Few parameters (1-2), want complete coverage | Standard practice |
|
|
81
|
+
| Latin hypercube | 3+ parameters, want space-filling without excessive samples | McKay et al., 1979 |
|
|
82
|
+
| Random uniform | Simple, adequate for many parameters | Wilson & Collins, 2019 |
|
|
83
|
+
| Prior-based sampling | Have informative priors on parameter ranges | Palestro et al., 2018 |
|
|
84
|
+
|
|
85
|
+
**Range selection**: Use ranges from published parameter estimates in the domain. For example:
|
|
86
|
+
- DDM drift rate v: **0.5 -- 4.0** (Ratcliff & McKoon, 2008)
|
|
87
|
+
- DDM boundary a: **0.5 -- 2.5** (Ratcliff & McKoon, 2008)
|
|
88
|
+
- DDM non-decision time Ter: **0.1 -- 0.5 s** (Ratcliff & McKoon, 2008)
|
|
89
|
+
- ACT-R activation noise s: **0.1 -- 0.8** (Anderson, 2007)
|
|
90
|
+
|
|
91
|
+
### Step 2: Simulate Data
|
|
92
|
+
|
|
93
|
+
For each ground-truth parameter set:
|
|
94
|
+
|
|
95
|
+
1. **Match the experimental design exactly** -- Same number of trials, conditions, and structure as the real experiment
|
|
96
|
+
2. **Use the same model** -- The generative model must be identical to the model you will fit
|
|
97
|
+
3. **Include realistic noise** -- Use the model's noise mechanism (do not add external noise)
|
|
98
|
+
4. **Store the ground-truth parameters** for later comparison
|
|
99
|
+
|
|
100
|
+
**Critical**: The number of simulated trials per participant must match the actual experiment. Recovery with 10,000 trials tells you nothing about recovery with 100 trials (Wilson & Collins, 2019).
|
|
101
|
+
|
|
102
|
+
### Step 3: Fit the Model to Simulated Data
|
|
103
|
+
|
|
104
|
+
Apply the **exact same fitting procedure** you use for real data:
|
|
105
|
+
|
|
106
|
+
- Same optimization algorithm (e.g., MLE, Bayesian, chi-square minimization)
|
|
107
|
+
- Same parameter bounds and constraints
|
|
108
|
+
- Same starting values or initialization strategy
|
|
109
|
+
- Same convergence criteria
|
|
110
|
+
|
|
111
|
+
**Multiple starting points**: Run the optimizer from at least **5-10** random starting points per simulated dataset to avoid local minima (Heathcote et al., 2015).
|
|
112
|
+
|
|
113
|
+
### Step 4: Evaluate Recovery Quality
|
|
114
|
+
|
|
115
|
+
Compare recovered parameters to true (ground-truth) parameters using multiple metrics.
|
|
116
|
+
|
|
117
|
+
#### Primary Metrics
|
|
118
|
+
|
|
119
|
+
| Metric | Formula | Good | Acceptable | Concerning | Source |
|
|
120
|
+
|--------|---------|------|------------|------------|--------|
|
|
121
|
+
| Pearson correlation (r) | cor(true, recovered) | r > **0.9** | r > **0.8** | r < **0.7** | Heathcote et al., 2015; rough benchmarks |
|
|
122
|
+
| Bias | mean(recovered - true) | Near **0** | < **10%** of range | > **20%** of range | Wilson & Collins, 2019 |
|
|
123
|
+
| RMSE | sqrt(mean((recovered - true)^2)) | Small relative to range | -- | Large relative to range | Standard |
|
|
124
|
+
| Coverage | % of 95% CIs containing true value | ~**95%** | **85-100%** | < **80%** | Bayesian recovery |
|
|
125
|
+
|
|
126
|
+
#### Visualization (essential)
|
|
127
|
+
|
|
128
|
+
1. **Scatter plot**: Recovered vs. true for each parameter (identity line = perfect recovery)
|
|
129
|
+
2. **Bland-Altman plot**: Difference vs. mean (detect range-dependent bias)
|
|
130
|
+
3. **Parameter correlation matrix**: Off-diagonal correlations reveal tradeoffs
|
|
131
|
+
|
|
132
|
+
See `references/recovery-diagnostics.md` for visualization templates.
|
|
133
|
+
|
|
134
|
+
### Step 5: Check Parameter Tradeoffs
|
|
135
|
+
|
|
136
|
+
**Correlation between recovered parameters:**
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Are any pairs of recovered parameters correlated |r| > 0.5?
|
|
140
|
+
|
|
|
141
|
+
+-- YES --> These parameters trade off. Consider:
|
|
142
|
+
| - Fixing one to a theoretically motivated value
|
|
143
|
+
| - Reparameterizing the model
|
|
144
|
+
| - Collecting more data to improve identifiability
|
|
145
|
+
| - Reporting the tradeoff and interpreting cautiously
|
|
146
|
+
|
|
|
147
|
+
+-- NO --> Parameters are identifiable given this design
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
**Common parameter tradeoffs in cognitive models:**
|
|
151
|
+
|
|
152
|
+
| Model | Correlated Parameters | Nature of Tradeoff | Source |
|
|
153
|
+
|-------|----------------------|-------------------|--------|
|
|
154
|
+
| DDM | Drift rate (v) and boundary (a) | Speed-accuracy tradeoff | Ratcliff & Tuerlinckx, 2002 |
|
|
155
|
+
| DDM | Non-decision time (Ter) and boundary (a) | Boundary absorbs timing variance | Ratcliff & Tuerlinckx, 2002 |
|
|
156
|
+
| ACT-R | Noise (s) and threshold (tau) | Both affect retrieval probability | Anderson, 2007 |
|
|
157
|
+
| RL models | Learning rate (alpha) and inverse temperature (beta) | Both control exploitation | Daw, 2011 |
|
|
158
|
+
| Signal detection | d-prime and criterion (c) | Criterion shift mimics sensitivity change | Macmillan & Creelman, 2005 |
|
|
159
|
+
|
|
160
|
+
## Model Recovery (Confusion Matrix)
|
|
161
|
+
|
|
162
|
+
Model recovery extends parameter recovery to test whether the correct model can be identified from data (Wagenmakers et al., 2004).
|
|
163
|
+
|
|
164
|
+
### Procedure
|
|
165
|
+
|
|
166
|
+
1. For each candidate model M_k (k = 1, ..., K):
|
|
167
|
+
a. Simulate data from M_k with representative parameters
|
|
168
|
+
b. Fit ALL candidate models to the simulated data
|
|
169
|
+
c. Select the best-fitting model using your comparison metric (AIC, BIC, Bayes factor)
|
|
170
|
+
2. Construct a K x K **confusion matrix**: rows = generating model, columns = selected model
|
|
171
|
+
3. Diagonal entries should dominate (correct model selected)
|
|
172
|
+
|
|
173
|
+
### Quality Criteria
|
|
174
|
+
|
|
175
|
+
| Metric | Good | Concerning | Source |
|
|
176
|
+
|--------|------|------------|--------|
|
|
177
|
+
| Diagonal proportion | > **90%** correct | < **70%** correct | Wagenmakers et al., 2004 |
|
|
178
|
+
| Off-diagonal patterns | Symmetric confusion | Asymmetric (one model always "wins") | Wilson & Collins, 2019 |
|
|
179
|
+
|
|
180
|
+
**Warning**: If model A is selected when data are generated from model B more than **20%** of the time, those models are not distinguishable with your experimental design (Wilson & Collins, 2019).
|
|
181
|
+
|
|
182
|
+
## Sample Size Effects
|
|
183
|
+
|
|
184
|
+
### How Trial Count Affects Recovery
|
|
185
|
+
|
|
186
|
+
Recovery quality improves with more trials per participant. Test recovery at multiple trial counts:
|
|
187
|
+
|
|
188
|
+
| Trial Count | Expected Recovery | Recommendation |
|
|
189
|
+
|-------------|-------------------|----------------|
|
|
190
|
+
| < **50** trials | Often poor (r < 0.7) | Increase trials or simplify model |
|
|
191
|
+
| **50-100** trials | Marginal for simple models | May suffice for 2-3 parameter models |
|
|
192
|
+
| **100-200** trials | Adequate for most models | Standard for DDM (Ratcliff & McKoon, 2008) |
|
|
193
|
+
| **200-500** trials | Good for complex models | Recommended for models with > 4 parameters |
|
|
194
|
+
| **500+** trials | Excellent for most models | Required for hierarchical models |
|
|
195
|
+
|
|
196
|
+
Source: Wilson & Collins (2019); Ratcliff & Tuerlinckx (2002) for DDM-specific guidance.
|
|
197
|
+
|
|
198
|
+
### Recovery as a Function of N
|
|
199
|
+
|
|
200
|
+
Plot recovery metrics (r, RMSE) as a function of trial count to determine the minimum viable N for your specific model and paradigm.
|
|
201
|
+
|
|
202
|
+
## Landscape Analysis
|
|
203
|
+
|
|
204
|
+
### Parameter Sensitivity Surfaces
|
|
205
|
+
|
|
206
|
+
For 1-2 key parameters, compute and visualize the objective function surface:
|
|
207
|
+
|
|
208
|
+
1. Fix all parameters except the target parameter(s)
|
|
209
|
+
2. Evaluate the objective function (e.g., negative log-likelihood) at a grid of values
|
|
210
|
+
3. Plot the surface (1D: line; 2D: contour or heatmap)
|
|
211
|
+
|
|
212
|
+
**What to look for:**
|
|
213
|
+
|
|
214
|
+
| Surface Feature | Interpretation | Action |
|
|
215
|
+
|-----------------|---------------|--------|
|
|
216
|
+
| Single sharp minimum | Well-identified parameter | Proceed with confidence |
|
|
217
|
+
| Broad flat minimum | Parameter poorly constrained | Widen prior or collect more data |
|
|
218
|
+
| Multiple minima | Non-convex; local minima risk | Use multiple starting points; consider reparameterization |
|
|
219
|
+
| Ridge (elongated valley) | Parameter tradeoff | Two parameters are correlated; consider fixing one |
|
|
220
|
+
|
|
221
|
+
## Reporting Standards
|
|
222
|
+
|
|
223
|
+
### Minimum Reporting Checklist
|
|
224
|
+
|
|
225
|
+
When publishing a parameter recovery study:
|
|
226
|
+
|
|
227
|
+
- [ ] Number of simulated parameter sets (minimum **100**; Wilson & Collins, 2019)
|
|
228
|
+
- [ ] Sampling strategy for ground-truth parameters (uniform, LHS, prior-based)
|
|
229
|
+
- [ ] Range of ground-truth values for each parameter (with justification)
|
|
230
|
+
- [ ] Number of simulated trials per dataset (must match real experiment)
|
|
231
|
+
- [ ] Fitting procedure used (same as for real data)
|
|
232
|
+
- [ ] Number of starting points for optimization
|
|
233
|
+
- [ ] Recovery metrics for each parameter: correlation (r), bias, RMSE
|
|
234
|
+
- [ ] Scatter plots: recovered vs. true for each parameter
|
|
235
|
+
- [ ] Parameter correlation matrix (recovered parameters)
|
|
236
|
+
- [ ] Model recovery confusion matrix (if performing model comparison)
|
|
237
|
+
- [ ] Recovery as a function of trial count (if applicable)
|
|
238
|
+
|
|
239
|
+
### Where to Report
|
|
240
|
+
|
|
241
|
+
- **Main text**: Summary of recovery quality (r values, key plots)
|
|
242
|
+
- **Supplementary**: Full correlation matrices, all scatter plots, landscape analyses
|
|
243
|
+
- Parameter recovery is increasingly expected in top journals (Wilson & Collins, 2019; Navarro, 2019)
|
|
244
|
+
|
|
245
|
+
## Common Pitfalls
|
|
246
|
+
|
|
247
|
+
1. **Testing recovery with too many trials**: Simulating 10,000 trials when the experiment has 100. Recovery will look excellent but is irrelevant to your actual data (Wilson & Collins, 2019).
|
|
248
|
+
2. **Using different fitting procedures**: The recovery study must use the identical optimization pipeline as the real-data analysis. Different starting values, bounds, or algorithms invalidate the test.
|
|
249
|
+
3. **Ignoring parameter correlations**: High marginal recovery (good r for each parameter) can coexist with strong parameter tradeoffs that distort interpretation. Always check the cross-parameter correlation matrix.
|
|
250
|
+
4. **Reporting only correlation**: Correlation measures rank-order recovery but ignores systematic bias. A parameter can have r = 0.95 but be consistently overestimated by 30%. Report bias and RMSE alongside r.
|
|
251
|
+
5. **Sampling only near defaults**: If ground-truth values cluster around typical defaults, recovery may look good only in that region. Sample across the full plausible range.
|
|
252
|
+
6. **Neglecting model recovery**: Good parameter recovery does not guarantee good model recovery. Two models can have recoverable parameters individually but be indistinguishable when competing (Wagenmakers et al., 2004).
|
|
253
|
+
7. **Confusing identifiability with validity**: A model can have perfectly recoverable parameters and still be a poor model of cognition. Recovery is necessary but not sufficient (Navarro, 2019).
|
|
254
|
+
|
|
255
|
+
## References
|
|
256
|
+
|
|
257
|
+
- Anderson, J. R. (2007). *How Can the Human Mind Occur in the Physical Universe?* Oxford University Press.
|
|
258
|
+
- Daw, N. D. (2011). Trial-by-trial data analysis using computational models. In M. R. Delgado, E. A. Phelps, & T. W. Robbins (Eds.), *Decision Making, Affect, and Learning*. Oxford University Press.
|
|
259
|
+
- Heathcote, A., Brown, S. D., & Wagenmakers, E.-J. (2015). An introduction to good practices in cognitive modeling. In B. U. Forstmann & E.-J. Wagenmakers (Eds.), *An Introduction to Model-Based Cognitive Neuroscience*. Springer.
|
|
260
|
+
- Macmillan, N. A., & Creelman, C. D. (2005). *Detection Theory: A User's Guide* (2nd ed.). Lawrence Erlbaum Associates.
|
|
261
|
+
- McKay, M. D., Beckman, R. J., & Conover, W. J. (1979). A comparison of three methods for selecting values of input variables. *Technometrics*, 21(2), 239-245.
|
|
262
|
+
- Navarro, D. J. (2019). Between the devil and the deep blue sea: Tensions between scientific judgement and statistical model selection. *Computational Brain & Behavior*, 2(1), 28-34.
|
|
263
|
+
- Palestro, J. J., Sederberg, P. B., Osth, A. F., Van Zandt, T., & Turner, B. M. (2018). Likelihood-free methods for cognitive science. Springer.
|
|
264
|
+
- Ratcliff, R., & McKoon, G. (2008). The diffusion decision model: Theory and data for two-choice decision tasks. *Neural Computation*, 20(4), 873-922.
|
|
265
|
+
- Ratcliff, R., & Tuerlinckx, F. (2002). Estimating parameters of the diffusion model. *Psychonomic Bulletin & Review*, 9(3), 438-481.
|
|
266
|
+
- Wagenmakers, E.-J., Ratcliff, R., Gomez, P., & Iverson, G. J. (2004). Assessing model mimicry using the parametric bootstrap. *Journal of Mathematical Psychology*, 48(1), 28-50.
|
|
267
|
+
- Wilson, R. C., & Collins, A. G. (2019). Ten simple rules for the computational modeling of behavioral data. *eLife*, 8, e49547.
|
|
268
|
+
|
|
269
|
+
See `references/` for diagnostic visualization templates and worked examples.
|