Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cox Proportional Hazard Model for Financial Data with Pre and Post Period

    I have quarterly panel data of firms from 2003-2019 these firms have quarterly impairments. My duration variable is measuring how many quarters it takes for a firm to impair and it is increasing every quarter.
    In 2011 there was a law change retlated to simplifying impairment and I am trying to see how this law change is impacting my duration variable. Is it taking less time (less quarters for the firms to impair). My covariates are time varying. However, I do not know how to split my duration variable for the two periods (2003-2010) and (2011-2019). My current code is attached below. I have included only 300 observations but my real dataset has around 110,000 firm-quarters.
    Question 1. How do I compare the duration in the pre and post period. My current duration measure is not defined based on period. It is depending on the start date of the intangible asset and the date when the firm impairs.
    Question 2. Is my code correct?
    Question 3. Should I interact the post variable with the other covariates?

    drop _d _t _t0
    stset duration, failure(impair==1) id(firm_id)
    stcox post return_on_assets book_to_market log_market_cap i.fama_french_industry, tvc(return_on_assets book_to_market log_market_cap) texp(log(_t)) vce(cluster firm_id)
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(book_to_market return_on_assets) int post float(impair duration) long firm_id float(fama_french_industry log_market_cap) byte(_st _d _t _t0)
      .8966172    .06447939 1 0  1 1272  8 4.1390324 1 0  1  0
       .835613   .007337708 1 0  2 1272  8 4.2039876 1 0  2  1
      .8032083 -.0046543106 1 0  3 1272  8 4.2274594 1 0  3  2
      .8596072   .034196347 1 0  4 1272  8  4.462892 1 0  4  3
      .8044139      .053599 1 0  5 1272  8  4.570695 1 0  5  4
      .8091924   .007400956 1 0  6 1272  8 4.5555134 1 0  6  5
      .8400197  -.004185582 1 0  7 1272  8 4.5064707 1 0  7  6
      .8029753   .017764313 1 0  8 1272  8 4.5445566 1 0  8  7
      .8095508    .03933277 2 0  9 1272  8  4.565257 1 0  9  8
      .9121972  .0020047089 2 0 10 1272  8 4.4234767 1 0 10  9
       .909099 -.0030678534 2 0 11 1272  8 4.4330506 1 0 11 10
      .9776149    .02575004 2 0 12 1272  8  4.370613 1 0 12 11
      .9367127    .04936608 2 0 13 1272  8 4.4610457 1 0 13 12
      .9131064  -.005053317 2 0 14 1272  8 4.5005217 1 0 14 13
      .8968622  -.005792429 2 0 15 1272  8 4.6709056 1 0 15 14
     1.1614501    .02156837 2 1 16 1272  8  4.441822 1 1 16 15
      .6236374   .004072385 1 0  1 1736 11  5.258449 1 0  1  0
      .6104081  .0043324702 1 0  2 1736 11  5.259243 1 0  2  1
     .58445483   .004157374 1 0  3 1736 11  5.331042 1 0  3  2
      .4524945   .005186505 1 0  4 1736 11  5.602196 1 0  4  3
      .5491767   .004712553 1 0  5 1736 11  5.411846 1 0  5  4
      .5853973   .005328792 1 0  6 1736 11  5.379725 1 0  6  5
      .6058356    .00544325 1 0  7 1736 11  5.368611 1 0  7  6
      .5882831   .006371038 1 0  8 1736 11  5.410522 1 0  8  7
     .54273826   .006046484 1 0  9 1736 11  5.507405 1 0  9  8
     .51905286    .00600804 1 0 10 1736 11  5.565961 1 0 10  9
       .448052   .005475581 1 0 11 1736 11  5.738169 1 0 11 10
      .4887904   .004042889 1 0 12 1736 11   5.65038 1 0 12 11
      .5980867   .002978339 1 0 14 1736 11  5.457988 1 0 14 12
      .7984604  .0041178544 1 0 15 1736 11  5.184542 1 0 15 14
     1.1835785  .0015741757 1 0 16 1736 11  5.355729 1 0 16 15
     1.3391635   .003119492 1 0 17 1736 11  5.238935 1 0 17 16
     2.1547086    .00244545 1 0 18 1736 11   4.75304 1 0 18 17
     1.0764625   .002651175 1 0 19 1736 11  5.438007 1 0 19 18
      .9404865 -.0009106873 1 0 20 1736 11  5.555421 1 0 20 19
      2.111146   -.00164302 1 0 21 1736 11 4.7186375 1 0 21 20
     2.2050111  -.007882987 1 1 22 1736 11  3.977203 1 1 22 21
      .7585808            . 1 0  1 1141  6  3.422335 1 0  1  0
      .8853176   -.09684549 1 0  2 1141  6   3.22632 1 0  2  1
      .3473555   -.06350658 1 0  3 1141  6  3.736258 1 0  3  2
      .3508258    -.1004477 1 0  4 1141  6  3.390408 1 0  4  3
      .5111542   -.10408749 1 0  5 1141  6   2.98066 1 0  5  4
      .7119354    -.1393006 1 0  6 1141  6 2.4779425 1 0  6  5
     .55459034   -.13609467 1 0  7 1141  6  2.590815 1 0  7  6
     .12120446   -.14483991 1 1  8 1141  6  2.555093 1 1  8  7
     1.1522253   .006174172 1 0  1 1140  3  3.987811 1 0  1  0
     1.0715232   .009435218 1 0  2 1140  3  4.072171 1 0  2  1
      .9977745    .00640859 1 0  3 1140  3  4.176104 1 0  3  2
      .8206759   .022610845 1 0  4 1140  3  4.132403 1 0  4  3
      .6185091            . 1 0  5 1140  3 4.5158253 1 0  5  4
     .51677954   .033925563 1 0  6 1140  3  4.615332 1 0  6  5
      .4935582   .018328913 1 0  7 1140  3 4.5054965 1 0  7  6
     .52021694    .02412995 1 0  8 1140  3 4.5428615 1 0  8  7
      .2956222    .01493111 1 0  9 1140  3  5.075408 1 0  9  8
    .070015855    .02166516 1 0 10 1140  3  5.072267 1 0 10  9
     .10516728    .04519248 1 0 11 1140  3  5.127019 1 0 11 10
     .03568016   .036449004 1 0 12 1140  3  5.162646 1 0 12 11
    .070225924    .04987798 1 0 13 1140  3  5.412003 1 0 13 12
     .13389821    .06470325 1 0 14 1140  3  5.724513 1 0 14 13
      .1630947    .04778165 1 0 15 1140  3  5.955989 1 0 15 14
     .13863318    .04445805 1 0 16 1140  3  6.031729 1 0 16 15
     .18719344    .06171638 1 0 17 1140  3  5.916352 1 0 17 16
       .219412    .03557954 1 0 18 1140  3  5.814163 1 0 18 17
     .13552389    .02725355 1 0 19 1140  3  5.618901 1 0 19 18
      .1552171   .032451123 1 0 20 1140  3  5.613028 1 0 20 19
     .21170333   .018743357 1 0 21 1140  3  5.329682 1 0 21 20
      .2050699  .0024723054 1 0 22 1140  3  5.254867 1 0 22 21
     .28497255  -.012790396 1 0 23 1140  3  4.776621 1 0 23 22
     .30386645    .02354799 1 0 24 1140  3  4.891082 1 0 24 23
     .53506744    .06664678 1 0 25 1140  3 4.5863867 1 0 25 24
      .4687672    .05191504 1 0 26 1140  3  4.932571 1 0 26 25
       .334272   .033547994 1 0 27 1140  3  5.386633 1 0 27 26
      .3171578    .01961908 1 0 28 1140  3  5.480629 1 0 28 27
     .29300883  -.011758676 1 0 29 1140  3   5.48105 1 0 29 28
      .3654765   .003356959 1 0 30 1140  3  5.248275 1 0 30 29
      .3556077   .027581057 1 0 31 1140  3  5.269317 1 0 31 30
      .3782775    .02448991 1 0 32 1140  3  5.015324 1 0 32 31
      .3400678   .014174514 1 0 33 1140  3  5.142085 1 0 33 32
      .3105861   .011531192 1 0 34 1140  3  5.231832 1 0 34 33
     .27789885    .02348499 1 0 35 1140  3  5.008428 1 0 35 34
      .3368449   .019493556 1 0 36 1140  3  5.006592 1 0 36 35
     .27842396   .013771587 2 0 37 1140  3  5.208678 1 0 37 36
     .29067072   .030721795 2 0 38 1140  3  5.265187 1 0 38 37
     .26252562    .06013305 2 0 39 1140  3   5.56267 1 0 39 38
      .2085115   .030909864 2 0 40 1140  3  5.870982 1 0 40 39
     .22685486   .031206975 2 0 41 1140  3  5.878336 1 0 41 40
      .1915423   .012913926 2 0 42 1140  3  6.069649 1 0 42 41
      .1883736    .01478589 2 0 43 1140  3  6.115894 1 0 43 42
     .25664082    .01532986 2 0 44 1140  3  5.810576 1 0 44 43
      .3268628  -.003553817 2 0 45 1140  3  5.512267 1 0 45 44
     .32256225  .0041005802 2 0 46 1140  3  5.203926 1 0 46 45
       .288707   .009520662 2 0 47 1140  3  5.337782 1 0 47 46
        .25547   .007112143 2 0 48 1140  3  5.458202 1 0 48 47
     .23357622    .01268231 2 0 49 1140  3  5.544041 1 0 49 48
     .28427175    .04849245 2 0 50 1140  3  5.547753 1 0 50 49
      .3192396    .03726658 2 0 51 1140  3   5.51234 1 0 51 50
     .21959633    .04442048 2 0 52 1140  3  6.014302 1 0 52 51
     .22232403    .03886994 2 0 53 1140  3   6.07133 1 0 53 52
      .3473236    .05928068 2 0 54 1140  3  5.756299 1 0 54 53
     .27777803    .02968854 2 0 55 1140  3   6.02217 1 0 55 54
    end
    label values post period
    label def period 1 "Post SFAS142", modify
    label def period 2 "Post ASU2011", modify
    label values firm_id gvkey_num
    label def gvkey_num 1140 "011903", modify
    label def gvkey_num 1141 "011907", modify
    label def gvkey_num 1272 "012994", modify
    label def gvkey_num 1736 "019049", modify
    label values fama_french_industry ff12_ind
    label def ff12_ind 3 "Manufacturing -- Machinery, Trucks, Planes, Off Furn, Paper, Com Printing", modify
    label def ff12_ind 6 "Business Equipment -- Computers, Software, and Electronic Equipment", modify
    label def ff12_ind 8 "Utilities", modify
    label def ff12_ind 11 "Finance", modify

  • #2
    I don't think there is any way to do this with the data shown. You say that you have quarterly data from 2003 through 2019, but the example data you show is not consistent with that. If it were, there would be 68 observations for each firm. Yet the largest number of observations is 55. Moreover, at least in firm 019049, there is a gap in the sequence of the duration variable.

    If you did have a complete balanced 2003-2019 panel, then we could assume that duration = 1 corresponds to 2003q1, and duration 68 corresponds to 2019q4, and from that we could infer that the last quarter of 2010 corresponds to duration = 32 and we could set an indicator for duration between 1 and 32 vs 33 through 68. But with this data, I don't see that there is any information that tells us what the correspondence between duration and calendar quarter is.

    Comment


    • #3
      Dear Clyde, I am sorry but my dataset is huge and I cannot replicate it with a small subsample. My duration variable is dependent on another variable which is when the firm first acquires goodwill. So if goodwill was available in 2003q1 that'w when I start measuring duration. I heard there is a way to split the data using stsplit. How can I apply stsplit for a Cox Proportional Hazard Model?

      Comment


      • #4
        My duration variable is dependent on another variable which is when the firm first acquires goodwill. So if goodwill was available in 2003q1 that'w when I start measuring duration.
        Well, that suggests an approach that could get what you want. But with no details, it's hard to say more. I suggest you post back with an example data set that includes both the duration and goodwill variables, using -dataex-, and the code you used to calculate duration from this other variable.

        As for using -stsplit-, you won't need to do that. Your data is already split. It's just a question of getting the right variables setup and slotting them into the appropriate places in your -stset- command.

        Comment


        • #5
          Dear Clyde, Please see the updated example for this. I included an example of how I measure duration. I have 4 types of firms:
          * 1) firms which have intangible asset at the beginning of the period which is 2003q1, and impair at some point within the sample. For these firms the duration is measured from 2003q1 onwards.
          * 2) have intangible assetat the beginning of the period which is 2003q1, and do not impair within the sample. For these firms also the duration is measured from 2003q1 onwards.
          * 3) do not have good intangible assetat at the beginning, acquire it within the sample, and then impair at some point within the sample. For these firms also the duration is measured from the quarter in which they acquire intangible_asset.
          * 4) do not have good goodwill at the beginning, acquire it within the sample, and do not impair within the sample. For these firms also the duration is measured from the quarter in which they acquire intangible_asset.


          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input long firm_id float(yq type) int post float duration double(intangible_asset impairment) float(book_to_market return_on_assets log_market_cap fama_french_industry)
          1272 200 1 1  1 13.814       .   .8966172    .06447939 4.1390324  8
          1272 201 1 1  2 13.814       .    .835613   .007337708 4.2039876  8
          1272 202 1 1  3  13.93       .   .8032083 -.0046543106 4.2274594  8
          1272 203 1 1  4 14.608       .   .8596072   .034196347  4.462892  8
          1272 204 1 1  5 14.608       .   .8044139      .053599  4.570695  8
          1272 205 1 1  6 14.608       .   .8091924   .007400956 4.5555134  8
          1272 206 1 1  7 14.608       .   .8400197  -.004185582 4.5064707  8
          1272 207 1 1  8 14.608       .   .8029753   .017764313 4.5445566  8
          1272 208 1 2  9 14.608       .   .8095508    .03933277  4.565257  8
          1272 209 1 2 10 14.751       .   .9121972  .0020047089 4.4234767  8
          1272 210 1 2 11 14.751       .    .909099 -.0030678534 4.4330506  8
          1272 211 1 2 12 14.891       .   .9776149    .02575004  4.370613  8
          1272 212 1 2 13 14.891       .   .9367127    .04936608 4.4610457  8
          1272 213 1 2 14 16.517       .   .9131064  -.005053317 4.5005217  8
          1272 214 1 2 15 16.993       .   .8968622  -.005792429 4.6709056  8
          1272 215 1 2 16 16.267   -.726  1.1614501    .02156837  4.441822  8
          1736 176 1 1  1 41.952       .   .6236374   .004072385  5.258449 11
          1736 177 1 1  2 41.952       .   .6104081  .0043324702  5.259243 11
          1736 178 1 1  3 41.952       .  .58445483   .004157374  5.331042 11
          1736 179 1 1  4 41.952       .   .4524945   .005186505  5.602196 11
          1736 180 1 1  5 41.952       .   .5491767   .004712553  5.411846 11
          1736 181 1 1  6 41.952       .   .5853973   .005328792  5.379725 11
          1736 182 1 1  7 41.952       .   .6058356    .00544325  5.368611 11
          1736 183 1 1  8 41.952       .   .5882831   .006371038  5.410522 11
          1736 184 1 1  9 41.952       .  .54273826   .006046484  5.507405 11
          1736 185 1 1 10 41.952       .  .51905286    .00600804  5.565961 11
          1736 186 1 1 11 41.952       .    .448052   .005475581  5.738169 11
          1736 187 1 1 12 41.952       .   .4887904   .004042889   5.65038 11
          1736 189 1 1 14 41.793       .   .5980867   .002978339  5.457988 11
          1736 190 1 1 15 41.793       .   .7984604  .0041178544  5.184542 11
          1736 191 1 1 16 95.643       .  1.1835785  .0015741757  5.355729 11
          1736 192 1 1 17 96.543       .  1.3391635   .003119492  5.238935 11
          1736 193 1 1 18 98.463       .  2.1547086    .00244545   4.75304 11
          1736 194 1 1 19 97.506       .  1.0764625   .002651175  5.438007 11
          1736 195 1 1 20 97.367       .   .9404865 -.0009106873  5.555421 11
          1736 196 1 1 21 97.367       .   2.111146   -.00164302 4.7186375 11
          1736 197 1 1 22      0 -97.367  2.2050111  -.007882987  3.977203 11
          1141 172 1 1  1  4.529       .   .7585808            .  3.422335  6
          1141 173 1 1  2  4.529       .   .8853176   -.09684549   3.22632  6
          1141 174 1 1  3  4.529       .   .3473555   -.06350658  3.736258  6
          1141 175 1 1  4  4.528       .   .3508258    -.1004477  3.390408  6
          1141 176 1 1  5  4.529       .   .5111542   -.10408749   2.98066  6
          1141 177 1 1  6  4.529       .   .7119354    -.1393006 2.4779425  6
          1141 178 1 1  7  4.529       .  .55459034   -.13609467  2.590815  6
          1141 179 1 1  8      0  -4.529  .12120446    -.1535031  2.555093  6
          1140 172 2 1  1 32.448       .  1.1522253   .006174172  3.987811  3
          1140 173 2 1  2 31.972       .  1.0715232   .009435218  4.072171  3
          1140 174 2 1  3  31.49       .   .9977745    .00640859  4.176104  3
          1140 175 2 1  4 31.484       .   .8206759   .022610845  4.132403  3
          1140 176 2 1  5 31.139       .   .6185091            . 4.5158253  3
          1140 177 2 1  6 30.794       .  .51677954   .033925563  4.615332  3
          1140 178 2 1  7 30.449       .   .4935582   .018328913 4.5054965  3
          1140 179 2 1  8 30.104       .  .52021694    .02412995 4.5428615  3
          1140 180 2 1  9 29.348       .   .2956222    .01493111  5.075408  3
          1140 181 2 1 10  17.25       . .070015855    .02166516  5.072267  3
          1140 182 2 1 11 16.905       .  .10516728    .04519248  5.127019  3
          1140 183 2 1 12 16.888       .  .03568016   .036449004  5.162646  3
          1140 184 2 1 13 16.543       . .070225924    .04987798  5.412003  3
          1140 185 2 1 14 16.198       .  .13389821    .06470325  5.724513  3
          1140 186 2 1 15 15.854       .   .1630947    .04778165  5.955989  3
          1140 187 2 1 16 16.209       .  .13863318    .04445805  6.031729  3
          1140 188 2 1 17 16.762       .  .18719344    .06171638  5.916352  3
          1140 189 2 1 18 16.243       .    .219412    .03557954  5.814163  3
          1140 190 2 1 19 15.898       .  .13552389    .02725355  5.618901  3
          1140 191 2 1 20 15.553       .   .1552171   .032451123  5.613028  3
          1140 192 2 1 21 15.208       .  .21170333   .018743357  5.329682  3
          1140 193 2 1 22 11.583       .   .2050699  .0024723054  5.254867  3
          1140 194 2 1 23 11.238       .  .28497255  -.012790396  4.776621  3
          1140 195 2 1 24 10.894       .  .30386645    .02354799  4.891082  3
          1140 196 2 1 25 10.548       .  .53506744    .06664678 4.5863867  3
          1140 197 2 1 26 10.204       .   .4687672    .05191504  4.932571  3
          1140 198 2 1 27  9.859       .    .334272   .033547994  5.386633  3
          1140 199 2 1 28  9.514       .   .3171578    .01961908  5.480629  3
          1140 200 2 1 29   9.17       .  .29300883  -.011758676   5.48105  3
          1140 201 2 1 30  8.825       .   .3654765   .003356959  5.248275  3
          1140 202 2 1 31   8.48       .   .3556077   .027581057  5.269317  3
          1140 203 2 1 32  8.135       .   .3782775    .02448991  5.015324  3
          1140 204 2 1 33   7.79       .   .3400678   .014174514  5.142085  3
          1140 205 2 1 34  7.445       .   .3105861   .011531192  5.231832  3
          1140 206 2 1 35  7.101       .  .27789885    .02348499  5.008428  3
          1140 207 2 1 36  6.871       .   .3368449   .019493556  5.006592  3
          1140 208 2 2 37  6.871       .  .27842396   .013771587  5.208678  3
          1140 209 2 2 38  6.871       .  .29067072   .030721795  5.265187  3
          1140 210 2 2 39  6.871       .  .26252562    .06013305   5.56267  3
          1140 211 2 2 40  6.871       .   .2085115   .030909864  5.870982  3
          1140 212 2 2 41  6.871       .  .22685486   .031206975  5.878336  3
          1140 213 2 2 42  6.871       .   .1915423   .012913926  6.069649  3
          1140 214 2 2 43  6.871       .   .1883736    .01478589  6.115894  3
          1140 215 2 2 44  6.871       .  .25664082    .01532986  5.810576  3
          1140 216 2 2 45  6.871       .   .3268628  -.003553817  5.512267  3
          1140 217 2 2 46  6.871       .  .32256225  .0041005802  5.203926  3
          1140 218 2 2 47  6.871       .    .288707   .009520662  5.337782  3
          1140 219 2 2 48  6.871       .     .25547   .007112143  5.458202  3
          1140 220 2 2 49  6.871       .  .23357622    .01268231  5.544041  3
          1140 221 2 2 50  6.871       .  .28427175    .04849245  5.547753  3
          1140 222 2 2 51  6.871       .   .3192396    .03726658   5.51234  3
          1140 223 2 2 52  6.871       .  .21959633    .04442048  6.014302  3
          1140 224 2 2 53  6.871       .  .22232403    .03886994   6.07133  3
          1140 225 2 2 54  6.871       .   .3473236    .05928068  5.756299  3
          1140 226 2 2 55  6.871       .  .27777803    .02968854   6.02217  3
          end
          format %tq yq
          I use the following code:
          Code:
          gen impair_dummy=impairment<0
          stset duration, failure(impair_dummy==1) id(firm_id) 
          stcox post  return_on_assets book_to_market log_market_cap i.fama_french_industry, tvc(return_on_assets book_to_market log_market_cap) texp(log(_t)) vce(cluster firm_id)
          Is my code correct? Should I use stsplit?

          Comment


          • #6
            This is correct provided two things that I cannot verify or refute from what you show are both true:
            1. Your calculation of the duration variable is a correct implementation of what you describe in words. You refer to duration beginning from when an intangible asset is acquired. But in the example data shown, each firm has some intangible asset at all dates. I suppose the example data has elided quarters preceding the acquisition of the intangible asset when it was the basis for calculating duration. But as I can't verify that, I'll just call your attention to it.
            2. Your variables really are time-varying covariates. I am skeptical. It is certainly the case that each of the covariates does vary over time within firm. But that is not what time-varying covariate in the context of survival analysis means. The term time-varying covariates is really unfortunate because what it says is quite different from its meaning. It's almost like using the phase "kick the bucket" when you really mean kicking buckets over. What "time-varying covariate" actually means is that the effect of the covariate on the hazard varies over time, not that the covariate itself varies over time. Another way of saying this is that the variable violates the proportional hazards assumption. Yet another way of saying this is that there is an interaction between the variable and time. This "time-varying covariate" terminology is the source of endless confusion. Unfortunately, it is entrenched in the literature and I don't think it will go away any time soon. Anyway, you should check whether you really have "time varying covariates" or just covariates that vary over time. A simple way to do that would be to run the -stcox- command without the -tvc()- option and then run -estat phtest, detail- to see which, if any, of these variables violate the PH assumption. If you find any such, you can then use them in -tvc()-.
            And, no, there is no role for -stsplit- here in setting up your analysis: your data are already split.

            Comment


            • #7
              Hi Clyde, Thanks for your clarification. 1. Yes, that dataset omits firm-quarters preceding the acquisition of the intangible asset. Is that ok? 2. I also omit firm quarters after the initial impairment. Some firms impair multiple times, and I catch only the first impairment. I am not sure how to reset the duration to catch multiple impairments.

              Comment


              • #8
                It is OK to omit firm-quarters preceding the acquisition of the intangible asset. In fact, -stset- would exclude them from the analysis anyway because their duration value would be 0 or negative. Omitting firm quarters after the initial impairment is also OK if you do not want to capture subsequent impairments--again, by default -stset- excludes observations following a failure.

                If you want to capture all failures, not just the first, then, of course, you must restore the observations that follow the first failure to the data set. And the way to have Stata include them in the analysis is to override the default -stset- behavior I mentioned in the previous paragraph by adding -exit(time .)- to the options of the -stset- command. That tells Stata to retain and analyze observations until the data runs out. That's what you need to do: do not "reset the duration variable." Keep it as it was originally.

                Comment


                • #9
                  I am running a Cox Proportional Hazard Model with Interaction Terms:
                  gen impair_dummy=impairment<0 gen btm_dummy=book_to_market>1
                  stset duration, failure(impair_dummy==1) id(firm_id) stcox 2.post##c.return_on_assets 2.post##i.btm_dummy i.fama_french_industry, vce(cluster firm_id) How do I interpret the coefficients for this regression? Should I multiply the interaction terms?
                  (1)
                  VARIABLES Duration
                  post 1.008***
                  (2.68)
                  return_on_assets 1.003
                  (0.95)
                  post ASU2011#return_on_assets 1.004
                  (1.18)
                  btm_dummy 1.046***
                  (18.42)
                  post #btm_dummy 0.971***
                  (-11.07)
                  Observations N
                  Industry FE YES

                  Comment


                  • #10
                    In principle, yes, you multiply hazard ratios in interactions. But you need to select the right terms to multiply. Also, getting the standard errors of the products is not easy. So I recommend using the -margins- command instead. It takes a bit of time to learn to use it, but it's an enormous time-saver and prevents lots of errors.

                    I think the simplest, clearest introduction to -margins- is the excellent Richard Williams' https://www3.nd.edu/~rwilliam/stats/Margins01.pdf. It covers interactions. It doesn't have any hazard ratio examples--everything in it is framed additively, not multiplicatively. But -margins- doesn't really care about that because after a Cox proportional hazards model, it knows that it is in a multiplicative context and proceeds accordingly.
                    Last edited by Clyde Schechter; 29 Dec 2024, 21:24.

                    Comment

                    Working...
                    X