I have (daily) panel data for about 20 countries, about 200 days for each country. Therefore the estimation is based on around 4000 data points. The number of samples in different countries varies. Some have 180 data points, some have 220. For each country and day, I have data for y, x1, x2, where x1 and x2 are binary variables which take the value 1 if there is an event, and 0 otherwise. Events are rare, so x1 and x2 are very sparse. I ask whether the events x1 and x2 have any impact on y. I need to run a panel regression (y=c+b1*x1+b2*x2+e) if I understand it correctly. Could I, instead, pile up all the data to make it a simple linear regression of 4000 data points, without recourse to any knowledge of panel data or time series? Do I obtain the same results? Any easy-to-read references accompanying the answer would help. Thank you very much! I know regression/mathematical statistics, time series at graduate level, but do not know panel data. I know how to deal with non-stationarity, so that’s not an issue we need to worry about.
-
$\begingroup$ I am not too knowledgeable in this area, but to my understanding (e.g. here) the "panel" approach would apply if you think the $b$ coefficients are independent of country, but the $c$ coefficient may vary between countries. The "time series" approach would apply if you think autocorrelation is a factor (i.e. different days are not necessarily independent). $\endgroup$– GeoMatt22Commented Feb 17, 2017 at 4:34
1 Answer
The short answer is no. You can't treat the data as one big set of 4000 data points because you have repeated measures for each country.
At least three problems could arise.
- Fixed effects: You may have country-level effects that are correlated with either $x_1$ or $x_2$ and the outcome. So if you omit country dummies, your coefficient estimates on these two variables will be biased.
- Random Effects: If you think country level effects are uncorrelated with $x_1$ and $x_2$, you can leave the country dummies out of your model. However, then these terms will be absorbed into the error term. Now, your errors are no longer independent. This is problematic since linear regression assumes independent (and identically distributed) errors for unbiased standard error estimates.
- Mixed Effects: Both scenario 1) and 2) can occur simultaneously.
I'll try to detail these a little more formally. Most statistical analysis software should be able to handle these scenarios. First, Let's write the model as
$y_{it}=\beta_0+\beta_1a_{it}+\beta_2b_{it}+e_{it}$
Above, $y_{it}$ is the outcome of country $i$ in day $t$.
Fixed Effects
Consider that there could exist country-level effects that impact $y_{ij}$. So the true model should be
$y_{it}=\beta_0+\beta_1a_{it}+\beta_2b_{it}+ \sum_{c=1}^{19}\gamma_cI_c+e_{it}$
So here we include 19 dummies ($I_c$) for 20 countries and their coefficients ($\gamma_c$). If these country-level effects are correlated with $a$ and $b$ and we choose not to estimate these dummies, then our estimates of the other coefficients will be biased due to "omitted variable bias."
Random Effects
Now let's assume you think these country-level effects are uncorrelated with the other coefficients and don't want to estimate these fixed effects. Now, your estimates of $\beta_1$ and $\beta_2$ will remain unbiased. However, your standard errors will be biased. This is because your error term will no longer be independent. I'll rewrite the "country-level" effects as $I_i$:
$y_{it}=\beta_0+\beta_1a_{it}+\beta_2b_{it}+ (I_i +e_{it})$
Notice that your new composite error term $ \epsilon_{it} = I_i +e_{it}$ is not independent within each country. For country $i=1$, the error term for the first day is $\epsilon_{11} = I_1 +e_{11}$. For the second day, $\epsilon_{12} = I_1 +e_{12}$. It's clear that $Cov(\epsilon_{11}, \epsilon_{12})\neq0$ since both contain $I_1$.
To account for this, you'll need a random effects model.
Mixed Effects
In this case, you have both fixed effects and random effects that you'd like to consider simultaneously.