模拟
clear all
ssc install egenmore,replace
set obs 1000
egen id = repeat(), v(1/50)
sort id
egen year = repeat(), v(2001/2020)
gen lnv = ln(uniform() * 100+10) + 0.05* year + 10*id
reghdfe lnv c.year, a(id)
reghdfe lnv i.year, a(id)
** 等价的 **
tab year, gen(Y)
reghdfe lnv i.year, a(id)
coefplot ,vertical drop(_cons)
reghdfe lnv Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y18 Y19 Y20, a(id)
** 等价的 **
reghdfe lnv i2001.year, a(id)
reghdfe lnv Y1, a(id)
** 等价的 **
reghdfe lnv ib2001.year, a(id)
reghdfe lnv Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y18 Y19 Y20, a(id)
** 等价的 **
reghdfe lnv ib2012.year, a(id)
reghdfe lnv Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10 Y11 Y13 Y14 Y15 Y16 Y17 Y18 Y19 Y20, a(id)
** 等价的 **
reghdfe lnv i(2000(2)2020).year, a(id)
reghdfe lnv Y2 Y4 Y6 Y8 Y10 Y12 Y14 Y16 Y18 Y20, a(id)