Hi Fernando,
I’m encountering an issue with the long2 command—it seems to be dropping some years from my dataset, and I haven’t been able to determine why. Could you help me figure out the cause?
I’m working with SIPP data, which is a rotating panel. Could that be a factor in this issue?
Thanks in advance for your help!
[CODE]
csdid creditcarddebt_log [weight=hweight] , ivar(hid) time(year) gvar(o_year) notyet
(importance weights assumed)
(importance weights assumed)
Panel is not balanced
Will use observations with Pair balanced (observed at t0 and t1)
...xxxxxx...x...xx...x...xx...x........x........x.
....(4 missing values generated)
Difference-in-difference with Multiple Time Periods
Number of obs = 43,022
Outcome model : regression adjustment
Treatment model: none
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
g2018 |
t_2014_2015 | .1288567 .1257227 1.02 0.305 -.1175552 .3752686
t_2015_2016 | -.011361 .1339865 -0.08 0.932 -.2739697 .2512477
t_2016_2017 | .1221403 .1358202 0.90 0.369 -.1440623 .3883429
t_2017_2018 | 0 (omitted)
t_2017_2019 | 0 (omitted)
t_2017_2020 | 0 (omitted)
t_2017_2021 | 0 (omitted)
t_2017_2022 | 0 (omitted)
t_2017_2023 | 0 (omitted)
-------------+----------------------------------------------------------------
g2019 |
t_2014_2015 | -.0540998 .0685279 -0.79 0.430 -.188412 .0802123
t_2015_2016 | .0822121 .0730696 1.13 0.261 -.0610017 .2254259
t_2016_2017 | .0206096 .0727599 0.28 0.777 -.1219971 .1632163
t_2017_2018 | 0 (omitted)
t_2018_2019 | -.0477295 .0678176 -0.70 0.482 -.1806495 .0851906
t_2018_2020 | .022488 .0821306 0.27 0.784 -.138485 .1834609
t_2018_2021 | -.0504147 .0997901 -0.51 0.613 -.2459997 .1451702
t_2018_2022 | 0 (omitted)
t_2018_2023 | 0 (omitted)
-------------+----------------------------------------------------------------
g2020 |
t_2014_2015 | .1201289 .0676236 1.78 0.076 -.0124109 .2526686
t_2015_2016 | -.1726418 .0733755 -2.35 0.019 -.3164551 -.0288285
t_2016_2017 | .025222 .0771589 0.33 0.744 -.1260067 .1764508
t_2017_2018 | 0 (omitted)
t_2018_2019 | .016374 .1043152 0.16 0.875 -.1880799 .220828
t_2019_2020 | -.0252896 .0932367 -0.27 0.786 -.2080301 .1574508
t_2019_2021 | .2404562 .1137706 2.11 0.035 .01747 .4634425
t_2019_2022 | 0 (omitted)
t_2019_2023 | 0 (omitted)
-------------+----------------------------------------------------------------
g2021 |
t_2014_2015 | .0188281 .0717065 0.26 0.793 -.1217141 .1593703
t_2015_2016 | -.0830524 .0781733 -1.06 0.288 -.2362692 .0701645
t_2016_2017 | .0437133 .0781423 0.56 0.576 -.1094427 .1968694
t_2017_2018 | 0 (omitted)
t_2018_2019 | -.0929588 .0826294 -1.13 0.261 -.2549095 .0689919
t_2019_2020 | .05824 .0907386 0.64 0.521 -.1196044 .2360843
t_2020_2021 | -.089361 .0767514 -1.16 0.244 -.239791 .061069
t_2020_2022 | .3382623 .1501639 2.25 0.024 .0439465 .6325781
t_2020_2023 | .274011 .205645 1.33 0.183 -.1290458 .6770679
-------------+----------------------------------------------------------------
g2022 |
t_2014_2015 | -.008298 .0802026 -0.10 0.918 -.1654923 .1488963
t_2015_2016 | .0440349 .0866937 0.51 0.611 -.1258817 .2139514
t_2016_2017 | .0201032 .081277 0.25 0.805 -.1391967 .1794032
t_2017_2018 | 0 (omitted)
t_2018_2019 | .0484307 .0830982 0.58 0.560 -.1144388 .2113002
t_2019_2020 | -.0461753 .0932762 -0.50 0.621 -.2289932 .1366427
t_2020_2021 | -.1121791 .0849456 -1.32 0.187 -.2786694 .0543112
t_2021_2022 | -.0251153 .1205218 -0.21 0.835 -.2613338 .2111031
t_2021_2023 | .0934505 .1449315 0.64 0.519 -.1906101 .3775112
-------------+----------------------------------------------------------------
g2023 |
t_2014_2015 | .1603671 .1059174 1.51 0.130 -.0472272 .3679614
t_2015_2016 | .169297 .1126223 1.50 0.133 -.0514387 .3900326
t_2016_2017 | -.0347464 .1174833 -0.30 0.767 -.2650095 .1955167
t_2017_2018 | 0 (omitted)
t_2018_2019 | .0845053 .1107733 0.76 0.446 -.1326064 .3016171
t_2019_2020 | .0161582 .1263434 0.13 0.898 -.2314704 .2637868
t_2020_2021 | -.1116175 .1313876 -0.85 0.396 -.3691324 .1458974
t_2021_2022 | -.0370114 .1881763 -0.20 0.844 -.4058301 .3318074
t_2022_2023 | -.1439625 .1314627 -1.10 0.273 -.4016247 .1136997
------------------------------------------------------------------------------
Control: Not yet Treated
See Callaway and Sant'Anna (2021) for details
. estat event
ATT by Periods Before and After treatment
Event Study:Dynamic effects
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
Pre_avg | .0263242 .0186142 1.41 0.157 -.0101589 .0628074
Post_avg | .0387251 .0463956 0.83 0.404 -.0522086 .1296588
Tm8 | .1603671 .1059174 1.51 0.130 -.0472272 .3679614
Tm7 | .0447273 .0654551 0.68 0.494 -.0835624 .173017
Tm6 | .0193928 .0508632 0.38 0.703 -.0802972 .1190828
Tm5 | .0178399 .0448449 0.40 0.691 -.0700545 .1057343
Tm4 | -.0342753 .0396317 -0.86 0.387 -.111952 .0434014
Tm3 | .0613735 .0407487 1.51 0.132 -.0184925 .1412395
Tm2 | -.0438213 .0424084 -1.03 0.301 -.1269403 .0392977
Tm1 | -.0150102 .0488613 -0.31 0.759 -.1107767 .0807563
Tp0 | -.0683828 .0408175 -1.68 0.094 -.1483837 .011618
Tp1 | .1377402 .0584609 2.36 0.018 .023159 .2523213
Tp2 | .046818 .0943233 0.50 0.620 -.1380524 .2316883
------------------------------------------------------------------------------
csdid creditcarddebt_log, ivar(hid) time(year) treatment(treatment_active) gvar(o_year) agg(event) long2
Panel is not balanced
Will use observations with Pair balanced (observed at t0 and t1)
xxxx...xxxxxx...xxxxxx.....xxxx.....xxxxxx...xxxxx
x...
Difference-in-difference with Multiple Time Periods
Number of obs = 21,171
Outcome model : regression adjustment
Treatment model: none
------------------------------------------------------------------------------
| Coefficient Std. err. z P>|z| [95% conf. interval]
-------------+----------------------------------------------------------------
Pre_avg | .1072762 .0532004 2.02 0.044 .0030053 .2115471
Post_avg | .0114637 .0662737 0.17 0.863 -.1184304 .1413578
Tm4 | .2430794 .1101621 2.21 0.027 .0271656 .4589932
Tm3 | .0213244 .0673931 0.32 0.752 -.1107636 .1534125
Tm2 | .0574248 .0391181 1.47 0.142 -.0192452 .1340948
Tp0 | -.0012944 .0405202 -0.03 0.975 -.0807127 .0781238
Tp1 | .1258476 .0713153 1.76 0.078 -.0139277 .2656229
Tp2 | -.090162 .1567307 -0.58 0.565 -.3973485 .2170245
------------------------------------------------------------------------------
Control: Never Treated
See Callaway and Sant'Anna (2021) for details
[CODE]
Comment