Hello,
I am trying to use the csdid command (Callaway & Sant'Anna 2021) with a monthly panel dataset but all ATT(g,t) coefficients are returned as zero (omitted) and I cannot identify the cause.
**Setup**
- Stata 16.1
- csdid and drdid installed from SSC
- Panel data: borrower-level monthly observations
- 6 treated cohorts entering the program in Jan–Jun 2025 (cohort_num 1–6)
- 1 never-treated control group (cohort_num 0)
- Time variable: sequential integer months (2024m7 = 1, 2024m8 = 2, ... 2025m11 = 17)
- Data spans 2024m7 to 2025m11 (17 months total)
**Variable construction**
gen int ym_csdid = int(ym) - 772 // sequential: 2024m7=1 to 2025m11=17
gen int entry_ym_csdid = 0
replace entry_ym_csdid = int(ym(2025, cohort_num)) - 772 if cohort_num >= 1 & cohort_num <= 6
// Results in: cohort1=7, cohort2=8, cohort3=9, cohort4=10, cohort5=11, cohort6=12
xtset panel_id ym_csdid
// panel variable: panel_id (unbalanced)
// time variable: ym_csdid, 1 to 17, delta 1 unit
**tab ym_csdid entry_ym_csdid (0.1% sample by cohort and control, ~5,000 obs)**
Sequential |
month: |
2024m7=1, |
2024m8=2, | entry_ym_csdid
... | 0 7 8 9 10 11 | Total
-----------+------------------------------------------------------------------+----------
1 | 191 24 29 22 16 12 | 304
2 | 191 24 29 22 16 12 | 304
3 | 191 24 29 22 16 12 | 304
4 | 191 24 29 22 16 12 | 304
5 | 190 24 29 22 16 12 | 303
6 | 188 24 29 22 16 12 | 301
7 | 184 24 29 22 16 12 | 297
8 | 182 24 29 22 16 12 | 295
9 | 182 24 29 22 16 12 | 295
10 | 179 24 29 22 16 12 | 292
11 | 178 24 29 22 16 12 | 291
12 | 176 24 29 22 16 12 | 289
13 | 176 23 29 22 16 12 | 288
14 | 175 23 29 22 16 12 | 287
15 | 175 23 29 22 16 12 | 287
16 | 172 23 29 22 16 12 | 284
17 | 172 23 29 22 16 12 | 284
-----------+------------------------------------------------------------------+----------
Total | 3,093 403 493 374 272 204 | 5,009
Sequential |
month: |
2024m7=1, | entry_ym_c
2024m8=2, | sdid
... | 12 | Total
-----------+-----------+----------
1 | 10 | 304
2 | 10 | 304
3 | 10 | 304
4 | 10 | 304
5 | 10 | 303
6 | 10 | 301
7 | 10 | 297
8 | 10 | 295
9 | 10 | 295
10 | 10 | 292
11 | 10 | 291
12 | 10 | 289
13 | 10 | 288
14 | 10 | 287
15 | 10 | 287
16 | 10 | 284
17 | 10 | 284
-----------+-----------+----------
Total | 170 | 5,009
**Command used**
csdid repayment, ivar(panel_id) time(ym_csdid) gvar(entry_ym_csdid) method(dripw) notyet
**Result**
All ATT(g,t) coefficients are 0 (omitted) across all 6 groups and all time periods. Number of obs = ~4,600. No x marks (estimation did not fail), but no estimates either.
Number of obs = 4,694
Outcome model : least squares
Treatment model: inverse probability
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
g7 |
t_1_2 | 0 (omitted)
t_2_3 | 0 (omitted)
t_3_4 | 0 (omitted)
t_4_5 | 0 (omitted)
t_5_6 | 0 (omitted)
t_6_7 | 0 (omitted)
t_6_8 | 0 (omitted)
t_6_9 | 0 (omitted)
t_6_10 | 0 (omitted)
t_6_11 | 0 (omitted)
t_6_12 | 0 (omitted)
t_6_13 | 0 (omitted)
t_6_14 | 0 (omitted)
t_6_15 | 0 (omitted)
t_6_16 | 0 (omitted)
t_6_17 | 0 (omitted)
-------------+----------------------------------------------------------------
----------and so on, so on--------------
I have also tried:
- never instead of notyet
- Running without any covariates
- Converting time and gvar to integer storage type (was float before)
- Using the original %tm integer values (774–790) instead of sequential 1–17
- Reducing to 0.1% stratified sample by cohort
None of these resolved the issue.
For reference, I confirmed csdid works correctly on the mpdta example dataset on a separate machine (Stata 14), producing real estimates with no omissions.
The tab pattern looks similar to the working mpdta example. I cannot identify what structural difference in my data is causing all cells to be omitted.
Any help would be greatly appreciated.
Thank you.
I am trying to use the csdid command (Callaway & Sant'Anna 2021) with a monthly panel dataset but all ATT(g,t) coefficients are returned as zero (omitted) and I cannot identify the cause.
**Setup**
- Stata 16.1
- csdid and drdid installed from SSC
- Panel data: borrower-level monthly observations
- 6 treated cohorts entering the program in Jan–Jun 2025 (cohort_num 1–6)
- 1 never-treated control group (cohort_num 0)
- Time variable: sequential integer months (2024m7 = 1, 2024m8 = 2, ... 2025m11 = 17)
- Data spans 2024m7 to 2025m11 (17 months total)
**Variable construction**
gen int ym_csdid = int(ym) - 772 // sequential: 2024m7=1 to 2025m11=17
gen int entry_ym_csdid = 0
replace entry_ym_csdid = int(ym(2025, cohort_num)) - 772 if cohort_num >= 1 & cohort_num <= 6
// Results in: cohort1=7, cohort2=8, cohort3=9, cohort4=10, cohort5=11, cohort6=12
xtset panel_id ym_csdid
// panel variable: panel_id (unbalanced)
// time variable: ym_csdid, 1 to 17, delta 1 unit
**tab ym_csdid entry_ym_csdid (0.1% sample by cohort and control, ~5,000 obs)**
Sequential |
month: |
2024m7=1, |
2024m8=2, | entry_ym_csdid
... | 0 7 8 9 10 11 | Total
-----------+------------------------------------------------------------------+----------
1 | 191 24 29 22 16 12 | 304
2 | 191 24 29 22 16 12 | 304
3 | 191 24 29 22 16 12 | 304
4 | 191 24 29 22 16 12 | 304
5 | 190 24 29 22 16 12 | 303
6 | 188 24 29 22 16 12 | 301
7 | 184 24 29 22 16 12 | 297
8 | 182 24 29 22 16 12 | 295
9 | 182 24 29 22 16 12 | 295
10 | 179 24 29 22 16 12 | 292
11 | 178 24 29 22 16 12 | 291
12 | 176 24 29 22 16 12 | 289
13 | 176 23 29 22 16 12 | 288
14 | 175 23 29 22 16 12 | 287
15 | 175 23 29 22 16 12 | 287
16 | 172 23 29 22 16 12 | 284
17 | 172 23 29 22 16 12 | 284
-----------+------------------------------------------------------------------+----------
Total | 3,093 403 493 374 272 204 | 5,009
Sequential |
month: |
2024m7=1, | entry_ym_c
2024m8=2, | sdid
... | 12 | Total
-----------+-----------+----------
1 | 10 | 304
2 | 10 | 304
3 | 10 | 304
4 | 10 | 304
5 | 10 | 303
6 | 10 | 301
7 | 10 | 297
8 | 10 | 295
9 | 10 | 295
10 | 10 | 292
11 | 10 | 291
12 | 10 | 289
13 | 10 | 288
14 | 10 | 287
15 | 10 | 287
16 | 10 | 284
17 | 10 | 284
-----------+-----------+----------
Total | 170 | 5,009
**Command used**
csdid repayment, ivar(panel_id) time(ym_csdid) gvar(entry_ym_csdid) method(dripw) notyet
**Result**
All ATT(g,t) coefficients are 0 (omitted) across all 6 groups and all time periods. Number of obs = ~4,600. No x marks (estimation did not fail), but no estimates either.
Number of obs = 4,694
Outcome model : least squares
Treatment model: inverse probability
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
g7 |
t_1_2 | 0 (omitted)
t_2_3 | 0 (omitted)
t_3_4 | 0 (omitted)
t_4_5 | 0 (omitted)
t_5_6 | 0 (omitted)
t_6_7 | 0 (omitted)
t_6_8 | 0 (omitted)
t_6_9 | 0 (omitted)
t_6_10 | 0 (omitted)
t_6_11 | 0 (omitted)
t_6_12 | 0 (omitted)
t_6_13 | 0 (omitted)
t_6_14 | 0 (omitted)
t_6_15 | 0 (omitted)
t_6_16 | 0 (omitted)
t_6_17 | 0 (omitted)
-------------+----------------------------------------------------------------
----------and so on, so on--------------
I have also tried:
- never instead of notyet
- Running without any covariates
- Converting time and gvar to integer storage type (was float before)
- Using the original %tm integer values (774–790) instead of sequential 1–17
- Reducing to 0.1% stratified sample by cohort
None of these resolved the issue.
For reference, I confirmed csdid works correctly on the mpdta example dataset on a separate machine (Stata 14), producing real estimates with no omissions.
The tab pattern looks similar to the working mpdta example. I cannot identify what structural difference in my data is causing all cells to be omitted.
Any help would be greatly appreciated.
Thank you.

Comment