I'm currently analyzing repeated cross-section data (different individuals were surveyed over time). These individuals are nested within "counties." Thus, counties are repeated over time but different individuals are shown across years. Using this data set, I would like to use county fixed-effects to analyze the effect of a policy change by lagging the policy by 1 year. However, I have been struggling to find out the right codes on how to "xtset" the repeated cross-section data. When I used the following code,
Code:
xtset county year, yearly
In addition, can you give me insights on how I can lag the independent variable (policy variable) by one year in the fixed effects regression that uses repeated cross section data? I can include l1.policy in the FE regression, but I should add the year (time) variable when I xtset the dataset in order to use leads/lags function. But I was not sure if I can xtset the repeated cross section data set using the year variable.
Would there be a way to xtset the repeated cross-section data and then lag the independent variable by a year?
Any help would be very much appreciated!
0 Response to Lag independent variable in fixed effects regression using repeated cross section data
Post a Comment