# First-difference estimator

In statistics and econometrics, the first-difference (FD) estimator is an estimator used to address the problem of omitted variables with panel data. It is consistent under the assumptions of the fixed effects model. In certain situations it can be more efficient than the standard fixed effects (or "within") estimator, for example when the error terms follows a random walk.
The estimator requires data on a dependent variable, $y_{it}$, and independent variables, $x_{it}$, for a set of individual units $i=1,\dots ,N$ and time periods $t=1,\dots ,T$. The estimator is obtained by running a pooled ordinary least squares (OLS) estimation for a regression of $\Delta y_{it}$ on $\Delta x_{it}$.

## Derivation

The FD estimator avoids bias due to some unobserved, time-invariant variable $c_{i}$, using the repeated observations over time:
    $y_{it}=x_{it}\beta +c_{i}+u_{it},t=1,...T,$
    $y_{it-1}=x_{it-1}\beta +c_{i}+u_{it-1},t=2,...T.$
Differencing the equations, gives:
    $\Delta y_{it}=y_{it}-y_{it-1}=\Delta x_{it}\beta +\Delta u_{it},t=2,...T,$
which removes the unobserved $c_{i}$ and eliminates the first time period.
The FD estimator ${\hat {\beta }}_{FD}$ is then obtained by using the differenced terms for $x$ and $u$ in OLS:
    ${\hat {\beta }}_{FD}=(\Delta X'\Delta X)^{-1}\Delta X'\Delta y=\beta +(\Delta X'\Delta X)^{-1}\Delta X'\Delta u$
where $X,y,$ and $u$, are notation for matrices of relevant variables. Note that the rank condition must be met for $\Delta X'\Delta X$ to be invertible (${\text{rank}}[\Delta X'\Delta X]=k$), where $k$ is the number of regressors.
Let
    $\Delta X_{i}=[\Delta X_{i2},\Delta X_{i3},...,\Delta X_{iT}]$,
and, analogously,
    $\Delta u_{i}=[\Delta u_{i2},\Delta u_{i3},...,\Delta u_{iT}]$.
If the error term is strictly exogenous, i.e. $E[u_{it}|x_{i1},x_{i2},..,x_{iT}]=0$, by the central limit theorem, the law of large numbers, and the Slutsky's theorem, the estimator is distributed normally with asymptotic variance of
    ${\widehat {\text{Avar}}}({\hat {\beta }}_{FD})=E[\Delta X_{i}'\Delta X_{i}]^{-1}E[\Delta X_{i}'\Delta u_{i}\Delta u_{i}'\Delta X_{i}]E[\Delta X_{i}'\Delta X_{i}]^{-1}$.
Under the assumption of homoskedasticity and no serial correlation, ${\text{Var}}(\Delta u|X)=\sigma _{\Delta u}^{2}$, the asymptotic variance can be estimated as
    ${\widehat {\text{Avar}}}({\hat {\beta }}_{FD})={\hat {\sigma }}_{\Delta u}^{2}(\Delta X'\Delta X)^{-1},$
where ${\hat {\sigma }}_{u}^{2}$, a consistent estimator of $\sigma _{u}^{2}$, is given by
    ${\hat {\sigma }}_{\Delta u}^{2}=[n(T-1)-K]^{-1}\sum _{i=1}^{n}\sum _{t=2}^{T}{\widehat {\Delta u_{it}}}^{2}$
and
    ${\widehat {\Delta u_{it}}}=\Delta y_{it}-{\hat {\beta }}_{FD}\Delta x_{it}$.

## Properties

To be unbiased, the fixed effects estimator (FE) requires strict exogeneity, defined as
    $E[u_{it}|x_{i1},x_{i2},..,x_{iT}]=0$.
The first difference estimator (FD) is also unbiased under this assumption.
If strict exogeneity is violated, but the weaker assumption
    $E[(u_{it}-u_{it-1})(x_{it}-x_{it-1})]=0$
holds, then the FD estimator is consistent.
Note that this assumption is less restrictive than the assumption of strict exogeneity which is required for consistency using the FE estimator when $T$ is fixed. If $T\rightarrow \infty$, then both FE and FD are consistent under the weaker assumption of contemporaneous exogeneity.
The Hausman test can be used to test the assumptions underlying the consistency of the FE and FD estimators.

## Relation to fixed effects estimator

For $T=2$, the FD and fixed effects estimators are numerically equivalent.
Under the assumption of homoscedasticity and no serial correlation in $u_{it}$, the FE estimator is more efficient than the FD estimator. This is because the FD estimator induces no serial correlation when differencing the errors. If $u_{it}$ follows a random walk, however, the FD estimator is more efficient as $\Delta u_{it}$ are serially uncorrelated.