panel-data

Estimate fixed and random effects models for panel data with Hausman tests.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill panel-data-yuuqq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: panel-data
Source: https://github.com/Yuuqq/claude-social-science-skills/tree/main/social-science-skills/panel-data
Command: npx skills add https://github.com/Yuuqq/claude-social-science-skills --skill panel-data-yuuqq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This skill helps you analyze repeated observations across entities and time while properly controlling for unobserved heterogeneity and producing valid inference.

Core Features & Use Cases

  • Fixed effects vs random effects: Estimate within-entity effects and use the Hausman test to select between FE and RE assumptions.
  • Dynamic panel modeling: Handle lagged dependent variables with Arellano-Bond / system GMM and report key diagnostics (AR(1)/AR(2), Hansen/Sargan, Difference-in-Hansen).
  • Panel inference you can trust: Use clustering strategies (entity, two-way, Driscoll-Kraay, wild bootstrap guidance) and support additional tools like panel Granger causality and heterogeneity-robust estimators (MG/CCEMG).

Example use case: you have a dataset of countries observed annually and want to estimate the effect of a policy variable on an outcome while accounting for country-specific unobserved traits and time shocks.

Quick Start

Use the panel-data skill to estimate a fixed-effects model with clustered standard errors, then run a Hausman test to justify switching to random effects if appropriate.

Frequently Asked Questions about panel-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between fixed effects and random effects for panel data?

To choose between fixed effects and random effects for panel data, estimate both models and apply a Hausman test to determine if the random effects assumption holds. This skill automates the comparison to validate your model selection.

What is the best way to handle lagged dependent variables in dynamic panel data?

For dynamic panel data with lagged dependent variables, use Arellano-Bond or system GMM estimation. This skill handles dynamic panel modeling and reports AR(1)/AR(2) and Hansen/Sargan diagnostics to verify instrument validity.

How do I run clustered standard errors in a fixed effects model?

To run clustered standard errors in a fixed effects model, specify your entity-time indexing and apply clustering strategies like entity, two-way, or Driscoll-Kraay. This skill supports robust inference for unobserved heterogeneity.

Can I test panel Granger causality across entities over time?

Yes, you can test panel Granger causality across entities over time. This skill supports panel Granger causality testing alongside heterogeneity-robust estimators like Mean Group and CCEMG for social science studies.

Do I need entity-time indexing for panel data econometric analysis?

Yes, entity-time indexing is required for panel data econometric analysis. Proper indexing allows the model to control for unobserved heterogeneity and apply fixed or time effects specifications accurately.