Tutorials › Econometrics (Graduate) › Short and Long Panels for Heterogeneous Effects

Panel Designs and Unbalanced Data · Tutorial 295 of 952

Short and Long Panels for Heterogeneous Effects

See why more time observations sharpen unit-specific estimates, while reliable cross-unit averages still depend on the number and composition of units.

Intermediate 12 min read

What You'll Learn

  • Distinguish the roles of the number of units and the number of periods in heterogeneous-effects panels
  • Relate unit-specific slope precision to within-unit regressor variation
  • Explain why short panels can make individual slopes noisy even when many units are observed
  • Separate a mean-group estimand from a pooled, variation-weighted slope
  • Assess how unequal panel lengths and selective observation affect cross-unit aggregation
  • Compare the precision of unit-specific linear trends in short and long time series

Why the Time Dimension Matters

In a panel with heterogeneous effects, each unit can have its own response to a regressor, and perhaps its own time trend. The number of units and the number of periods answer different questions. Adding periods can make an individual unit’s slope more precisely estimated, provided the regressor varies sufficiently within that unit. Adding units can improve estimation of an across-unit average, provided the units support the intended population and aggregation assumptions. Neither dimension automatically repairs a lack of identifying variation or selective observation.

This distinction is especially important when panels are unbalanced: one unit may contribute only a few periods while another contributes many. A pooled regression can then give greater influence to units with more regressor variation, whereas a mean-group calculation gives each unit equal influence. Those procedures generally target different quantities.

Model, Variation, and the Two Panel Dimensions

Definition: For unit \(i=1,\ldots,N\) and observed period \(t\), consider the unit-specific linear model $$ y_{it}=a_i+\beta_i x_{it}+\gamma_i t+u_{it}. $$ Here \(a_i\) is a unit-specific intercept, \(\beta_i\) is the unit-specific slope on \(x_{it}\), \(\gamma_i\) is a unit-specific linear time trend, and \(u_{it}\) is an error. A unit is observed for \(T_i\) periods; \(T_i\) need not be the same across units. A panel is called short or long in relation to how much time information is available per unit, not merely to the total number of observations \( \sum_i T_i\).

The model is a description, not by itself a guarantee of identification. To estimate \(\beta_i\) while allowing both \(a_i\) and \(\gamma_i\), there must be enough observations and \(x_{it}\) must not be perfectly explained by the intercept and time trend for that unit. In other words, \(x_{it}\) must retain within-unit variation after removing its linear association with time. To estimate the two parameters \(a_i\) and \(\gamma_i\) in a separate trend regression, the time values must vary; at least two distinct periods are required, and more observations are needed to estimate residual variation.

For the simple slope-precision formulas below, consider the model without a separate trend, \(y_{it}=a_i+\beta_i x_{it}+u_{it}\), with the observed \(x_{it}\) treated as fixed. Assume errors have conditional mean zero, constant variance \(\sigma_i^2\), and no serial correlation within unit. Normal errors additionally give exact normal intervals when \(\sigma_i^2\) is known. These assumptions are stated to make the comparison transparent; with serial correlation or changing variance, the usual standard error formula must be replaced by one appropriate to that error structure.

Why More Periods Can Sharpen an Individual Slope

In the simple unit-specific regression with an intercept, the ordinary least squares slope and its conditional variance are

$$ \widehat{\beta}_i = \frac{\sum_{t}(x_{it}-\bar{x}_i)(y_{it}-\bar{y}_i)} {\sum_{t}(x_{it}-\bar{x}_i)^2}, \qquad \operatorname{Var}(\widehat{\beta}_i\mid x_i) = \frac{\sigma_i^2}{S_{xx,i}}, \qquad S_{xx,i}=\sum_t(x_{it}-\bar{x}_i)^2. $$

The formula shows why the count \(T_i\) alone does not determine precision. More periods often increase \(S_{xx,i}\), but only if the regressor supplies useful additional variation. Repeated observations at nearly the same \(x\) value can add little information. If \(x_{it}\) follows a linear time path and the model also includes a unit-specific linear trend, its trend-related component cannot separately identify \(\beta_i\); identification requires variation in \(x_{it}\) beyond that path.

A short-panel unit can therefore have a poorly estimated slope even when the total sample contains many observations across units. More units do not add regressor variation to any one unit’s regression. They can, however, help estimate a cross-unit average, as long as the individual slope errors and the way units enter the sample satisfy suitable conditions.

Worked Example: More Within-Unit Variation Improves Slope Precision

Suppose a hypothetical unit follows \(y_t=a+\beta x_t+u_t\), with an intercept, known error variance \(\sigma^2=1\), and independent, mean-zero errors. The observed regressor values in a short panel are \(-1,0,1\). Compare its slope standard error with a longer panel whose regressor values are \(-2,-1,0,1,2\). Assume these designs are fixed and the model is correct.

