Announcement

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

  • Controlling for firm level initial characteristics

    Hi everyone!

    I am working on a project which is similar to the following two papers:
    • Chaney, T., Sraer, D., & Thesmar, D. (2012). The collateral channel: How real estate shocks affect corporate investment. American Economic Review, 102(6), 2381-2409.
    • Cvijanović, D. (2014). Real estate prices and firm capital structure. The Review of Financial Studies, 27(9), 2690-2735
    In their papers they control for firm-level initial characteristics on five different quantiles of age roa and log assets plus firm fixed effects and area fixed effects (see attached screenshots table 5 init controls x state res prices). I want to do this to my data as well however I am not sure how to do this. My first instict was to use the code:

    Egen intialcontr = group(age, roa, assets) followed by a reghdfe regression with the fixed effects added in absorb.

    however when I do this a lot of my data goes missing and I end up with to few observations.
    Best Rick

    I hope you can help me.
    Click image for larger version

Name:	Screenshot 2022-08-02 at 20.30.44.png
Views:	1
Size:	208.1 KB
ID:	1676200

    Click image for larger version

Name:	Screenshot 2022-08-02 at 20.30.52.png
Views:	1
Size:	321.1 KB
ID:	1676201

    Last edited by Rick Verhagen; 02 Aug 2022, 12:40.

  • #2
    Hi Rick,

    First, I should point out that it is always appreciated when you provide sample data with -dataex- and when you surround your code with code blocks. I'm afraid some of the most experienced posters may even ignore your questions if you don't follow these basic posting guidelines.

    Next, Perhaps you can help me better understand what you are asking. I'm a little confused as to what kind of result you are looking for with your intialcontr variable. Do you want to combine these three variables into some kind of index? Are these variables already organized into quintiles? Assuming these are continuous quantitative variables, I'm not sure how this line will produce quintiles. From Table 4, it almost looks like the author's convert each variable into a categorical quintile variable, and they use the first quintile as the reference category, but its not totally clear to me based on what you've posted.

    however when I do this a lot of my data goes missing and I end up with to few observations.
    This is almost always because in general when you combine variables or include variables together in a regression, any single missing value for any variable means that the entire observation gets thrown out. That is, Stata will implicitly preform listwise deletion when it calculates regression coefficients. So either one of your variables is mostly missing, in which case you may need to throw out that variable, or most observations have at least one missing value, in which case you might want to use multiple imputation with chained equations (MICE) first.

    Note that you can get the group() function to treat missing values as just another value if you want. That might be a Band-Aid for your missing value problem, but I am not remotely sure this is a good idea since I have no idea why you would use group() to create intialcontr in the first place. Could you say a little bit more about your motivations for this?

    Code:
    clear
    input int age roa assets
    0 0 0
    0 0 1
    0 1 0
    1 0 0
    0 1 1
    1 0 1
    1 1 0
    . 0 0
    1 . 0
    . . 1
    . . .
    end
    
    egen intialcontr = group(age roa assets)
    egen withmissing_initialcontr = group(age roa assets), missing
    count if missing(age) | missing(roa) | missing(assets)
    count if missing(intialcontr)
    list, clean noobs
    Code:
    . count if missing(age) | missing(roa) | missing(assets)
      4
    
    . count if missing(intialcontr)
      4
    
    . count if missing(withmissing_initialcontr)
      0
    
    . list, clean noobs
    
        age   roa   assets   intial~r   withmi~r  
          0     0        0          1          1  
          0     0        1          2          2  
          0     1        0          3          3  
          1     0        0          5          5  
          0     1        1          4          4  
          1     0        1          6          6  
          1     1        0          7          7  
          .     0        0          .          9  
          1     .        0          .          8  
          .     .        1          .         10  
          .     .        .          .         11
    Last edited by Daniel Schaefer; 02 Aug 2022, 14:33.

    Comment


    • #3
      Hi daniel,

      Thanks for your response. It is not exactly clear whether they make an index (I do think so), but in the first table (table 4) they regress the different quantiles of the three variables to see if they can explain why a firm would own real estate assets. They do this for different quantiles, since it now showcases that for instance older firms (firms in the fitfh quantile) are more likely to own real estate, the same holds for the other variables. By controlling for the above stated firm characteristics in the main regression table 5 it is possible to ensure that the changes in a firm’s capital expenditure in response to appreciating real estate values come solely through the collateral channel and not through the interaction of a firm deciding to own real estate assets and local price appreciation. I hope this clarifies things. I attached a part of my sample below Indexstate resembles the state res. prices from the paper.

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input long gvkey byte REOwner float(logassets roa) byte age float(REValuePPEstate Indexstate marketbook)
      1004 1  6.036978    .05225728 28 1.4381057 2.1458457  6.975207
      1004 1  6.056348    .05739126 29  1.524196 2.2228143  7.524646
      1004 1  6.084148    .07409454 30  1.542962 2.3246496 10.803068
      1004 1  6.273978     .0809881 31  1.639412 2.3929346 16.191557
      1004 1  6.509602    .09651052 32  1.301988  2.464575  12.35772
      1004 1  6.589793    .10649299 33 1.1410441  2.518255 9.3512745
      1004 1  6.609346    .09535518 34  .9418536  2.607855  6.823545
      1004 1  6.555149   .065241486 35  .9518877  2.787448  7.223079
      1004 1  6.566952   .006633352 36 1.0141559  2.940201  5.517399
      1004 1  6.533238   .005203744 37 1.1292728  3.084073 2.4707634
      1004 1  6.565676   .029340526 38  .7189996 3.1918294 4.6244884
      1004 1  6.597459    .04619314 39  .7758733  3.431419  7.440136
      1004 1  6.887368   .064010814 40 1.0096625 3.7396884 10.941523
      1004 1  6.974135    .08121517 41  .6952953  3.949477 15.544824
      1004 1  7.217451    .09439725 42  .5776661  4.000789  8.834341
      1004 1  7.228759     .0911274 43  .4695502   3.87981  7.503903
      1004 1  7.314581    .06356584 44 .54455453  3.560095 10.266768
      1004 1   7.44116    .08042134 45  .3746399  3.335307 13.398572
      1004 1   7.69469     .0648372 46 .28427383  3.161437  5.298705
      1004 1  7.667579    .06392438 47 .25321034  3.073811  9.128745
      1004 1   7.69644    .06483292 48 .27138785  3.080521 11.514276
      1004 1  7.323831  -.005676568 49  .2905013  3.196171  16.85119
      1004 1  7.274549    .04583593 50  .4187083  3.288139  15.03098
      1004 1  7.316615    .05132638 51  .4045982  3.380896  21.60418
      1004 1  7.330209    .05640454 52  .3604494  3.468719  27.81921
      1004 1  7.325281    .07296336 53  .4211454 3.5494375 18.369253
      1004 1  7.640123    .05117845 54 .39189515   3.63884  9.322676
      1004 1  7.339992    .04254076 55  .3155426  3.671601  26.78249
      1010 .  7.418734    .05173835 34         .         .  .6163281
      1010 .  7.504447    .04021817 35         .         .  .6146769
      1010 .  7.609267    .04444885 36         .         .  .6322056
      1010 .  7.705082     .0507978 37         .         .  .6099342
      1010 .  8.065359    .03954358 38         .         .   .680728
      1010 .  8.088961    .04301108 39         .         .  .6553587
      1010 .  8.178751     .0370994 40         .         .  .6483696
      1010 .  8.241571     .0308341 41         .         .  .6396099
      1010 .  8.222581    .02959899 42         .         .  .6349816
      1010 .  8.217033   .023929777 43         .         .  .6576638
      1010 .  8.483243  -.012810165 44         .         .  .6415016
      1013 0  5.638547     .1901312 19         0         1  28.92332
      1013 0   5.81617    .19235757 20         0 1.0340276 34.414318
      1013 0  6.400395     .1401437 21         0 1.0956675  34.14437
      1013 0  6.646085     .1732441 22         0 1.1410376 34.414318
      1013 0  6.843007    .20117846 23         0  1.197936  26.76013
      1013 0   7.17134      .173434 24         0   1.25344 16.467037
      1013 0   7.42269      .186334 25         0 1.3451097 34.414318
      1013 0    8.2869    .13194811 26         0 1.5059502 15.946798
      1013 0  7.824326   -.10137217 27         0 1.6419673  3.688951
      1013 0  7.043334    -.2596574 28         0 1.7688732 1.3711554
      1013 0  7.168503   -.03030303 29         0 1.8500372 1.7598805
      1013 0    7.2648   .025558434 30         0 2.0081816 1.5586114
      1013 0  7.336937    .05980456 31         0 2.1712532  9.293587
      1013 0  7.385479    .04505399 32         0  2.230476   8.19721
      1013 0  7.476359    .05706029 33         0 2.2131834  11.08172
      1013 0  7.561121     .0473191 34         0 2.1154704  3.512716
      1013 0  7.203852   .013620125 35         0 1.9856824 2.9242394
      1013 0  7.296752    .04062394 36         0 1.8652844 4.3848977
      1025 0  1.989517  .0090304185 20         0         1  .6598542
      1025 0  1.998367    -.0845225 21         0  .9824421  .6749255
      1025 0  1.928328    .04814563 22         0  .9805357  .6609391
      1034 1   6.05021    .04944211 10 1.1906357  1.884831  6.622591
      1034 1  6.385731   .026975375 11 1.0625646  1.889082  6.845283
      1034 1  6.454967    .08241593 12  .6191444 1.8925604  9.071849
      1034 1  6.420658    .03703903 13  .6026042 1.9261836  5.083651
      1034 1  6.450259    .07422143 14  .6199968 1.9596134  8.789555
      1034 1  6.813374    .07546846 15  .6743807 2.0274396 11.054794
      1034 1  7.057266    .08405572 16  .5769491 2.1219325  9.993577
      1034 1  7.384881    .07805158 17  .6363757 2.3431883  23.55524
      1034 1   7.77947   .035978958 18  .4927517  2.561353 10.452468
      1034 1  7.739761    .06212613 19  .3899083  2.832464  5.741734
      1034 1  7.753738    .04531338 20  .4199083  3.050821  10.27179
      1034 1  7.603321    .03324264 21  .4793218  3.477295  8.016224
      1034 1  7.392883    .05913269 22  .5852218  4.031691  16.54646
      1034 1  6.833289     .1035774 23 1.3500233  4.376232 19.006676
      1034 1   7.16175  -.004286718 24 1.2424273 4.3694687 11.847775
      1036 1  7.179755    .06024305 15 1.2013367 1.5507226  6.666392
      1036 1  7.215502    .08893697 16  .8973545 1.6117665  8.029325
      1036 1  7.304093    .09769068 17  .9908693  1.703185   9.57917
      1036 1  7.389728    .09795738 18  .8621863  1.770864  12.41905
      1036 1  7.484114    .08128658 19  .8401492  1.853288 13.083912
      1036 1  7.656488    .08132134 20  .8424301 1.9209673  9.226307
      1036 1   7.71538    .08919487 21    .82244 1.9876143  8.766058
      1036 1  7.752068    .08695106 22  .7656179  2.078738  5.434704
      1037 0 1.3056265    .22581844 14         0         1 1.2152417
      1037 0  1.644998    .21502033 15         0 1.0024024  .9437934
      1037 0 2.0061986   -.12789433 16         0 1.0123967   .891453
      1037 0 1.7865794    -.3702958 17         0 1.0292139 1.0399476
      1037 0   1.86408     .1840367 18         0 1.0434365  .9591765
      1037 0  1.441729    -.6386864 19         0 1.0718817 1.5639405
      1037 0 1.7182924    -.2251366 20         0  1.098693  .7281084
      1037 0 1.9978247     .2058685 21         0 1.1492409  .9849522
      1037 0 2.9374144    .06369284 22         0 1.2165097  .8152034
      1038 1   6.21915     .1211628 11  .6506897  1.369551  3.452678
      1038 1  6.259876    .09772787 12  .5974897 1.4197286 4.1853642
      1038 1  6.183031    .14575827 13 .57015604 1.4996707  8.514274
      1038 1  6.578157     .0840642 14   .465531 1.5551167  5.322513
      1038 1  6.680579    .04622383 15  .3172268 1.6188595  4.974193
      1038 1   6.88421    .01364107 16  .3162713 1.6707493  2.701095
      1038 1  7.081545 -.0015225373 17 .25546598 1.7429212 1.2004894
      1038 1  6.954891 -.0023279707 18  .2400105  1.854603  .6572081
      end
      Last edited by Rick Verhagen; 02 Aug 2022, 15:10.

      Comment


      • #4
        Hi Rick,

        It doesn't look like the data you've provided is organized into longitudinal data with observations for multiple firm/years. There is a clue that multiple years may be present - I take it gvkey is the firm identifier and it is not unique - but there is no 'year' column. I went ahead and read through the paper. My guess is that they do not create a single variable to summarize their initial controls (as you appear to be trying to do with group()). Instead, they just interact each control variable with the indicated variable one by one in their model and they write the table the way they do to make it fit the page better at the cost of not reporting the coefficients for the control variables. So I think you want something like this:

        Code:
         regress REOwner [...] c.age##c.StateRes c.roa##c.StateRes c.assets##c.StateRes
        Just use whichever regression command is most appropriate for your data. You could always reach out to the first author if you need any more clarification.

        Comment

        Working...
        X