Correlation matrices with panel data When reading through https://www.math.lsu.edu/~smolinsk/Quant_Interview_Prep.pdf, I saw the question 
"Discuss correlation matrices with panel data"
How would you do a correlation matrix with panel data and why/how is this different to whatever the "normal" situation would be?
 A: Consider the case of a simple linear regression using panel data. So, for example, assume we are trying to figure out how age and education affect individuals' income. Also, forget the whole log-linear regression part. To keep this simple, I'm just going to use a simple linear regression. In essence, I want to find the coefficients for the following equation:
$$ income = \beta_0 + \beta_{educ}\cdot educ + \beta_{age}\cdot age +\epsilon$$
where $\epsilon$ follows some random distribution (typically, normal, centered around zero).
For this example, assume we have surveyed the same set of individuals multiple times over the course of a few years. 
Panel data is typically modeled assuming that there is an individual-specific term that dictates the individual-level panel effect. So the equation that describes your model would be something like:
$$ income_{n,t} = \beta_0 + \beta_{educ}\cdot educ_{n,t} + \beta_{age}\cdot age_{n,t}  +  c_n + \epsilon_{n,t}$$
where $n$ is the index for each individual ($n=1,...,N$), $t$ is the index for each surveying period ($t=1,...,T$), and $\epsilon_{n,t}$ is assumed to be i.i.d. across individuals and time (i.e., independently distributed across all dimensions). Furthermore, $c_n$ is typically assumed to be either fixed or normally distributed across individuals according to some distribution. Regardless of it being fixed or random, notice how $c_n$ is constant within each individual over time. This is supposed to capture everything that is "special" about that individual and that sets them apart from their peers (note: you can also add a $d_t$ term to represent year-specific effects, but I'm omitting that just to keep things simple). But as I mentioned before, the $c_n$ term is time-invariant (i.e., it remains constant over the multiple $t$ survey periods). Therefore, this approach makes it impossible to teem out the effect of other time-invariant characteristics, such as race and gender. 
That's where the correlation matrix comes in. Modeling panel data using a correlation matrix relies on assuming the following equation:
$$ income_{n,t} = \beta_0 + \beta_{educ}\cdot educ_{n,t} + \beta_{age}\cdot age_{n,t} +  \epsilon_{n,t}$$
where, for each individual, $\epsilon_{n,t}$ is normally distributed across the multiple $t$ years following some correlation matrix $\boldsymbol{\Sigma}$. Stated clearly:
$$ \boldsymbol{\epsilon}_n = (\epsilon_{n,1},\epsilon_{n,2},...,\epsilon_{n,T}) \sim MultiVariateNormal(\boldsymbol{0},\boldsymbol{\Sigma})$$
where $\boldsymbol{0}$ is a $(T \times 1)$ vector of zeros and $\boldsymbol{\Sigma}$ is a $(T \times T)$ correlation matrix.
When you assume the error term is distributed this way, you can finally add time-invariant characteristics to the model and it will still be estimable using likelihood maximization. Furthermore, the correlation terms within $\boldsymbol{\Sigma}$ are also estimable.
I hope this clears up a bit of the confusion around modeling panel data.
