本文へ移動
cccskills
無料GitHub で公開

"grad-panel-data"

"Apply panel data analysis with fixed effects, random effects, and dynamic GMM to exploit longitudinal variation and control for unobserved heterogeneity. Use this skill when the user has repeated observations over time for multiple entities, needs to choose between FE and RE via Hausman test, or when they ask 'how do I control for firm-specific effects', 'fixed or random effects', or 'how to handle endogeneity in panels'.".

インストール方法を見る

含まれるファイル(2)

  • SKILL.md4.4 KB
  • examples/sample_scenario.md6.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

追蹤資料分析 (Panel Data Analysis)

Overview

Panel data analysis exploits both cross-sectional and temporal variation to estimate causal effects while controlling for unobserved heterogeneity. Fixed effects eliminate time-invariant confounders through within-entity demeaning, while random effects assume unobserved heterogeneity is uncorrelated with regressors, yielding more efficient estimates when valid.

When to Use

  • Data has repeated observations for the same entities (firms, individuals, countries) over time
  • Unobserved time-invariant factors likely confound the relationship of interest
  • Testing whether a policy or treatment effect varies across time periods
  • Dynamic models where the lagged dependent variable is a regressor (use GMM)

When NOT to Use

  • Pure cross-sectional data with no time dimension
  • Interest is in estimating the effect of time-invariant variables (FE eliminates these)
  • Panel is extremely short (T = 2) with many endogenous regressors
  • Attrition is non-random and creates survivorship bias

Assumptions

IRON LAW: Fixed effects ONLY controls for TIME-INVARIANT unobservables —
time-varying confounders remain a threat. FE does not solve all
endogeneity problems.

Key assumptions:

  1. Strict exogeneity for FE/RE: past, current, and future errors are uncorrelated with regressors
  2. No serial correlation in idiosyncratic errors (or use cluster-robust SEs)
  3. RE additionally assumes individual effects are uncorrelated with regressors
  4. For dynamic GMM: instruments are valid and not too many (instrument proliferation)

Methodology

Step 1 — Explore Panel Structure

Report N (entities), T (time periods), balance status. Check within vs between variation for key variables. Visualize entity-level trends.

Step 2 — Estimate FE and RE Models

Run fixed effects (within estimator) and random effects (GLS). Include time fixed effects if common shocks exist. Use cluster-robust standard errors at the entity level.

Step 3 — Hausman Test for Model Selection

Test H₀: RE is consistent (individual effects uncorrelated with regressors). Rejection favors FE. See references/ for test statistic derivation.

Step 4 — Dynamic Extensions (if needed)

If lagged DV is included, use Arellano-Bond or System GMM. Report AR(1), AR(2) tests and Hansen/Sargan test for instrument validity. Monitor instrument count.

Output Format

## Panel Data Analysis: [Study Title]

### Panel Structure
| Dimension | Value |
|-----------|-------|
| Entities (N) | xxx |
| Time periods (T) | xxx |
| Balanced? | [Yes/No] |

### Estimation Results
| Variable | FE (β) | RE (β) | GMM (β) |
|----------|--------|--------|---------|
| [var] | x.xx (x.xx) | x.xx (x.xx) | x.xx (x.xx) |

### Model Selection
| Test | Statistic | p-value | Decision |
|------|-----------|---------|----------|
| Hausman | x.xx | x.xx | [FE/RE] |
| AR(2) | x.xx | x.xx | [pass/fail] |
| Hansen J | x.xx | x.xx | [pass/fail] |

### Key Findings
- [Interpretation]

### Limitations
- [Note any assumption violations]

Gotchas

  • FE discards all between-entity variation; if most variation is between, FE estimates are imprecise
  • Hausman test has low power in small samples — insignificance does not validate RE
  • Dynamic panel GMM with too many instruments causes overfitting and weakens the Hansen test
  • Nickell bias afflicts FE estimates with a lagged DV when T is small
  • Two-way FE (entity + time) is often necessary but rarely the default in software
  • Cluster-robust standard errors require a sufficient number of clusters (N ≥ 50 as guideline)

References

  • Wooldridge, J. M. (2010). Econometric Analysis of Cross Section and Panel Data (2nd ed.). MIT Press.
  • Arellano, M., & Bond, S. (1991). Some tests of specification for panel data. Review of Economic Studies, 58(2), 277-297.
  • Baltagi, B. H. (2013). Econometric Analysis of Panel Data (5th ed.). Wiley.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

"Implement and select ad bidding strategies from manual CPC to automated target-CPA and target-ROAS. Use this skill when the user needs to choose a bidding strategy, set up automated bidding, or optimize bid parameters — even if they say 'what bidding strategy should I use', 'target CPA setup', or 'smart bidding configuration'.".

日本語の概要は準備中です。原文の説明を表示しています。

charlieviettq/awesome-agent-skill262026年7月20日 更新

"Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to distribute budget across multiple campaigns, optimize spend pacing, or maximize overall ROAS under budget constraints — even if they say 'how to split my ad budget', 'campaign budget optimization', or 'diminishing returns on ad spend'.".

日本語の概要は準備中です。原文の説明を表示しています。

charlieviettq/awesome-agent-skill262026年7月20日 更新

"Build CTR prediction models for estimating ad click-through rates from features. Use this skill when the user needs to predict click probability, build an ad ranking model, or evaluate ad creative performance — even if they say 'predict click rate', 'ad relevance scoring', or 'which ad will get more clicks'.".

日本語の概要は準備中です。原文の説明を表示しています。

charlieviettq/awesome-agent-skill262026年7月20日 更新

"Implement Generalized Second Price auction for ad slot allocation and pricing. Use this skill when the user needs to understand search ad auctions, compute ad positions and costs-per-click, or analyze bidding dynamics — even if they say 'how does Google Ads auction work', 'ad rank calculation', or 'second price auction for ads'.".

日本語の概要は準備中です。原文の説明を表示しています。

charlieviettq/awesome-agent-skill262026年7月20日 更新

"Implement VCG mechanism for incentive-compatible ad slot allocation with truthful bidding. Use this skill when the user needs to design a truthful auction mechanism, compute externality-based payments, or understand why platforms may prefer GSP over VCG — even if they say 'truthful auction design', 'VCG payments', or 'incentive-compatible mechanism'.".

日本語の概要は準備中です。原文の説明を表示しています。

charlieviettq/awesome-agent-skill262026年7月20日 更新

"Explain blockchain fundamentals including distributed ledger architecture, consensus mechanisms, and block structure. Use this skill when the user needs to understand blockchain concepts, evaluate whether blockchain fits a use case, or design a blockchain-based solution — even if they say 'how does blockchain work', 'do I need blockchain', or 'distributed ledger'.".

日本語の概要は準備中です。原文の説明を表示しています。

charlieviettq/awesome-agent-skill262026年7月20日 更新

charlieviettq のスキルをすべて見る

このスキルの問題を報告する