neuroaihub/brainpilot/cogsci-power-analysis

Claude Code and agent skill by neuroaihub/brainpilot

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Domain-specific statistical power analysis guidance for cognitive and neuroscience research, encoding effect size priors and sample size recommendations by modality

Install

npx vskill@latest install neuroaihub/brainpilot/cogsci-power-analysis

SKILL.md

The same SKILL.md was published earlier as neuroaihub/brainpilot/cogsci-power-analysis.

Cognitive Science Power Analysis

Purpose

This skill encodes domain-specific knowledge for planning adequately powered studies in cognitive science and neuroscience. It provides:

  • Effect size priors calibrated to specific paradigms and modalities (behavioral, EEG/ERP, fMRI, clinical/developmental)
  • Sample size recommendations grounded in empirical meta-analyses rather than arbitrary conventions
  • Power analysis workflow guidance tailored to the design complexities of cognitive neuroscience (repeated measures, multilevel, neuroimaging-specific tools)

An AI agent needs this because generic power analysis advice (e.g., "use G*Power with d = 0.5") fails to capture the enormous variability in effect sizes across cognitive science paradigms, and because neuroimaging modalities have unique statistical considerations.

When to Use This Skill

  • A researcher is designing a new behavioral, EEG, or fMRI experiment and needs sample size justification
  • A grant proposal requires a power analysis section
  • A preregistration document needs effect size justification and sample size rationale
  • Someone asks "how many participants do I need?" for a cognitive/neuroscience study
  • Reviewing whether a published study was adequately powered

Research Planning Protocol

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

  1. State the research question — What study is being planned and what effect is being powered for?
  2. Justify the method choice — Why this design and analysis approach? What alternatives were considered?
  3. Declare expected outcomes — What is the smallest effect size of interest (SESOI)?
  4. Note assumptions and limitations — What assumptions does this power analysis make? 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 Workflow

Step 1: Identify the Research Modality and Design

Determine which modality and design type apply:

ModalityCommon DesignsKey Consideration
BehavioralBetween-groups, within-subjects, mixedEffect sizes vary enormously by paradigm
EEG/ERPWithin-subjects repeated measuresTrial count matters as much as participant count
fMRI (task)Within-subjects block/event-relatedWhole-brain vs. ROI analysis affects power
fMRI (individual differences)Correlational, between-subjectsRequires much larger N than task contrasts
Clinical/DevelopmentalCase-control, longitudinalRecruitment constraints often limit N; adjust design
Step 2: Obtain an Effect Size Prior

