Skip to content

Panel data

Panel data follow the same entities over time. See how firm histories differ from repeated cross-sections, and why more rows do not guarantee independent evidence.

Panel data record the same identifiable entities at multiple dates. A panel of firms, for example, lets an analyst distinguish changes in a firm's borrowing cost from persistent differences between firms. The entity identifier is as important as the timestamp: it tells you which observations belong to the same history.
Panel data are also called longitudinal data. A cross-section compares entities at one date; a single time series follows a variable through time. A panel combines those dimensions. Repeated cross-sections sample a population on successive dates without necessarily following the same units, so they do not automatically reveal each unit's change.

Four rows, two firm histories

Consider these fixed, synthetic annual borrowing-rate snapshots. Dates are equally spaced; the figures are quoted rates in percent per year, not realised investment returns or cash interest payments.

Firm IDDateBorrowing rate (% per year)
A11
A23
B12
B26
There are four firm-date rows, two firms and two dates. Writing an observation as yity_{it} makes the two indexes explicit: ii identifies the firm and tt the date. Every firm is observed at both dates, so this is a balanced panel. An unbalanced panel has missing entity-date observations or different observation periods across entities; it can still retain linked firm histories.

The unweighted pooled mean of the recorded rates is

yˉ=1+3+2+64=3%.\bar y=\frac{1+3+2+6}{4}=3\%.

But that summary hides the paths. Firm A's rate rises by 3−1=23-1=2 percentage points; firm B's rises by 6−2=46-2=4 percentage points. Keeping firm IDs lets us compute those changes. Merely stacking two dates of unrelated firms would not.

Firm A's synthetic annual borrowing rate rises from 1% to 3%, a 2 percentage-point increase. Firm B's rises from 2% to 6%, a 4 percentage-point increase. There are four firm-date rows, two firms and two dates.
Firm A's synthetic annual borrowing rate rises from 1% to 3%, a 2 percentage-point increase. Firm B's rises from 2% to 6%, a 4 percentage-point increase. There are four firm-date rows, two firms and two dates.
The same firms are linked across equally spaced dates. Filled points are recorded synthetic rates; solid and dashed lines distinguish firm histories, with no fitted model. The pooled mean is the unweighted average of the four quoted rates.

What the structure makes possible

Suppose you want to relate borrowing costs to leverage. A comparison of firms with different leverage mixes within-firm movements with persistent differences in credit quality, business model and lender relationships. A fixed-effects model can remove an additive firm effect that is constant over time and estimate an association from within-firm variation. Time effects can absorb shocks shared by all firms at a date.

Those controls require assumptions. They do not automatically remove changing credit risk, reverse causality or other endogeneity. Nor does the panel format itself require fixed effects: pooled OLS and random-effects models make different assumptions about persistent entity differences.

For the estimator algebra and those assumptions, the SelfMadeQuant Panel Data lesson develops the within transformation and compares pooled, fixed-effects and random-effects estimation. Its preview is public; the full lesson requires membership.

Rows are not independent replications

Our four rows do not establish four independent observations. Outcomes for the same firm may remain related over time, and market-wide shocks can connect different firms. Cluster-robust standard errors can allow dependence within firms under suitable conditions, but entity clustering alone does not address arbitrary cross-sectional dependence. Two firms are also far too few to justify routine inference based on many independent firm clusters; this example only illustrates data structure.
Before estimation, check that entity IDs persist through renamings and mergers, that each entity-date key is unique, and why observations are absent. A balanced fund panel created by keeping only funds that survive the whole period may introduce survivorship bias. A complete rectangle is a description of coverage, not a guarantee of representative data or valid inference.

Sources

Last updated
  • panel data
  • econometrics
  • longitudinal data
  • fixed effects
  • dependence
← Back to the glossaryBack to top ↑