performing-causal-analysis

pymc-labs 的头像作者 pymc-labs

Fits causal models, estimates impacts, and plots results using CausalPy. Use when performing analysis with DiD, ITS, SC, or RD.

📖 中文导读:Fits causal models, estimates impacts, and plots results using CausalPy. Use when performing analysis with DiD, ITS, SC, or RD. 以下正文为该技能的原始 SKILL.md 内容(英文),上方安装命令可直接使用。

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

  1. Load Data: Ensure data is in a Pandas DataFrame.
  2. Initialize Experiment: Use the appropriate class (see References).
  3. Fit & Model: Models are fitted automatically upon initialization if arguments are provided.
  4. Analyze Results: Use summary(), print_coefficients(), and plot().

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: