Best for
- Choosing a connectivity method for task-based or resting-state fMRI
- Implementing psychophysiological interaction (PPI) analysis
- Setting up dynamic causal models (DCM)
NeuroAIHub/BrainPilot/packages/skills/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/SKILL.md
Advises on functional/effective connectivity methods: PPI, DCM, Granger causality, graph theory
Decision brief
Advises on functional/effective connectivity methods: PPI, DCM, Granger causality, graph theory
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/NeuroAIHub/BrainPilot --skill "packages/skills/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler"Inspect the Agent Skill "brain-connectivity-modeler" from https://github.com/NeuroAIHub/BrainPilot/blob/e9ddc112cab9b1c6272dae0c8a6bdceb5c9c3880/packages/skills/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/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
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.
Brain connectivity analysis goes beyond mapping where activation occurs to ask how brain regions interact. This requires choosing among fundamentally different analytical frameworks: functional connectivity (statistical associations), effective connectivity (directed causal infl…
Choosing a connectivity method for task-based or resting-state fMRI
Before executing the domain-specific steps below, you MUST:
This is the most fundamental distinction in brain connectivity analysis (Friston, 2011):
Permission review
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
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 91/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 424 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Brain connectivity analysis goes beyond mapping where activation occurs to ask how brain regions interact. This requires choosing among fundamentally different analytical frameworks: functional connectivity (statistical associations), effective connectivity (directed causal influences), and network topology (graph-theoretic properties). Each framework answers different questions and makes different assumptions.
A competent programmer without neuroscience training would not know the critical distinction between functional and effective connectivity, would likely confuse correlation with causation in brain networks, and would not appreciate why motion artifacts are particularly devastating for connectivity analyses. This skill encodes the domain judgment required to select and correctly implement brain connectivity methods.
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.
This is the most fundamental distinction in brain connectivity analysis (Friston, 2011):
| Property | Functional Connectivity | Effective Connectivity |
|---|---|---|
| Definition | Statistical dependency between time series | Directed causal influence of one region on another |
| Directionality | Undirected | Directed |
| Causality | Cannot infer causality | Attempts to infer causal structure |
| Model requirement | Model-free (correlations) | Model-based (requires explicit neural model) |
| Hypothesis type | Exploratory or confirmatory | Strictly confirmatory |
| Primary methods | Correlation, partial correlation, ICA | DCM, PPI, structural equation modeling |
| Source | Friston, 2011 | Friston, 2011; Friston et al., 2003 |
Domain warning: Functional connectivity (correlation) does not imply direct anatomical or causal connection. Two regions can show high functional connectivity because they share a common input, not because they directly influence each other (Friston, 2011).
What is your connectivity question?
|
+-- "Do regions A and B covary in activity?"
| --> Functional connectivity (correlation, partial correlation)
|
+-- "Does the coupling between A and B change with task context?"
| --> PPI (Friston et al., 1997; O'Reilly et al., 2012)
|
+-- "Does region A causally influence region B, and does this
| change with experimental manipulation?"
| --> DCM (Friston et al., 2003)
| Requires: strong prior hypotheses, limited model space
|
+-- "What is the network topology (hubs, modules, efficiency)?"
| --> Graph theory (Bullmore & Sporns, 2009)
|
+-- "Does activity in A temporally precede and predict B?"
--> Granger causality (with STRONG caveats for fMRI;
see Granger causality section below)
Critical preprocessing:
Partial correlation between regions A and B controls for shared variance with all other regions in the model. This reduces the influence of common inputs but requires careful regularization when the number of regions is large relative to the number of time points (Smith et al., 2011).
ICA decomposes the whole-brain fMRI signal into spatially independent components, each representing a network (Beckmann & Smith, 2004).
PPI tests whether the functional coupling between a seed region and other brain areas changes as a function of psychological context (e.g., task condition; Friston et al., 1997).
The PPI GLM includes three regressors:
The interaction term is the regressor of interest. A significant PPI effect means that functional coupling with the seed region differs between task conditions (O'Reilly et al., 2012).
Standard PPI tests one psychological contrast at a time. Generalized PPI (gPPI) includes all task conditions simultaneously (McLaren et al., 2012):
| Parameter | Recommendation | Source |
|---|---|---|
| Seed ROI definition | Functional (from activation map) or anatomical atlas; 6-10 mm sphere typical | O'Reilly et al., 2012 |
| Deconvolution | Required for interaction term (SPM default); extract neural signal before computing interaction | Gitelman et al., 2003 |
| Minimum events per condition | 20+ per condition for stable PPI estimates | O'Reilly et al., 2012 |
| Multiple seed regions | Run separate PPI analyses per seed, then correct for multiple comparisons | O'Reilly et al., 2012 |
DCM models the causal architecture of brain regions using a biophysical generative model of neural dynamics and hemodynamic coupling (Friston et al., 2003).
A DCM is defined by three matrices:
| Matrix | Function | Interpretation |
|---|---|---|
| A (intrinsic) | Fixed connections between regions (always on) | Baseline coupling strength |
| B (modulatory) | Condition-dependent modulation of connections | How task context changes coupling (the key experimental question) |
| C (driving input) | Which regions receive direct task input | Where external stimuli enter the network |
| Requirement | Guideline | Source |
|---|---|---|
| Number of regions | 3-8 regions maximum | Stephan et al., 2010 |
| Prior hypotheses | Strong prior hypotheses about network architecture required | Stephan et al., 2010 |
| Model space size | Keep total models < 20-30 for reliable BMS | Stephan et al., 2009 |
| Task design | Event-related or block designs with clear experimental manipulation | Friston et al., 2003 |
| Time series extraction | From first eigenvariate of activated voxels within ROI | Stephan et al., 2010 |
| Data quality | Strong task activation in all modeled regions | Stephan et al., 2010 |
After estimating all candidate models, use BMS to identify the winning model (Stephan et al., 2009):
Granger causality tests whether past values of time series X improve prediction of time series Y beyond Y's own past (Granger, 1969).
| Limitation | Explanation | Source |
|---|---|---|
| Hemodynamic confound | The HRF varies across brain regions by 1-2 seconds. A region with a faster HRF will appear to "Granger-cause" a region with a slower HRF, regardless of true neural timing | David et al., 2008; Seth et al., 2013 |
| Low temporal resolution | fMRI TR (0.5-3 seconds) is far slower than neural dynamics (milliseconds), aliasing true causal structure | Seth et al., 2013 |
| Downsampling artifacts | Subsampling a continuous process can reverse the apparent causal direction | Seth et al., 2013 |
Domain warning: Granger causality applied to fMRI BOLD signals is widely considered unreliable for inferring neural causal direction due to hemodynamic variability (David et al., 2008; Seth et al., 2013). If causal inference is needed, use DCM (which explicitly models the hemodynamic delay) or consider EEG/MEG (which has millisecond temporal resolution).
Graph theory characterizes the topological organization of brain networks (Bullmore & Sporns, 2009).
| Method | Description | Example Atlases | Source |
|---|---|---|---|
| Anatomical parcellation | Predefined atlas regions | AAL (116 regions), Harvard-Oxford | Tzourio-Mazoyer et al., 2002 |
| Functional parcellation | Data-driven boundaries | Schaefer (100-1000 parcels), Gordon (333 parcels) | Schaefer et al., 2018; Gordon et al., 2016 |
| Voxel-level | Each voxel is a node | ~100,000 nodes | Computationally expensive; rarely used for full graph metrics |
Recommendation: Use functional parcellation (Schaefer or Gordon atlases) for most analyses. Functional parcels better respect the true boundaries of functional regions than anatomical atlases (Schaefer et al., 2018).
| Method | Description | Threshold Approach | Source |
|---|---|---|---|
| Correlation | Pearson r between time series | Proportional (top 10-20% of connections) or absolute (r > 0.2-0.3) | Bullmore & Sporns, 2009 |
| Partial correlation | Controls for indirect connections | Same thresholding options | Varoquaux et al., 2010 |
| Coherence | Frequency-domain coupling | Magnitude squared coherence > threshold | Sun et al., 2004 |
Domain warning: Thresholding strategy dramatically affects graph metrics. Always report results across a range of thresholds or use proportional thresholding to control for differences in overall connectivity strength across subjects (van den Heuvel et al., 2017).
| Metric | Meaning | Normalization | Source |
|---|---|---|---|
| Clustering coefficient | Proportion of a node's neighbors that are also connected to each other | Normalize against random networks (C/C_random) | Watts & Strogatz, 1998 |
| Characteristic path length | Average shortest path between all node pairs | Normalize against random networks (L/L_random) | Watts & Strogatz, 1998 |
| Small-worldness | sigma = (C/C_random) / (L/L_random); sigma > 1 indicates small-world | N/A (already normalized) | Watts & Strogatz, 1998; Humphries & Gurney, 2008 |
| Modularity (Q) | Strength of community structure; Q > 0.3 typically indicates strong modular organization | Compare against null distribution | Newman, 2006 |
| Hub measures | Degree centrality, betweenness centrality, participation coefficient | Z-score within network | Bullmore & Sporns, 2009 |
| Global efficiency | Inverse of mean shortest path length | Normalize against random networks | Latora & Marchiori, 2001 |
Normalization requirement: Raw graph metrics are meaningless without comparison to null models. Always normalize against random networks (preserving degree distribution) or lattice networks (Watts & Strogatz, 1998; Rubinov & Sporns, 2010). Generate at least 1,000 random networks for stable null distributions.
See references/ for detailed method implementation guides and parameter lookup tables.
Frequently asked questions
Advises on functional/effective connectivity methods: PPI, DCM, Granger causality, graph theory
The source record exposes this install command: npx skills add https://github.com/NeuroAIHub/BrainPilot --skill "packages/skills/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
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
coreyhaines31/marketingskills
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
alirezarezvani/claude-skills
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
wanshuiyin/Auto-claude-code-research-in-sleep
Use it for operations and research tasks; the detail page covers purpose, installation, and practical steps.