Hi All,
Question 1:
I'm running a difference-in-differences analysis on yearly repeated cross-sectional data. I'd like to include the area specific linear time trend.
xtset id year
xtreg Y x1 x2 c.year_sequence # i.id, fe r
(note: year is 2005 to 2018, year_sequence is from 1 to 14)
Are these codes correct?
Question 2:
I'm running a difference-in-differences analysis on yearly level data (t). I have multiple areas(i) and multiple jobs (j). How to control for the area specific trend (not linear)?
Is that i.year ## i.area correct?
xtset area year
xtreg Y x1 x2 i.job i.area ## i.year , fe r
Thanks, appreciated!!!!
Happy New Year!
Related Posts with area specific linear time trend
Log function within loopsHello Stata experts, I am trying to perform a log function within loops, but it gives me errors tha…
Changing font colorI have changed the background to dark. Now i want bright green font. can't find commands. Advice, pl…
Combine a bunch of dummy variables into a multinomial/categoricalIt is trivial to convert a categorical variable into a bunch of dummy variables. I would like to do…
How to replace the newline/nextline character in a column with space characterHello! I understand that subinstr can be used to replace a substring in a column https://www.stata.…
Adding month observations to year level dataHi, I am working with the following variables: Code: * Example generated by -dataex-. For more info…
Subscribe to:
Post Comments (Atom)
0 Response to area specific linear time trend
Post a Comment