Fits causal models, estimates impacts, and plots results using CausalPy. Use when performing analysis with DiD, ITS, SC, or RD.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
skills listSkill Instructions
name: performing-causal-analysis description: Fits causal models, estimates impacts, and plots results using CausalPy. Use when performing analysis with DiD, ITS, SC, or RD.
Performing Causal Analysis
Executes causal analysis using CausalPy experiment classes.
Workflow
- Load Data: Ensure data is in a Pandas DataFrame.
- Initialize Experiment: Use the appropriate class (see References).
- Fit & Model: Models are fitted automatically upon initialization if arguments are provided.
- Analyze Results: Use
summary(),print_coefficients(), andplot().
Core Methods
experiment.summary(): Prints model summary and main results.experiment.plot(): Visualizes observed vs. counterfactual.experiment.print_coefficients(): Shows model coefficients.
References
Detailed usage for specific methods:
More by pymc-labs
View allSelects the appropriate quasi-experimental method (DiD, ITS, SC) based on data structure and research questions. Use when the user is unsure which method to apply.
Interactive development in marimo notebooks with validation loops. Use for creating/editing marimo notebooks and verifying execution.
Loads internal CausalPy example datasets. Use when the user needs example data or asks about available demos.
Performs placebo-in-time sensitivity analysis to validate causal claims. Use when checking model robustness, verifying lack of pre-intervention effects, or ensuring observed effects are not spurious.