For the short panel, \(\bar{x}=0\), so $$ S_{xx}=(-1)^2+0^2+1^2=2, \qquad SE(\widehat{\beta})=\sqrt{\frac{1}{2}}=0.7071. $$

For the longer panel, \(\bar{x}=0\), and $$ S_{xx}=(-2)^2+(-1)^2+0^2+1^2+2^2=10, \qquad SE(\widehat{\beta})=\sqrt{\frac{1}{10}}=0.3162. $$

The longer design provides five times as much centered regressor variation, and its standard error is smaller by a factor of \(\sqrt{5}\). This calculation isolates the role of \(S_{xx}\); it does not imply that every increase in \(T\) will yield this gain. The improvement depends on the additional observations contributing identifying variation and on the error assumptions used in the formula.

Short Panels, Long Panels, and Cross-Unit Averages

A common summary of heterogeneous slopes is the mean-group estimate: estimate a slope for each unit, then average the estimates with equal weight. For the units included in the calculation, it is

$$ \widehat{\beta}_{MG} = \frac{1}{N}\sum_{i=1}^{N}\widehat{\beta}_i. $$

With short panels, each \(\widehat{\beta}_i\) may be noisy. Nevertheless, when individual estimates are conditionally unbiased, the units are sampled or otherwise representative for the target, and estimation errors are independent across units with finite variances, averaging can reduce the effect of that noise. For a fixed collection of units, the conditional variance of the average due to estimation error is

$$ \operatorname{Var}(\widehat{\beta}_{MG}\mid \beta_1,\ldots,\beta_N,x) = \frac{1}{N^2}\sum_{i=1}^{N}\operatorname{Var}(\widehat{\beta}_i\mid x_i). $$

Thus, a large \(N\) can support an estimate of the average slope even when \(T_i\) is modest, but it does not make each unit’s slope precise. This statement also depends on the target. Inference about the average slope for a sampled population of units includes uncertainty from which heterogeneous slopes are represented in the sample, as well as estimation noise. Under independent sampling across units and finite second moments, the across-unit dispersion of estimated slopes is relevant to that population-level uncertainty. If units are dependent across the cross-section, or the observed units are selectively included, the simple independent-unit argument is not adequate.

Long panels tend to improve each unit’s slope estimate by increasing its time-series information, making comparisons of unit-specific effects more informative. They do not by themselves make an average representative of a broader population: that still depends on how units were selected and whether observation over time is informative. Nor does a long time series ensure precision if the regressor barely changes within a unit, is nearly collinear with time, or the error process invalidates the standard error calculation.

Worked Example: A Mean-Group Interval for Three Units

Suppose three hypothetical clinics have estimated exposure slopes \(0.80\), \(1.10\), and \(1.40\) outcome units per exposure unit. For this calculation, assume each estimate has a known standard error of \(0.30\), the estimation errors are independent and normal, and the target is the mean of these three clinics’ true slopes. These assumptions make the conditional sampling variance of their mean estimate available directly.

The mean-group estimate is $$ \widehat{\beta}_{MG} = \frac{0.80+1.10+1.40}{3} = 1.100 \quad\text{outcome units per exposure unit}. $$

Because the three estimation errors are independent, the standard error of this mean is $$ SE(\widehat{\beta}_{MG}) = \frac{\sqrt{0.30^2+0.30^2+0.30^2}}{3} = \frac{\sqrt{0.27}}{3} = 0.1732. $$

Under the stated normal-error assumptions, a 95% interval for the mean of these three true slopes, conditional on their values, is $$ 1.100\pm1.96(0.1732) = (0.7605,\;1.4395) \quad\text{outcome units per exposure unit}. $$

The interpretation is limited to the stated target and assumptions: the interval describes uncertainty from estimating the three clinics’ slopes, not uncertainty about a population of clinics sampled at random. Inference for a broader population would also need to account for variation in true slopes across clinics and for how clinics entered the sample.

Unequal Time Lengths and What Gets Averaged

With unequal \(T_i\), a mean-group estimator weights each included unit equally, regardless of how precisely its slope is estimated. A pooled regression with unit-specific intercepts instead combines within-unit covariation; in the simple model its slope is a weighted combination of unit-specific slopes, with weights related to \(S_{xx,i}\). It can therefore emphasize units with more within-unit regressor variation. Equal weighting and variation weighting are not interchangeable: they answer different questions unless additional restrictions make the slopes equal or the chosen weights match the target.

Worked Example: Equal-Unit and Variation-Weighted Slopes

