Hi,
I am trying to run out a very basic event study looking at the effect of a homeownership treatment variable (rtbphs_81) on marriagerate. The data runs from 1971 to 2001 with observations occurring only decennially, however, I'm trying to obtain an event study plot and observe estimated coefficients on pre-treatment (pre-1981) observations.
Any help would be greatly appreciated
Below is an example of my data:
This is the output that I receive from Stata:
Q: How can I stop 1971 from being omitted and instead categorise 1981 as the base.
When I try this code:
I get the same output:
I am trying to run out a very basic event study looking at the effect of a homeownership treatment variable (rtbphs_81) on marriagerate. The data runs from 1971 to 2001 with observations occurring only decennially, however, I'm trying to obtain an event study plot and observe estimated coefficients on pre-treatment (pre-1981) observations.
Any help would be greatly appreciated

Below is an example of my data:
Code:
clear input str28 LocalAuthority int(Year rtb) double(rtbphs_81 marriagerate) "Adur" 1971 0 0 .6717478839674583 "Adur" 1981 0 0 .626276880304977 "Adur" 1991 1030 .22543226088859708 .602944264773825 "Adur" 2001 1513 .3311446706062596 .5539222790418418 "Allerdale" 1971 0 0 .665259539360605 "Allerdale" 1981 15 .0012472975220355895 .6304059641155547 "Allerdale" 1991 1385 .11516713786795277 .6144204677606926 "Allerdale" 2001 1887 .15691002827207717 .5820694925750728 "Alnwick" 1971 0 0 .6434144314666913 "Alnwick" 1981 0 0 .6197158469945355 "Alnwick" 1991 978 .27580372250423013 .6285081240768094 "Alnwick" 2001 1452 .40947546531302875 .6109930752282027 "Amber Valley" 1971 0 0 .7119203696088628 "Amber Valley" 1981 11 .0012402751155710903 .6645791329225847 "Amber Valley" 1991 2282 .2573007103393844 .6233453142807048 "Amber Valley" 2001 3094 .34885556432517756 .578904159247689
Code:
reghdfe marriagerate c.rtbphs_81#i.Year, a(lacode Year) cluster(lacode)
Code:
reghdfe marriagerate c.rtbphs_81#i.Year, a(lacode Year) cluster(lacode) (MWFE estimator converged in 2 iterations) note: 1971b.Year#c.rtbphs_81 omitted because of collinearity HDFE Linear regression Number of obs = 1,416 Absorbing 2 HDFE groups F( 3, 353) = 6.22 Statistics robust to heteroskedasticity Prob > F = 0.0004 R-squared = 0.9380 Adj R-squared = 0.9169 Within R-sq. = 0.0210 Number of clusters (lacode) = 354 Root MSE = 0.0200 (Std. err. adjusted for 354 clusters in lacode) ---------------------------------------------------------------------------------- | Robust marriagerate | Coefficient std. err. t P>|t| [95% conf. interval] -----------------+---------------------------------------------------------------- Year#c.rtbphs_81 | 1971 | 0 (omitted) 1981 | -.3906885 .4275486 -0.91 0.361 -1.231551 .4501744 1991 | .0585169 .0170253 3.44 0.001 .0250332 .0920006 2001 | .0503912 .0250985 2.01 0.045 .0010299 .0997526 | _cons | .6067599 .002923 207.58 0.000 .6010112 .6125086 ---------------------------------------------------------------------------------- Absorbed degrees of freedom: -----------------------------------------------------+ Absorbed FE | Categories - Redundant = Num. Coefs | -------------+---------------------------------------| lacode | 354 354 0 *| Year | 4 0 4 | -----------------------------------------------------+ * = FE nested within cluster; treated as redundant for DoF computation
When I try this code:
Code:
reghdfe marriagerate c.rtbphs_81#ib1981.Year, a(lacode Year) cluster(lacode)
Code:
note: 1971.Year#c.rtbphs_81 omitted because of collinearity HDFE Linear regression Number of obs = 1,416 Absorbing 2 HDFE groups F( 3, 353) = 6.22 Statistics robust to heteroskedasticity Prob > F = 0.0004 R-squared = 0.9380 Adj R-squared = 0.9169 Within R-sq. = 0.0210 Number of clusters (lacode) = 354 Root MSE = 0.0200 (Std. err. adjusted for 354 clusters in lacode) ---------------------------------------------------------------------------------- | Robust marriagerate | Coefficient std. err. t P>|t| [95% conf. interval] -----------------+---------------------------------------------------------------- Year#c.rtbphs_81 | 1971 | 0 (omitted) 1981 | -.3906885 .4275486 -0.91 0.361 -1.231551 .4501744 1991 | .0585169 .0170253 3.44 0.001 .0250332 .0920006 2001 | .0503912 .0250985 2.01 0.045 .0010299 .0997526 | _cons | .6067599 .002923 207.58 0.000 .6010112 .6125086 ---------------------------------------------------------------------------------- Absorbed degrees of freedom: -----------------------------------------------------+ Absorbed FE | Categories - Redundant = Num. Coefs | -------------+---------------------------------------| lacode | 354 354 0 *| Year | 4 0 4 | -----------------------------------------------------+ * = FE nested within cluster; treated as redundant for DoF computation
Comment