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
STATA Help( rolling beta, quintile portfolio, and the regression analysis)kindly looking for help. I have a hedge fund data year 2010 to 2019 contains dates and thousand of f…
xtabond2: question on determining appropriate lagsHi everyone, I have a panel data with n=48, T=40. The data contains people’s subjective experience …
Reversing the color scale in shape map using spmapDear Statalists, I am investigating the effect of a liberalisation of the divorce law on the fertil…
Converting string date to date - monthly functionDear Stata users, I need guidance to convert a string date to a numerical date. I tried using funct…
Creating a flag variable for a time range intervalHi. I need to create a flag variable (r30) based on a time interval (TimeToClm) variable. Basically,…
Subscribe to:
Post Comments (Atom)
0 Response to area specific linear time trend
Post a Comment