Skip to main content

Cookies on Macro by Mark.We use essential cookies for sign-in, locale, and security. With your permission, we also use optional cookies for preferences, for analytics, and for advertising measurement with the Meta (Facebook) Pixel. Read our cookie policy.

Macro by MarkMacro by Mark
  • Home
Loading…
Loading…
← Models
MacroConceptsPolicyModels

Fixed-effects panel Model

Pooled cross-country or cross-region regression with country and time fixed effects to net out unit-level and aggregate variation.

OverviewGraphMathReferences

Graph workspace

Within-entity scatter plot with entity-specific regression lines

Graph workspace

The defining visualization for fixed-effects panel estimation is the within-entity relationship: how changes in xxx within each entity relate to changes in yyy, net of entity-level means. Plotting demeaned yyy against demeaned xxx reveals the within variation that identifies β\betaβ, and overlaying entity-specific lines shows the fixed effects.

Chart axis metadata
xRegressor (within-entity deviation from mean)standard deviations or natural units · -3 to 3yDependent variable (within-entity deviation from mean)standard deviations or natural units · -3 to 3
Entity level paths: the fixed effects
as parallel shifts static chart preview showing Entity 1, Entity 2, Entity 3, Entity 4
Within-entity relationship with each
entity's own regression line static chart preview showing Entity 1, Entity 1 fit, Entity 2, Entity 2 fit, Entity 3, Entity 3 fit
xRegressor (within-entity deviation from mean)standard deviations or natural units · -3 to 3yDependent variable (within-entity deviation from mean)standard deviations or natural units · -3 to 3

Current results

Pooled OLS estimate

Explain: Pooled OLS estimate
β^OLS\hat{\beta}_{\text{OLS}}β^​OLS​

Biased estimate that confounds within-entity and between-entity variation. Inflated (or deflated) by correlation between fixed effects and regressor means.

1.36

same as β

Fixed Effects estimate

Explain: Fixed Effects estimate
β^FE\hat{\beta}_{\text{FE}}β^​FE​

Consistent estimate using only within-entity variation. Purged of time-invariant omitted variable bias.

0.4710

same as β

OLS bias

Explain: OLS bias
β^OLS−βtrue\hat{\beta}_{\text{OLS}} - \beta_{\text{true}}β^​OLS​−βtrue​

Difference between OLS and the true value. Positive when ραx>0\rho_{\alpha x} > 0ραx​>0 and negative when ραx<0\rho_{\alpha x} < 0ραx​<0, whatever the sign of the true slope: it comes from the omitted fixed effect, not from β\betaβ.

0.8578

same as β

Clustered SE

Explain: Clustered SE
secluster(β^FE)\text{se}_{\text{cluster}}(\hat{\beta}_{\text{FE}})secluster​(β^​FE​)

Standard error that accounts for within-entity serial correlation. Larger than naive (homoskedastic) SE when errors are correlated within entities.

0.1524

same as β

Controls

true effect is positive
Explain: The true effect being estimated

True slope coefficient: 0.5

The real effect that both estimates are trying to recover.

Changes the slope of the demeaned regression line. Both OLS and FE slopes rotate, but FE stays closer to the true value.

linked, same direction
Explain: FE-regressor correlation (OLS bias source)

FE-regressor correlation (OLS bias source): 0.6

How strongly an entity's baseline level moves with its average x; this is what biases the pooled estimate.

Higher ραx\rho_{\alpha x}ραx​ widens the gap between the OLS and FE regression lines. When ραx=0\rho_{\alpha x} = 0ραx​=0 the two slopes differ only by sampling noise (about 0.58 against 0.48 at the defaults).

entities differ modestly
Explain: How different entities are

Entity heterogeneity (fixed effect SD): 2

How much entities differ from one another in their baseline levels.

Higher σα\sigma_{\alpha}σα​ spreads the entity clusters further apart in the raw scatter. The FE estimate is unaffected (entity means are removed): it stays at about 0.47 at the defaults whatever σα\sigma_{\alpha}σα​ is.

8
Explain: How many entities are compared

How many separate entities the data follows; more entities make the estimate more precise.

More colored clusters appear in the scatter. With more entities the FE estimate settles near the true slope (within about 0.04 of 0.5 from 18 entities up) and the clustered SE becomes trustworthy. With only a handful of clusters it is itself unreliable: on this sample it reads 0.05 at 3 entities, below its value at 30, and jumps between about 0.05 and 0.27 below 10.

20
Explain: How long entities are followed

How many periods each entity is observed; more periods give more change to learn from.

Each entity's cluster has more points. Within-entity regression lines become better defined. The overall FE estimate precision improves.

Keep going

Read next

Continue with a related concept, model, or example.

Theory model

IS-LM Model

a well-connected theoretical model two steps from here

New angle: theoretical model →
Macro by Mark
Help
Privacy PolicyTerms of UseEthics and Compliance

© 2026 Mark Jayson Nation LLC