skills/parameter-recovery-checker/SKILL.md
Guides parameter recovery studies to validate model identifiability before trusting fitted parameter values
npx skillsauth add haoxuanlithuai/awesome_cognitive_and_neuroscience_skills parameter-recovery-checkerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
Before executing the domain-specific steps below, you MUST:
For detailed methodology guidance, see the research-literacy skill.
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.
Fitting a model to data and obtaining parameter estimates does NOT guarantee those estimates are meaningful (Wilson & Collins, 2019; Navarro, 2019). Common failure modes:
Parameter recovery is the standard diagnostic for these problems (Heathcote et al., 2015; Wilson & Collins, 2019).
Choose ground-truth parameter values that span the plausible range for each parameter.
How many parameter sets to simulate?
|
+-- Minimum: 100 parameter sets (Wilson & Collins, 2019)
|
+-- Recommended: 500-1000 parameter sets for smooth recovery landscapes
|
+-- For publication: 1000+ parameter sets (Heathcote et al., 2015)
Sampling strategy:
| Strategy | When to Use | Source | |----------|-------------|--------| | Uniform grid | Few parameters (1-2), want complete coverage | Standard practice | | Latin hypercube | 3+ parameters, want space-filling without excessive samples | McKay et al., 1979 | | Random uniform | Simple, adequate for many parameters | Wilson & Collins, 2019 | | Prior-based sampling | Have informative priors on parameter ranges | Palestro et al., 2018 |
Range selection: Use ranges from published parameter estimates in the domain. For example:
For each ground-truth parameter set:
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).
Apply the exact same fitting procedure you use for real data:
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).
Compare recovered parameters to true (ground-truth) parameters using multiple metrics.
| Metric | Formula | Good | Acceptable | Concerning | Source | |--------|---------|------|------------|------------|--------| | Pearson correlation (r) | cor(true, recovered) | r > 0.9 | r > 0.8 | r < 0.7 | Heathcote et al., 2015; rough benchmarks | | Bias | mean(recovered - true) | Near 0 | < 10% of range | > 20% of range | Wilson & Collins, 2019 | | RMSE | sqrt(mean((recovered - true)^2)) | Small relative to range | -- | Large relative to range | Standard | | Coverage | % of 95% CIs containing true value | ~95% | 85-100% | < 80% | Bayesian recovery |
See references/recovery-diagnostics.md for visualization templates.
Correlation between recovered parameters:
Are any pairs of recovered parameters correlated |r| > 0.5?
|
+-- YES --> These parameters trade off. Consider:
| - Fixing one to a theoretically motivated value
| - Reparameterizing the model
| - Collecting more data to improve identifiability
| - Reporting the tradeoff and interpreting cautiously
|
+-- NO --> Parameters are identifiable given this design
Common parameter tradeoffs in cognitive models:
| Model | Correlated Parameters | Nature of Tradeoff | Source | |-------|----------------------|-------------------|--------| | DDM | Drift rate (v) and boundary (a) | Speed-accuracy tradeoff | Ratcliff & Tuerlinckx, 2002 | | DDM | Non-decision time (Ter) and boundary (a) | Boundary absorbs timing variance | Ratcliff & Tuerlinckx, 2002 | | ACT-R | Noise (s) and threshold (tau) | Both affect retrieval probability | Anderson, 2007 | | RL models | Learning rate (alpha) and inverse temperature (beta) | Both control exploitation | Daw, 2011 | | Signal detection | d-prime and criterion (c) | Criterion shift mimics sensitivity change | Macmillan & Creelman, 2005 |
Model recovery extends parameter recovery to test whether the correct model can be identified from data (Wagenmakers et al., 2004).
| Metric | Good | Concerning | Source | |--------|------|------------|--------| | Diagonal proportion | > 90% correct | < 70% correct | Wagenmakers et al., 2004 | | Off-diagonal patterns | Symmetric confusion | Asymmetric (one model always "wins") | Wilson & Collins, 2019 |
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).
Recovery quality improves with more trials per participant. Test recovery at multiple trial counts:
| Trial Count | Expected Recovery | Recommendation | |-------------|-------------------|----------------| | < 50 trials | Often poor (r < 0.7) | Increase trials or simplify model | | 50-100 trials | Marginal for simple models | May suffice for 2-3 parameter models | | 100-200 trials | Adequate for most models | Standard for DDM (Ratcliff & McKoon, 2008) | | 200-500 trials | Good for complex models | Recommended for models with > 4 parameters | | 500+ trials | Excellent for most models | Required for hierarchical models |
Source: Wilson & Collins (2019); Ratcliff & Tuerlinckx (2002) for DDM-specific guidance.
Plot recovery metrics (r, RMSE) as a function of trial count to determine the minimum viable N for your specific model and paradigm.
For 1-2 key parameters, compute and visualize the objective function surface:
What to look for:
| Surface Feature | Interpretation | Action | |-----------------|---------------|--------| | Single sharp minimum | Well-identified parameter | Proceed with confidence | | Broad flat minimum | Parameter poorly constrained | Widen prior or collect more data | | Multiple minima | Non-convex; local minima risk | Use multiple starting points; consider reparameterization | | Ridge (elongated valley) | Parameter tradeoff | Two parameters are correlated; consider fixing one |
When publishing a parameter recovery study:
See references/ for diagnostic visualization templates and worked examples.
tools
Convert a GitHub repository or local codebase into a well-structured Claude Code skill with progressive disclosure. Use this skill whenever the user provides a GitHub URL or local repo path and asks to turn it into a skill, create a skill from a repo, or convert a library/tool/framework into reusable skill documentation. Also trigger when users say things like 'make a skill from this repo', 'turn this codebase into a skill', or 'I want a skill for [library name]'.
development
Domain-validated guidance for cortical surface visualization and brain surface rendering of fMRI data using pycortex: data types (Volume, Vertex, Dataset), 2D cortical flatmaps, 3D WebGL brain viewers, volume-to-surface mapping, FreeSurfer/fMRIPrep integration, ROI management, and surface analysis. Use this skill whenever the user mentions pycortex, `import cortex`, cortical surfaces, brain flatmaps, WebGL brain viewers, cortical surface mapping, or wants to visualize neuroimaging data on the cortex, even if they don't explicitly name pycortex.
development
Domain-validated pipeline guidance for EEG/MEG data analysis using MNE-Python: data loading, preprocessing (filtering, ICA, re-referencing), epoching, ERP/ERF computation, time-frequency decomposition, source localization, decoding/MVPA, statistical testing, simulation, and visualization. Use this skill whenever the user works with EEG/MEG/sEEG/ECoG/NIRS/eye-tracking data in Python, mentions MNE, or needs neurophysiological analysis guidance.
development
Step-by-step guidance for contributing a new skill to the NeuroAIHub/awesome_cognitive_and_neuroscience_skills repository via GitHub Pull Request, including SKILL.md format requirements, quality rules, and PR checklist