Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/panel-data-guide
Panel data analysis with fixed and random effects models
Passed 25 of 25 test cases with the skill, and 22 of 25 without it.
3 fixed22 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
I have set a MultiIndex on my pandas DataFrame data using country_id and year. Write the Python code to specify a unit fixed effects regression of gdp_growth on investment and trade_openness and fit it with entity-clustered standard errors.
| Checked | Without skill | With skill |
|---|---|---|
| Includes EntityEffects in PanelOLS formula. | Missed | Passed |
| Calls fit method with cov_type set to 'clustered'. | Passed | Passed |
The instructions your model reads when the skill loads.
Estimate and interpret fixed effects, random effects, and dynamic panel models using Stata, R, and Python for longitudinal/panel datasets.
Panel data (also called longitudinal or cross-sectional time-series data) tracks the same units (individuals, firms, countries) across multiple time periods. This structure enables:
| unit_id | year | gdp_growth | investment | trade_openness |
|---------|------|-----------|------------|----------------|
| USA | 2015 | 2.9 | 20.5 | 28.3 |
| USA | 2016 | 1.7 | 20.1 | 27.1 |
| USA | 2017 | 2.3 | 20.8 | 27.5 |
| CHN | 2015 | 6.9 | 43.3 | 39.9 |
| CHN | 2016 | 6.7 | 42.7 | 37.2 |
| CHN | 2017 | 6.9 | 43.1 | 38.1 |
Key notation:
Y_it = alpha + beta * X_it + epsilon_it
Ignores panel structure; assumes no unit-specific effects. Rarely appropriate.
test cases passed, vs 22 / 25 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.