I'm running a multi level panel data model. For illustration I used the dataset used in Example 4 for the mixed command.
use https://www.stata-press.com/data/r18/productivity
mixed gsp private emp hwy water other unemp || region: || state:
Here there is no control of yearly shocks. I could include it as time-fixed-effects by adding "i.year"
mixed gsp private emp hwy water other unemp i.year || region: || state:
However, let me assume there are some region-specific shocks, which I assume are drawn from a normal distribution.
It has been suggested to me that I could use the code sequence below. However, it does not seem not work.
egen region_year = group(region year)
mixed gsp private emp hwy water other unemp || region: || state: || region_year:
Does anyone have a suggestion how this could be done?
Best,
Øivind
use https://www.stata-press.com/data/r18/productivity
mixed gsp private emp hwy water other unemp || region: || state:
Here there is no control of yearly shocks. I could include it as time-fixed-effects by adding "i.year"
mixed gsp private emp hwy water other unemp i.year || region: || state:
However, let me assume there are some region-specific shocks, which I assume are drawn from a normal distribution.
It has been suggested to me that I could use the code sequence below. However, it does not seem not work.
egen region_year = group(region year)
mixed gsp private emp hwy water other unemp || region: || state: || region_year:
Does anyone have a suggestion how this could be done?
Best,
Øivind
Comment