# Time-fixed effects with lagged variables and monthly dummies with Stata.

I'm guiding myself through a paper and right now I have to do a time fixed effect regression with time dummies (monthly) and lagged explanatory variables. This explanatory (independent) variables are the fund characteristics (just as age, dimension, fees, etc) that I'm trying to relate to performance (the dependent variable).

The paper reads: "All the regressions include time-fixed effects (quarter dummies) to account for cross-sectional dependence, and t-statistics are clustered at the fund level to account for autocorrelation in fund performance. All explanatory variables are lagged one-quarter." and this is what I'm trying to mimic, just using monthly dummies instead.

What commands do you think I should use? I've already tried:

"xi: xtreg depend L.independ i.date, fe robust"; this way I get somewhat strange results.

I've also tried "xtreg depend L.independ, fe i(date) robust" but I get the error "time variable not set" even after doing tsset. I do not get that error if I remove the L. (for the lagged effect) and sure I could jut generate a new lagged variable and use that instead but since I get different results in both ways, I'm unsure about which should I use.

I hope I have been clear about my problem but please ask me if there are still any doubts.

## All Answers (3)