Hello everyone (@FernandoRios),
I am using StataNow 19.5 (SE – Standard Edition) and would appreciate some guidance on how csdid handles covariates in a setting like mine.
My dataset is cross-sectional, with approximately 13,000 observations. Each observation corresponds to one individual, and I observe their outcome in one of several survey years.
My treatment is assigned at the cohort level, based on the year individuals entered school. I therefore use school-entry year as the time variable and the treatment cohort variable to identify when each cohort became exposed to the policy. The policy was adopted at different times across states (staggered adoption).
My specifications are:
TWFE:
CSDID (version v1.8 br FRA. and v1.81 by Pedro Sant'Anna):
The variables are defined as follows:
- Age: Age at the time the outcome is measured, calculated as survey year minus birth year.
- Survey year: The year in which the outcome is measured.
- School-entry year: Birth year + 6.
- Treatment: A dummy indicating whether the individual is exposed to the policy.
My question is: How does csdid handle multicollinearity among covariates?
This is particularly relevant in my setting because age is mechanically determined by the survey year and school-entry year:
Age = Survey year − School-entry year + 6.
Therefore, age is perfectly collinear with the survey-year and school-entry-year fixed effects in the TWFE specification, and it is automatically dropped from the regression. However, when I include age as a covariate in csdid, the estimate changes: its magnitude decreases and it becomes statistically insignificant. Why does csdid not seem to drop age in the same way as TWFE? How does the estimator handle this relationship when incorporating covariates into the 2×2 comparisons?
Why does csdid not seem to drop age in the same way as TWFE? Is this because the estimator handles covariates differently when constructing the 2×2 comparisons? More generally, how does csdid handle this?
Thank you very much!
I am using StataNow 19.5 (SE – Standard Edition) and would appreciate some guidance on how csdid handles covariates in a setting like mine.
My dataset is cross-sectional, with approximately 13,000 observations. Each observation corresponds to one individual, and I observe their outcome in one of several survey years.
My treatment is assigned at the cohort level, based on the year individuals entered school. I therefore use school-entry year as the time variable and the treatment cohort variable to identify when each cohort became exposed to the policy. The policy was adopted at different times across states (staggered adoption).
My specifications are:
TWFE:
Code:
reghdfe outcome treatment female age age2, absorb(state school_entry_year survey_year) cluster(state_school_entry_year)
Code:
csdid outcome female age age2 survey_year_dummies, time(school_entry_year) gvar(treatment_year) cluster(state_school_entry_year) agg(simple)
- Age: Age at the time the outcome is measured, calculated as survey year minus birth year.
- Survey year: The year in which the outcome is measured.
- School-entry year: Birth year + 6.
- Treatment: A dummy indicating whether the individual is exposed to the policy.
My question is: How does csdid handle multicollinearity among covariates?
This is particularly relevant in my setting because age is mechanically determined by the survey year and school-entry year:
Age = Survey year − School-entry year + 6.
Therefore, age is perfectly collinear with the survey-year and school-entry-year fixed effects in the TWFE specification, and it is automatically dropped from the regression. However, when I include age as a covariate in csdid, the estimate changes: its magnitude decreases and it becomes statistically insignificant. Why does csdid not seem to drop age in the same way as TWFE? How does the estimator handle this relationship when incorporating covariates into the 2×2 comparisons?
Why does csdid not seem to drop age in the same way as TWFE? Is this because the estimator handles covariates differently when constructing the 2×2 comparisons? More generally, how does csdid handle this?
Thank you very much!

Comment