Hi, I'm trying to do a staggered DID whose treatment is at a group level (CCC_No). For context, some CCC_No have other subgroups but mostly do not (i'm mentioning it here bec i don't know if this is one of the reason). My unit of observation is household and is from a repeated cross-sectional survey. I built the unbalanced panel dataset by grouping respondents by city. A CCC_No can cover usually just one but sometimes more than one city.
I'm trying to run this command for the staggered DID but i am getting this error:
. csdid reliability ///
> educ8 H05_AGE HSIZE Min_Charge, ///
> ivar(CCC_No) ///
> time(WaveYear) ///
> gvar(cohort_strict) ///
> method(dripw) ///
> vce(cluster CCC_No)
repeated time values within panel
r(451);
end of do-file
r(451);
I am also including here a tabulation of the observations of CCC_No per WaveYear. As you can see, there are instances where there are no respondents under a CCC_No across some of the survey waves and I am also not sure if this could also be the culprit:
WaveYear
CCC_No 2019 2020 2022 2024 Total
1 406 404 394 399 1,603
2 380 365 390 406 1,541
4 46 37 14 15 112
5 402 425 412 402 1,641
6 413 408 459 422 1,702
7 372 344 389 386 1,491
11 898 1,036 1,208 1,216 4,358
12 29 53 61 23 166
13 0 35 52 0 87
17 214 250 260 273 997
18 289 332 395 372 1,388
19 324 398 371 391 1,484
21 0 24 35 0 59
23 23 87 35 73 218
24 0 0 27 40 67
25 67 75 39 82 263
26 335 359 383 386 1,463
27 21 4 0 24 49
29 28 0 65 84 177
30 222 228 250 308 1,008
32 58 55 121 50 284
33 42 35 64 77 218
35 91 80 120 101 392
36 0 26 41 0 67
39 62 0 43 50 155
41 48 35 38 27 148
47 53 34 45 31 163
49 33 37 0 14 84
50 68 53 26 53 200
51 33 24 32 50 139
53 0 43 0 40 83
61 54 14 80 88 236
65 44 61 71 57 233
69 28 28 62 27 145
70 16 11 19 33 79
71 344 372 419 411 1,546
83 29 63 93 48 233
90 46 19 0 11 76
92 62 0 23 22 107
102 35 0 18 24 77
105 13 18 22 14 67
106 0 24 46 13 83
107 85 31 88 79 283
116 45 56 82 23 206
117 0 15 0 22 37
123 65 67 93 121 346
124 39 63 44 26 172
129 28 46 0 26 100
141 50 10 81 34 175
147 100 87 144 78 409
149 50 23 33 33 139
156 62 122 43 86 313
158 53 20 40 14 127
163 10 15 32 29 86
165 0 16 15 18 49
173 29 13 75 97 214
175 134 99 162 83 478
179 28 37 31 46 142
183 7 88 0 14 109
184 62 10 49 18 139
221 23 50 29 33 135
243 33 54 39 59 185
247 58 44 48 51 201
250 21 106 13 39 179
252 13 20 0 28 61
284 74 104 86 114 378
288 13 0 35 0 48
291 102 58 95 40 295
297 15 0 44 19 78
317 0 19 11 18 48
322 317 386 396 419 1,518
324 107 101 114 137 459
328 19 27 18 0 64
330 137 139 161 150 587
333 0 29 26 0 55
343 17 23 0 0 40
370 343 381 379 375 1,478
386 14 15 15 22 66
407 0 22 0 32 54
530 0 22 23 16 61
533 15 32 16 0 63
564 22 16 14 14 66
571 13 61 0 84 158
574 9 51 0 8 68
577 8 0 4 20 32
596 15 20 64 15 114
694 23 42 47 57 169
Total 7,886 8,536 9,311 9,140 34,873
Your inputs are very much appreciated. Thank you.
I'm trying to run this command for the staggered DID but i am getting this error:
. csdid reliability ///
> educ8 H05_AGE HSIZE Min_Charge, ///
> ivar(CCC_No) ///
> time(WaveYear) ///
> gvar(cohort_strict) ///
> method(dripw) ///
> vce(cluster CCC_No)
repeated time values within panel
r(451);
end of do-file
r(451);
I am also including here a tabulation of the observations of CCC_No per WaveYear. As you can see, there are instances where there are no respondents under a CCC_No across some of the survey waves and I am also not sure if this could also be the culprit:
WaveYear
CCC_No 2019 2020 2022 2024 Total
1 406 404 394 399 1,603
2 380 365 390 406 1,541
4 46 37 14 15 112
5 402 425 412 402 1,641
6 413 408 459 422 1,702
7 372 344 389 386 1,491
11 898 1,036 1,208 1,216 4,358
12 29 53 61 23 166
13 0 35 52 0 87
17 214 250 260 273 997
18 289 332 395 372 1,388
19 324 398 371 391 1,484
21 0 24 35 0 59
23 23 87 35 73 218
24 0 0 27 40 67
25 67 75 39 82 263
26 335 359 383 386 1,463
27 21 4 0 24 49
29 28 0 65 84 177
30 222 228 250 308 1,008
32 58 55 121 50 284
33 42 35 64 77 218
35 91 80 120 101 392
36 0 26 41 0 67
39 62 0 43 50 155
41 48 35 38 27 148
47 53 34 45 31 163
49 33 37 0 14 84
50 68 53 26 53 200
51 33 24 32 50 139
53 0 43 0 40 83
61 54 14 80 88 236
65 44 61 71 57 233
69 28 28 62 27 145
70 16 11 19 33 79
71 344 372 419 411 1,546
83 29 63 93 48 233
90 46 19 0 11 76
92 62 0 23 22 107
102 35 0 18 24 77
105 13 18 22 14 67
106 0 24 46 13 83
107 85 31 88 79 283
116 45 56 82 23 206
117 0 15 0 22 37
123 65 67 93 121 346
124 39 63 44 26 172
129 28 46 0 26 100
141 50 10 81 34 175
147 100 87 144 78 409
149 50 23 33 33 139
156 62 122 43 86 313
158 53 20 40 14 127
163 10 15 32 29 86
165 0 16 15 18 49
173 29 13 75 97 214
175 134 99 162 83 478
179 28 37 31 46 142
183 7 88 0 14 109
184 62 10 49 18 139
221 23 50 29 33 135
243 33 54 39 59 185
247 58 44 48 51 201
250 21 106 13 39 179
252 13 20 0 28 61
284 74 104 86 114 378
288 13 0 35 0 48
291 102 58 95 40 295
297 15 0 44 19 78
317 0 19 11 18 48
322 317 386 396 419 1,518
324 107 101 114 137 459
328 19 27 18 0 64
330 137 139 161 150 587
333 0 29 26 0 55
343 17 23 0 0 40
370 343 381 379 375 1,478
386 14 15 15 22 66
407 0 22 0 32 54
530 0 22 23 16 61
533 15 32 16 0 63
564 22 16 14 14 66
571 13 61 0 84 158
574 9 51 0 8 68
577 8 0 4 20 32
596 15 20 64 15 114
694 23 42 47 57 169
Total 7,886 8,536 9,311 9,140 34,873
Your inputs are very much appreciated. Thank you.

Comment