Consider two hypothetical units with estimated slopes of \(1.0\) and \(3.0\) outcome units per exposure unit. Suppose the first has \(S_{xx,1}=2\), and the second has \(S_{xx,2}=10\). Assume the simple regression with unit-specific intercepts is correctly specified and these are the within-unit regressor sums of squares.

Giving each unit equal weight yields $$ \widehat{\beta}_{MG} = \frac{1.0+3.0}{2} = 2.0 \quad\text{outcome units per exposure unit}. $$

Combining the within-unit covariance information gives a slope weighted by the units’ \(S_{xx,i}\): $$ \widehat{\beta}_{pool} = \frac{2(1.0)+10(3.0)}{2+10} = \frac{32}{12} = 2.667 \quad\text{outcome units per exposure unit}. $$

The pooled result is closer to the second unit’s slope because that unit contributes more within-unit regressor variation. The difference is not, by itself, evidence that either calculation is wrong. The analyst must choose the estimand: an equally weighted mean of unit effects, or a slope weighted by the identifying variation contributed by each unit.

Unit-Specific Trends Also Need Time Variation

For a unit-specific linear trend, consider \(y_{it}=a_i+\gamma_i t+u_{it}\). With a fixed time design and independent, mean-zero errors of constant variance \(\sigma_i^2\), the trend estimate’s conditional variance is

$$ \operatorname{Var}(\widehat{\gamma}_i\mid t_i) = \frac{\sigma_i^2}{\sum_t(t-\bar{t}_i)^2}. $$

This is the same precision principle applied to time itself: a short span gives less centered time variation for separating a linear trend from an intercept. More observations over a longer span can improve precision, but only under an adequate trend specification and error model. Allowing flexible unit-specific trends in a very short panel can consume much of the available variation, leaving little information to distinguish other regressors from time.

Worked Example: Trend Precision Over Three and Five Periods

For a hypothetical unit, suppose outcomes follow a linear trend plus an intercept and independent errors with known variance \(0.25\). Compare consecutive periods \(t=1,2,3\) with \(t=1,2,3,4,5\). The assumed model and error conditions allow the trend standard error to be calculated from the centered time sum of squares.

For three periods, \(\bar{t}=2\), and $$ \sum_t(t-\bar{t})^2 = (-1)^2+0^2+1^2 = 2, \qquad SE(\widehat{\gamma})=\sqrt{\frac{0.25}{2}}=0.3536. $$

For five periods, \(\bar{t}=3\), and $$ \sum_t(t-\bar{t})^2 = (-2)^2+(-1)^2+0^2+1^2+2^2 = 10, \qquad SE(\widehat{\gamma})=\sqrt{\frac{0.25}{10}}=0.1581. $$

The longer time span gives substantially greater information about this unit’s trend under the stated model. The result does not establish that a linear trend is substantively appropriate, nor that the errors are independent in a real application; those assumptions would need assessment.

Assumptions for Aggregation and a Common Pitfall

The credibility of cross-unit aggregation depends on more than a large sample count. At minimum, the analyst should clarify which units define the target, whether unit-specific regressors have adequate identifying variation, and whether the observed units and periods can be treated as representative for that target. If long-running units differ systematically from short-running units, equal weighting over observed units need not estimate the mean effect in a wider population. If periods are missing selectively in ways related to outcomes or slopes, the observed-unit estimates and their average may also be distorted. The appropriate response depends on the missingness and selection assumptions; counting observations alone does not resolve the issue.

  • Mistake: “There are many unit-period observations, so every unit-specific slope must be precise.”
    Correction: Individual slope precision depends on that unit’s identifying within-unit variation and error process, not the total panel size.
  • Mistake: “A mean of estimated slopes and a pooled slope are two calculations of the same target.”
    Correction: The mean-group estimator weights units equally; a pooled slope generally emphasizes units with greater within-unit regressor variation.
  • Mistake: “A long panel guarantees a valid cross-unit average.”
    Correction: More periods can sharpen unit estimates, but representative aggregation still requires suitable assumptions about units, dependence, and observation.
Key takeaway: The time dimension governs how much information is available about each unit’s slope or trend; the cross-sectional dimension governs how much information is available for aggregating across units. Precision, identification, and representativeness are distinct requirements.

Check Your Understanding

Use the model assumptions as well as the arithmetic when answering.

  1. Why can adding units improve the precision of a mean-group estimate without making each unit-specific slope precise?
  2. In a unit-specific regression with an intercept, what feature of the regressor determines slope precision under independent, constant-variance errors?
  3. Explain why a pooled slope can differ from an equally weighted mean of unit slopes in an unbalanced panel.
  4. What additional uncertainty must be considered when the target is a population mean of heterogeneous slopes rather than the mean for a fixed set of units?
  5. Why might adding a unit-specific linear trend make it difficult to identify a slope on a regressor that changes almost linearly over time?
Clinical Biostats