Hello, I am very new here. Joined few minutes back but have been an active silent reader of the forum though. Before anything, I wish to thank all the members who have over the years, clarified doubts and suggested solutions for a variety of stata issues and made life easy for a lot us.
I will learn over the course of next few posts on how to post effectively and sorry if this first post comes across as rather crude and not up to the standards. But I'll try.
I am trying to a difference in difference model, I have an unbalanced panel from 2005q1 to 2016q4 with panel id = firm_id . The policy change went into effect from 2010q3. For the treatment threshold, all the firms that had asset_size >=9.0 after 2010q3 are affected. I want to run regressions of the form
yit = firm-fixed-effects + quarter-fixed-effects + beta*(i.asset_size_category * post_cut_off) where asset_size_category takes the values = 9 if asset_size is between 9 & 9.999, = 10 if asset_size is between 10 & 10.999 all the way up to 14. (my dataset contains asset sizes from 1 to 15). Accordingly, I run
xtreg y post_cut_off##asset_size_category i.qdate, fe vce(cluster firm_id)
This gives me the stata output
xtreg y post_cut_off##ib10.total_asset_cat i.qdate l.y,fe vce(cluster idrssd)
note: 227.qdate omitted because of collinearity
Fixed-effects (within) regression Number of obs = 1,620
Group variable: idrssd Number of groups = 133
R-sq: Obs per group:
within = 0.4093 min = 1
between = 0.8942 avg = 12.2
overall = 0.7330 max = 47
F(57,132) = 42.08
corr(u_i, Xb) = 0.6746 Prob > F = 0.0000
(Std. Err. adjusted for 133 clusters in idrssd)
----------------------------------------------------------------------------------------------
| Robust
y| Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
1.post_cut_off | 8.065365 2.641259 3.05 0.003 2.840693 13.29004
|
total_asset_cat |
9 | 3.295907 1.317305 2.50 0.014 .6901476 5.901666
11 | 2.230045 1.528917 1.46 0.147 -.7943037 5.254394
12 | 2.263994 1.606081 1.41 0.161 -.9129932 5.440981
13 | 3.097159 2.474964 1.25 0.213 -1.798565 7.992883
14 | .4577359 1.892715 0.24 0.809 -3.286241 4.201713
|
post_cut_off#total_asset_cat |
1 9 | -3.38928 1.395232 -2.43 0.016 -6.149186 -.6293728
1 11 | -1.987856 1.803966 -1.10 0.272 -5.55628 1.580567
1 12 | -2.217762 1.854352 -1.20 0.234 -5.885853 1.45033
1 13 | -3.550415 2.505106 -1.42 0.159 -8.505762 1.404932
1 14 | -.6033758 1.953452 -0.31 0.758 -4.467496 3.260745
|
qdate |
182 | -.3856326 .6518373 -0.59 0.555 -1.675031 .903766
183 | -.2372812 .8511808 -0.28 0.781 -1.921001 1.446439
184 | 1.517389 2.030336 0.75 0.456 -2.498817 5.533595
185 | 1.238413 1.576169 0.79 0.433 -1.879404 4.35623
186 | 1.776161 1.782161 1.00 0.321 -1.749129 5.301451
187 | 3.411604 2.889696 1.18 0.240 -2.3045 9.127708
188 | 3.28036 2.011233 1.63 0.105 -.6980573 7.258778
189 | 2.460916 2.067131 1.19 0.236 -1.628073 6.549904
190 | 2.825048 2.094666 1.35 0.180 -1.318408 6.968503
191 | 4.629275 2.771521 1.67 0.097 -.8530669 10.11162
192 | 4.063019 4.087774 0.99 0.322 -4.023003 12.14904
193 | 4.2805 2.721774 1.57 0.118 -1.103438 9.664437
194 | 3.43001 2.603581 1.32 0.190 -1.72013 8.58015
195 | 9.433271 3.526246 2.68 0.008 2.458007 16.40853
196 | 16.24624 5.132718 3.17 0.002 6.093215 26.39926
197 | 8.455518 3.065737 2.76 0.007 2.391187 14.51985
198 | 9.882101 3.724985 2.65 0.009 2.513713 17.25049
199 | 12.69582 3.563849 3.56 0.001 5.646175 19.74547
200 | 1.867825 3.95118 0.47 0.637 -5.948 9.68365
201 | 8.240729 3.556003 2.32 0.022 1.206604 15.27485
202 | .8703124 1.075442 0.81 0.420 -1.257017 2.997642
203 | 1.608618 1.221838 1.32 0.190 -.8082977 4.025533
204 | 1.30814 1.097128 1.19 0.235 -.8620869 3.478367
205 | 1.554051 1.13313 1.37 0.173 -.687393 3.795495
206 | .7793318 1.057971 0.74 0.463 -1.31344 2.872104
207 | 1.147796 1.035874 1.11 0.270 -.9012662 3.196857
208 | .6734256 1.331553 0.51 0.614 -1.960518 3.307369
209 | .1621666 .868289 0.19 0.852 -1.555395 1.879728
210 | 1.378823 .9769813 1.41 0.161 -.5537424 3.311389
211 | 1.271435 .7697856 1.65 0.101 -.2512772 2.794147
212 | 2.198235 1.288721 1.71 0.090 -.3509823 4.747452
213 | 2.296725 1.226117 1.87 0.063 -.1286548 4.722105
214 | 1.794132 .7569187 2.37 0.019 .2968724 3.291392
215 | 2.532105 1.134156 2.23 0.027 .2886327 4.775578
216 | 2.486962 .9344627 2.66 0.009 .6385025 4.335422
217 | 2.107282 .8519065 2.47 0.015 .4221268 3.792437
218 | 2.604755 .9912652 2.63 0.010 .6439342 4.565575
219 | 2.258858 .6362073 3.55 0.001 1.000377 3.517339
220 | 1.659708 .8535926 1.94 0.054 -.0287828 3.348198
221 | 1.912985 1.169457 1.64 0.104 -.4003174 4.226288
222 | 1.595876 .6107158 2.61 0.010 .3878193 2.803932
223 | 2.688839 1.185928 2.27 0.025 .3429557 5.034723
224 | .5796222 1.211211 0.48 0.633 -1.816273 2.975517
225 | 1.336593 .615738 2.17 0.032 .1186025 2.554584
226 | .5550953 .4122213 1.35 0.180 -.2603192 1.37051
227 | 0 (omitted)
|
y |
L1. | .5327861 .0476364 11.18 0.000 .4385566 .6270155
|
_cons | 19.05293 2.840656 6.71 0.000 13.43383 24.67203#
Two questions related to this:
1) Is this the correct way to test treatment affect across different treatment groups ( where groups (buckets) here are defined according to the asset size)
2) how to interpret the results (given the presence of _cons and omitted qdate 227)
I will learn over the course of next few posts on how to post effectively and sorry if this first post comes across as rather crude and not up to the standards. But I'll try.
I am trying to a difference in difference model, I have an unbalanced panel from 2005q1 to 2016q4 with panel id = firm_id . The policy change went into effect from 2010q3. For the treatment threshold, all the firms that had asset_size >=9.0 after 2010q3 are affected. I want to run regressions of the form
yit = firm-fixed-effects + quarter-fixed-effects + beta*(i.asset_size_category * post_cut_off) where asset_size_category takes the values = 9 if asset_size is between 9 & 9.999, = 10 if asset_size is between 10 & 10.999 all the way up to 14. (my dataset contains asset sizes from 1 to 15). Accordingly, I run
xtreg y post_cut_off##asset_size_category i.qdate, fe vce(cluster firm_id)
This gives me the stata output
xtreg y post_cut_off##ib10.total_asset_cat i.qdate l.y,fe vce(cluster idrssd)
note: 227.qdate omitted because of collinearity
Fixed-effects (within) regression Number of obs = 1,620
Group variable: idrssd Number of groups = 133
R-sq: Obs per group:
within = 0.4093 min = 1
between = 0.8942 avg = 12.2
overall = 0.7330 max = 47
F(57,132) = 42.08
corr(u_i, Xb) = 0.6746 Prob > F = 0.0000
(Std. Err. adjusted for 133 clusters in idrssd)
----------------------------------------------------------------------------------------------
| Robust
y| Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------------------------+----------------------------------------------------------------
1.post_cut_off | 8.065365 2.641259 3.05 0.003 2.840693 13.29004
|
total_asset_cat |
9 | 3.295907 1.317305 2.50 0.014 .6901476 5.901666
11 | 2.230045 1.528917 1.46 0.147 -.7943037 5.254394
12 | 2.263994 1.606081 1.41 0.161 -.9129932 5.440981
13 | 3.097159 2.474964 1.25 0.213 -1.798565 7.992883
14 | .4577359 1.892715 0.24 0.809 -3.286241 4.201713
|
post_cut_off#total_asset_cat |
1 9 | -3.38928 1.395232 -2.43 0.016 -6.149186 -.6293728
1 11 | -1.987856 1.803966 -1.10 0.272 -5.55628 1.580567
1 12 | -2.217762 1.854352 -1.20 0.234 -5.885853 1.45033
1 13 | -3.550415 2.505106 -1.42 0.159 -8.505762 1.404932
1 14 | -.6033758 1.953452 -0.31 0.758 -4.467496 3.260745
|
qdate |
182 | -.3856326 .6518373 -0.59 0.555 -1.675031 .903766
183 | -.2372812 .8511808 -0.28 0.781 -1.921001 1.446439
184 | 1.517389 2.030336 0.75 0.456 -2.498817 5.533595
185 | 1.238413 1.576169 0.79 0.433 -1.879404 4.35623
186 | 1.776161 1.782161 1.00 0.321 -1.749129 5.301451
187 | 3.411604 2.889696 1.18 0.240 -2.3045 9.127708
188 | 3.28036 2.011233 1.63 0.105 -.6980573 7.258778
189 | 2.460916 2.067131 1.19 0.236 -1.628073 6.549904
190 | 2.825048 2.094666 1.35 0.180 -1.318408 6.968503
191 | 4.629275 2.771521 1.67 0.097 -.8530669 10.11162
192 | 4.063019 4.087774 0.99 0.322 -4.023003 12.14904
193 | 4.2805 2.721774 1.57 0.118 -1.103438 9.664437
194 | 3.43001 2.603581 1.32 0.190 -1.72013 8.58015
195 | 9.433271 3.526246 2.68 0.008 2.458007 16.40853
196 | 16.24624 5.132718 3.17 0.002 6.093215 26.39926
197 | 8.455518 3.065737 2.76 0.007 2.391187 14.51985
198 | 9.882101 3.724985 2.65 0.009 2.513713 17.25049
199 | 12.69582 3.563849 3.56 0.001 5.646175 19.74547
200 | 1.867825 3.95118 0.47 0.637 -5.948 9.68365
201 | 8.240729 3.556003 2.32 0.022 1.206604 15.27485
202 | .8703124 1.075442 0.81 0.420 -1.257017 2.997642
203 | 1.608618 1.221838 1.32 0.190 -.8082977 4.025533
204 | 1.30814 1.097128 1.19 0.235 -.8620869 3.478367
205 | 1.554051 1.13313 1.37 0.173 -.687393 3.795495
206 | .7793318 1.057971 0.74 0.463 -1.31344 2.872104
207 | 1.147796 1.035874 1.11 0.270 -.9012662 3.196857
208 | .6734256 1.331553 0.51 0.614 -1.960518 3.307369
209 | .1621666 .868289 0.19 0.852 -1.555395 1.879728
210 | 1.378823 .9769813 1.41 0.161 -.5537424 3.311389
211 | 1.271435 .7697856 1.65 0.101 -.2512772 2.794147
212 | 2.198235 1.288721 1.71 0.090 -.3509823 4.747452
213 | 2.296725 1.226117 1.87 0.063 -.1286548 4.722105
214 | 1.794132 .7569187 2.37 0.019 .2968724 3.291392
215 | 2.532105 1.134156 2.23 0.027 .2886327 4.775578
216 | 2.486962 .9344627 2.66 0.009 .6385025 4.335422
217 | 2.107282 .8519065 2.47 0.015 .4221268 3.792437
218 | 2.604755 .9912652 2.63 0.010 .6439342 4.565575
219 | 2.258858 .6362073 3.55 0.001 1.000377 3.517339
220 | 1.659708 .8535926 1.94 0.054 -.0287828 3.348198
221 | 1.912985 1.169457 1.64 0.104 -.4003174 4.226288
222 | 1.595876 .6107158 2.61 0.010 .3878193 2.803932
223 | 2.688839 1.185928 2.27 0.025 .3429557 5.034723
224 | .5796222 1.211211 0.48 0.633 -1.816273 2.975517
225 | 1.336593 .615738 2.17 0.032 .1186025 2.554584
226 | .5550953 .4122213 1.35 0.180 -.2603192 1.37051
227 | 0 (omitted)
|
y |
L1. | .5327861 .0476364 11.18 0.000 .4385566 .6270155
|
_cons | 19.05293 2.840656 6.71 0.000 13.43383 24.67203#
Two questions related to this:
1) Is this the correct way to test treatment affect across different treatment groups ( where groups (buckets) here are defined according to the asset size)
2) how to interpret the results (given the presence of _cons and omitted qdate 227)
Comment