Mathematical derivation of correlation in dynamic panel data model My question is about deriving a result in Cameron and Trivedi - Microeconometrics (2005) on page 763, section 22.5.1. The section's subject is Dynamic Panel Data Models - True State Dependence and Unobserved Heterogeneity. 
For the following dynamic model 
$$y_{it} = \gamma y_{i,t-1} + \alpha_i + \varepsilon_{it}, \quad  i = 1,\ldots,N, \ \ \ t=2,\ldots, T$$
They derive the correlation as follows:
$$Cor(y_{it}, y_{i,t-1}) = Cor [\gamma y_{i,t-1} + \alpha_i + \varepsilon_{it},  y_{i,t-1}]$$
$$= \gamma + Cor [ \alpha_i ,  y_{i,t-1}]$$
$$= \gamma + \frac{(1- \gamma)}{  1 + (1- \gamma) \sigma_\varepsilon ^2 / ((1 + \gamma) \sigma_\alpha ^2)},    (22.33)$$
Cameron and Trivedi give the following explanation:
"where the second equality assumes $Cor [\varepsilon_{it}, y_{i,t-1}] = 0$ and the third equality is obtained after some algebra for the special case of random
effects with $\varepsilon_{it} \sim $ iid $( 0, \sigma_\varepsilon ^2)$ and $\alpha_i \sim $ iid $(0, \sigma_\alpha ^2)$. I would say that their explanation is minimalistic at least. Can somebody help with the needed steps to come to their result?
 A: This is a little hand-wavy, but since no one else bit, I will take a stab.
You know that
$$
y_{it}=\alpha_i + \varepsilon_{it}+\gamma \cdot y_{it-1}
 =\alpha_i + \varepsilon_{it}+\gamma \cdot (\alpha_i + \varepsilon_{it-1}+\gamma \cdot y_{it-2})
$$
If you keep doing this while assuming that your time series has been running for ever (like time series people always seem to do), you should get something like
$$
y_{it}=\alpha_i \cdot (1+\gamma + \gamma^2 +...) + \sum_{k=0}^{\infty} \varepsilon_{it-k} \cdot \gamma^k
$$
This can be simplified using the geometric series formula as
$$
y_{it}=\frac{\alpha_i}{1-\gamma} +\sum_{k=0}^{\infty} \varepsilon_{it-k} \cdot \gamma^k
$$
Using the formula for the variance of sum of weighted random variables (random effects and independence over $t$ assumptions means the covariances are all zero), the variance is then
$$\mathbf{Var}(y_{it})=\frac{\sigma_{\alpha}^2}{(1-\gamma)^2} +\sigma^2_{\varepsilon} \cdot \sum_{k=0}^{\infty} \gamma^{2k} = \frac{\sigma_{\alpha}^2}{(1-\gamma)^2} + \frac{\sigma_{\varepsilon}^2}{1-\gamma^2}.$$
Getting back to the original question, by definition, the correlation is
$$\rho(y_{it},y_{it-1})=\frac{\mathbf{Cov}(y_{it},y_{it-1})}{\sqrt{\mathbf{Var}(y_{it})\cdot \mathbf{Var}(y_{it-1})}}$$ 
Stationarity gets you that $\mathbf{Var}(y_{it})=\mathbf{Var}(y_{it-1})$, so the denominator simplifies to $\mathbf{Var}(y_{it}).$ We will use this again below.
The numerator is
\begin{align}
\mathbf{Cov}(y_{it},y_{it-1}) & =\mathbf{Cov}(\gamma \cdot y_{it-1}+\alpha_i + \varepsilon_{it},y_{it-1}) \\ & =\gamma \cdot \mathbf{Cov}(y_{it-1},y_{it-1})+\mathbf{Cov}(\alpha_i,y_{it-1})+0 \\ & =\gamma \cdot \mathbf{Var}(y_{it-1})+\mathbf{Cov} \left(\alpha_i,\frac{\alpha_i}{1-\gamma} +\sum_{k=0}^{\infty} \varepsilon_{it-k} \cdot \gamma^k \right) \\ & =\gamma \cdot \mathbf{Var}(y_{it}) + \frac{\sigma^2_{\alpha}}{1-\gamma}
\end{align}
Putting the top and bottom together, we get
$$\rho(y_{it},y_{it-1})=\frac{\gamma \cdot \mathbf{Var}(y_{it})+\frac{\sigma^2_{\alpha}}{1-\gamma}}{\mathbf{Var}(y_{it})}=\gamma+\frac{\frac{\sigma^2_{\alpha}}{1-\gamma}}{ \frac{\sigma_{\alpha}^2}{(1-\gamma)^2} + \frac{\sigma_{\varepsilon}^2}{1-\gamma^2}}$$ 
If you multiply both the top and bottom of that fraction by
$$\frac{(1-\gamma)^2}{\sigma^2_{\alpha}},$$
things will cancel since $1-\gamma^2=(1-\gamma)\cdot(1+\gamma)$, and you will get C&T's expression.