Do not use generic benchmarks (Cohen's "small/medium/large"). Instead:

  1. Best option: Use a meta-analytic estimate for the specific paradigm. See references/effect-sizes.md for a curated library organized by modality.
  2. Second option: Use the smallest effect size of interest (SESOI) — the minimum effect that would be theoretically or practically meaningful (Lakens, 2022).
  3. Third option: Use pilot data, but apply shrinkage correction — pilot studies systematically overestimate effect sizes (Albers & Lakens, 2018).
  4. Last resort: Use the modality-specific median effect sizes from large-scale meta-analyses (see below).

Modality-level median effect sizes (use only when paradigm-specific estimates are unavailable):

ModalityMedian Effect SizeSource
Behavioral (cognitive psychology)d = 0.40Brysbaert, 2019
EEG/ERP component differencesd = 0.50 - 1.00Boudewyn et al., 2018; Clayson et al., 2019
fMRI task activationd = 0.75 - 1.00 (within-subject)Poldrack et al., 2017
fMRI brain-behavior correlationr = 0.10 - 0.20Marek et al., 2022
Clinical group differencesd = 0.30 - 0.80Leucht et al., 2015; Button et al., 2013
Critical warning: The median statistical power in neuroscience has been estimated at only 21% (Button et al., 2013, Nature Reviews Neuroscience). Many published effect sizes are inflated by publication bias. Always apply skepticism to effect sizes from underpowered, unreplicated studies.
Step 3: Conduct the Power Analysis

Choose method based on design complexity:

Simple Designs (t-test, one-way ANOVA, correlation)

Use analytic solutions via G*Power or pwr (R):

Target: 80% power (minimum) or 90% power (recommended)
Alpha: 0.05 (two-tailed unless directional hypothesis is justified)
  • Two-sample t-test: pwr.t.test(d = effect_size, power = 0.80, sig.level = 0.05, type = "two.sample")
  • Within-subjects t-test: pwr.t.test(d = effect_size_dz, power = 0.80, sig.level = 0.05, type = "paired")
  • Correlation: pwr.r.test(r = effect_size, power = 0.80, sig.level = 0.05)
Complex Designs (mixed ANOVA, multilevel, mediation)

Use simulation-based power analysis:

  • simr (R package): For linear mixed-effects models (Green & MacLeod, 2016)
  • Superpower (R/Shiny): For factorial ANOVA designs (Lakens & Caldwell, 2021)
  • Monte Carlo simulation: For non-standard designs — simulate data under the expected effect, run analysis, repeat 10,000+ times
Neuroimaging-Specific
  • fMRIpower: Power for fMRI group analyses (Mumford & Nichols, 2008)
  • NeuroPowerTools: Web-based fMRI power calculator (Durnez et al., 2016)
  • For EEG/ERP: No standard tool; use simulation with expected component amplitudes and noise levels. See references/sample-size-guide.md for worked examples.
Step 4: Apply Modality-Specific Rules of Thumb

Use these as sanity checks, not replacements for formal power analysis:

ModalityMinimum N (per group/condition)Basis
Behavioral (medium effect, d ≈ 0.5)n = 30-50 per groupBrysbaert, 2019
Behavioral (small effect, d ≈ 0.2)n = 80-100 per groupBrysbaert, 2019
Behavioral (within-subjects, d_z ≈ 0.4)n = 50-65Brysbaert, 2019
EEG/ERP (within-subjects)n = 25-40Boudewyn et al., 2018
fMRI (task activation, within-subjects)n = 30-50Cremers et al., 2017; Poldrack et al., 2017
fMRI (individual differences / brain-behavior)n = 100+ (ideally 200+)Marek et al., 2022
fMRI (clinical group comparison)n = 30-50 per groupButton et al., 2013
Clinical/patient studiesn = 20-30 per group (minimum)Leucht et al., 2015
Developmental (cross-sectional age groups)n = 25-40 per age groupMills & Tamnes, 2014
Step 5: Document and Report

For preregistration and manuscripts, the power analysis section must include:

  1. Effect size used and its source (meta-analysis, pilot, SESOI)
  2. Power analysis method (analytic, simulation-based, tool used)
  3. Target power level (80% or 90%) and alpha level
  4. Resulting sample size and any adjustments (attrition, exclusion rate)
  5. Sensitivity analysis: What is the minimum detectable effect at the planned N?

Template language:

"Based on the meta-analytic effect size of d = [X] reported by [Author, Year], a power analysis using [tool] indicated that N = [X] participants per group would be needed to detect this effect with [80/90]% power at alpha = .05 (two-tailed). Anticipating a [X]% attrition/exclusion rate, we plan to recruit N = [adjusted X]."

Common Pitfalls

  1. Using Cohen's generic benchmarks as effect size priors: Cohen (1988) himself warned these were rough guidelines. Cognitive science effects range from d = 0.1 to d = 3.0+ depending on the paradigm. Always use paradigm-specific estimates (Brysbaert, 2019).
  1. Ignoring the distinction between d and d_z: Between-subjects Cohen's d and within-subjects d_z are not interchangeable. Within-subjects designs typically yield larger d_z due to reduced error variance. Confusing them leads to incorrect sample size estimates (Lakens, 2013).
  1. Powering for whole-brain fMRI but reporting ROI results (or vice versa): Whole-brain analyses with multiple comparison correction require larger effects to survive thresholding. Power calculations must match the planned analysis (Mumford & Nichols, 2008).
  1. Treating pilot effect sizes as population estimates: Pilot studies with N = 10-20 produce wildly variable effect size estimates. Apply a correction factor or use the lower bound of the CI (Albers & Lakens, 2018).
  1. Ignoring trial count in EEG/ERP power: For ERP analyses, both participant N and trial count per condition affect statistical power. Insufficient trials per condition reduces signal-to-noise ratio regardless of participant count (Boudewyn et al., 2018; Luck, 2014).
  1. Assuming brain-behavior correlations are large: Marek et al. (2022) demonstrated that brain-wide association studies require thousands of participants for reliable effects. Planning an fMRI individual-differences study with N = 30 is almost certainly underpowered.

Quick Reference Decision Table

QuestionAnswerRecommended Action
"How many subjects for a Stroop study?"Within-subjects Stroop effect is very large (d ≈ 1.0-1.5)N = 15-25 likely sufficient (Brysbaert, 2019)
"How many for an ERP study of N400?"N400 semantic violation effect d ≈ 0.8-1.5N = 20-30 (Boudewyn et al., 2018)
"How many for fMRI brain-behavior correlation?"True r likely 0.10-0.20N = 200+ minimum (Marek et al., 2022)
"How many for a patient vs. control comparison?"Effects vary widely (d ≈ 0.3-0.8)N = 30-80 per group depending on expected effect
"Can I use my pilot N=12 effect size?"Pilot effect is unreliableUse meta-analytic estimate instead; if unavailable, use lower CI bound of pilot

References

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
884
Repository forks
61
7-day trend score
34

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/neuroaihub/brainpilot/cogsci-power-analysis/badge)](https://verified-skill.com/skills/neuroaihub/brainpilot/cogsci-power-analysis)

Something wrong with this skill or its page? Tell us.