Announcement

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

  • Compare coefficients using reghdfe

    Hi,

    For an analysis, I want to compare the coefficients between the deciles. I use a fixed effect regression with the "reghdfe" command in stata. My fixed effect are dum_date and dum_firm and I have arranged the deciles in column decile_10. The code I use for my regression is:

    Code:
    reghdfe RETX_sd_21days Robinhood E_vol Asset_growth Long_term_debt Size, absorb(dum_date dum_TICKER) vce(cluster dum_date dum_TICKER)
    The code above is for the overall regression and I used to following code for a regression for decile 1 (as an example):

    Code:
    reghdfe deciles_RETX_sd_21days deciles_Robinhood deciles_E_vol deciles_Asset_growth deciles_Long_term_debt deciles_Size if decile_10 ==10, absorb(dum_date dum_TICKER) vce(cluster dum_date dum_TICKER)
    I know I cannot use the suest code since it does not work with the "reghdfe" command. Furthermore, I saw on statelist some forms who talked about using the interaction effect in order to compare the coefficients, however, I am not quite there yet.

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input long date str9 TICKER float Robin_user double RETX_sd_21days float(decile_10 E_vol Asset_growth Long_term_debt Size)
    21306 "A"       590  .024704669955529814 8 .004914847 .04267474 .2168521 10.130047
    21307 "A"  586.4737   .02496701844494897 8 .004914847 .04267474 .2168521 10.130047
    21308 "A"  587.4583  .025027515252421216 8 .004914847 .04267474 .2168521 10.130047
    21311 "A"     585.9   .02490161882111235 8 .004914847 .04267474 .2168521 10.130047
    21312 "A"   577.125  .025622605385144024 8 .004914847 .04267474 .2168521 10.130047
    21313 "A"  581.2083  .025625072442753808 8 .004914847 .04267474 .2168521 10.130047
    21314 "A"  583.0417  .025548991795362092 8 .004914847 .04267474 .2168521 10.130047
    21315 "A"   595.625   .02545921972439692 8 .004914847 .04267474 .2168521 10.130047
    21318 "A"  661.9167  .025375674797751033 8 .004914847 .04267474 .2168521 10.130047
    21319 "A"  910.1667  .025373823067314984 8 .004914847 .04267474 .2168521 10.130047
    21320 "A" 1186.4584  .012971544203729387 8 .004914847 .04267474 .2168521 10.130047
    21321 "A" 1225.4375  .012755792037015906 8 .004914847 .04267474 .2168521 10.130047
    21322 "A" 1146.5294  .012332868317013777 8 .004914847 .04267474 .2168521 10.130047
    21325 "A" 1082.5834  .013091860825230424 8 .004914847 .04267474 .2168521 10.130047
    21326 "A" 1001.3333  .012486383993162544 8 .004914847 .04267474 .2168521 10.130047
    21327 "A"  939.4583   .01237881906090757 8 .004914847 .04267474 .2168521 10.130047
    21328 "A"  921.7059   .01236852128382127 8 .004914847 .04267474 .2168521 10.130047
    21329 "A"   905.875  .013410349475215385 8 .004914847 .04267474 .2168521 10.130047
    21333 "A"       904  .013439015279697474 8 .004914847 .04267474 .2168521 10.130047
    21334 "A"     909.6  .013001905520743713 8 .004914847 .04267474 .2168521 10.130047
    21335 "A"  905.8333  .012621857295848906 8 .004914847 .04267474 .2168521 10.130047
    21336 "A"  895.2083  .012523655122617675 8 .004914847 .04267474 .2168521 10.130047
    21339 "A"  882.4583  .012168525698544297 8 .004914847 .04267474 .2168521 10.130047
    21340 "A"  875.1667  .011937756780267936 8 .004914847 .04267474 .2168521 10.130047
    21341 "A"  862.0833  .012134404918243163 8 .004914847 .04267474 .2168521 10.130047
    21342 "A"  828.2083   .01061856243625401 8 .004914847 .04267474 .2168521 10.130047
    21343 "A"   813.375  .011131506125058354 8 .004914847 .04267474 .2168521 10.130047
    21346 "A"  796.7826  .011176947470294222 8 .004914847 .04267474 .2168521 10.130047
    21347 "A"  779.7083  .011295382294606197 8 .004914847 .04267474 .2168521 10.130047
    21348 "A"  776.0417   .01153289893858018 8 .004914847 .04267474 .2168521 10.130047
    21349 "A"  767.9583   .01153200235438123 8 .004914847 .04267474 .2168521 10.130047
    21350 "A"       758  .011653067059779672 8 .004914847 .04267474 .2168521 10.130047
    21353 "A"  750.4583  .011772842312328433 8 .004914847 .04267474 .2168521 10.130047
    21354 "A"  750.5833  .011237425044435619 8 .004914847 .04267474 .2168521 10.130047
    21355 "A"   752.625  .010960555351483168 8 .004914847 .04267474 .2168521 10.130047
    21356 "A"  752.2917  .010684257958031636 8 .004914847 .04267474 .2168521 10.130047
    21357 "A"  747.2917  .010676820606914777 8 .004914847 .04267474 .2168521 10.130047
    21360 "A"  742.2174  .011185137263403989 8 .004914847 .04267474 .2168521 10.130047
    21361 "A"   739.375   .00990601093982708 8 .004914847 .04267474 .2168521 10.130047
    21362 "A"   739.125  .009871991730532175 8 .004914847 .04267474 .2168521 10.130047
    21363 "A"    765.25  .010000063895312309 8 .004914847 .04267474 .2168521 10.130047
    21364 "A"  817.6667  .010961502868554667 8 .004914847 .04267474 .2168521 10.130047
    21367 "A"    838.25  .011670944449788922 8 .004914847 .04267474 .2168521 10.130047
    21368 "A"    840.75  .012258936231664424 8 .004914847 .04267474 .2168521 10.130047
    21370 "A"   834.375  .012179594288376101 8 .004914847 .04267474 .2168521 10.130047
    21371 "A"   826.625  .012135405427447432 8 .004914847 .04267474 .2168521 10.130047
    21374 "A"  819.0417   .01224513724268452 8 .004914847 .04267474 .2168521 10.130047
    21375 "A"   811.375  .012438193392232616 8 .004914847 .04267474 .2168521 10.130047
    21376 "A"  807.8333  .012479095720895696 8 .004914847 .04267474 .2168521 10.130047
    21377 "A"  800.7083   .01233595111914223 8 .004914847 .04267474 .2168521 10.130047
    21378 "A"  791.2917  .012402939763123942 8 .004914847 .04267474 .2168521 10.130047
    21381 "A"  791.3333  .012478065908349892 8 .004914847 .04267474 .2168521 10.130047
    21382 "A"   785.875   .01233477422095114 8 .004914847 .04267474 .2168521 10.130047
    21383 "A"    777.25  .014297394053910848 8 .004914847 .04267474 .2168521 10.130047
    21384 "A"    769.75  .014469021234493664 8 .004914847 .04267474 .2168521 10.130047
    21385 "A"  761.0833  .014297753285104114 8 .004914847 .04267474 .2168521 10.130047
    21388 "A"       757  .014271448963207489 8 .004914847 .04267474 .2168521 10.130047
    21389 "A"  752.3333   .01432832617966895 8 .004914847 .04267474 .2168521 10.130047
    21390 "A"  741.7083  .014065552309581333 8 .004914847 .04267474 .2168521 10.130047
    21391 "A"   733.087  .013494042048833756 8 .004914847 .04267474 .2168521 10.130047
    21392 "A"  725.1667  .013254176921549187 8 .004914847 .04267474 .2168521 10.130047
    21395 "A"   719.625  .012833193685748324 8 .004914847 .04267474 .2168521 10.130047
    21396 "A"   712.625  .012327518573474392 8 .004914847 .04267474 .2168521 10.130047
    21397 "A"  712.2083  .011458601390482364 8 .004914847 .04267474 .2168521 10.130047
    21398 "A"  713.2917  .010802028275263269 8 .004914847 .04267474 .2168521 10.130047
    21399 "A"  715.1667  .010794200241529796 8 .004914847 .04267474 .2168521 10.130047
    21402 "A"  714.2917  .010796396703504855 8 .004914847 .04267474 .2168521 10.130047
    21403 "A"  707.1667  .010575760454405767 8 .004914847 .04267474 .2168521 10.130047
    21404 "A"  699.7826  .009939910726452516 8 .004914847 .04267474 .2168521 10.130047
    21406 "A"    723.92  .009743962426818655 8 .004914847 .04267474 .2168521 10.130047
    21409 "A"  760.5833  .009681166005387647 8 .004914847 .04267474 .2168521 10.130047
    21410 "A"  794.2083  .009610244348013781 8 .004914847 .04267474 .2168521 10.130047
    21411 "A"  843.9583  .010259044237580056 8 .004914847 .04267474 .2168521 10.130047
    21412 "A"     789.5  .007498114760397694 8 .004914847 .04267474 .2168521 10.130047
    21413 "A"   765.875  .007215992326041391 8 .004914847 .04267474 .2168521 10.130047
    21416 "A"  754.4583 .0064096497229258935 8 .004914847 .04267474 .2168521 10.130047
    21417 "A"   752.375  .006385461347471412 8 .004914847 .04267474 .2168521 10.130047
    21418 "A"  743.0833 .0075833596737493285 8 .004914847 .04267474 .2168521 10.130047
    21419 "A"  732.4167   .00772817923294989 8 .004914847 .04267474 .2168521 10.130047
    21420 "A"  719.6667   .00833255412334665 8 .004914847 .04267474 .2168521 10.130047
    21423 "A"   714.625    .0083555016791896 8 .004914847 .04267474 .2168521 10.130047
    21424 "A"  713.1667   .00839080976977848 8 .004914847 .04267474 .2168521 10.130047
    21425 "A"   708.625  .008314352829244233 8 .004914847 .04267474 .2168521 10.130047
    21426 "A"  708.3043  .008421647941021607 8 .004914847 .04267474 .2168521 10.130047
    21427 "A"     706.5  .008586653345913646 8 .004914847 .04267474 .2168521 10.130047
    21431 "A"  699.0833   .00860877523068432 8 .004914847 .04267474 .2168521 10.130047
    21432 "A"  695.5833  .008487650903677098 8 .004914847 .04267474 .2168521 10.130047
    21433 "A"   691.375  .009804726534148074 8 .004914847 .04267474 .2168521 10.130047
    21434 "A"       691  .009911790257500516 8 .004914847 .04267474 .2168521 10.130047
    21437 "A"  691.4167  .010337012160953424 8 .004914847 .04267474 .2168521 10.130047
    21438 "A"    692.25  .010248501746247796 8 .004914847 .04267474 .2168521 10.130047
    21439 "A"  688.3333  .013519025713368245 8 .004914847 .04267474 .2168521 10.130047
    21440 "A"  683.0435   .01460767195318382 8 .004914847 .04267474 .2168521 10.130047
    21441 "A"     678.5  .014599385812976824 8 .004914847 .04267474 .2168521 10.130047
    21444 "A"     682.5  .014645848949743344 8 .004914847 .04267474 .2168521 10.130047
    21445 "A"    689.25  .016022547768937433 8 .004914847 .04267474 .2168521 10.130047
    21446 "A"   687.875   .01603286970705724 8 .004914847 .04267474 .2168521 10.130047
    21447 "A"  688.2174  .016449046264918842 8 .004914847 .04267474 .2168521 10.130047
    21448 "A"  687.2609  .015783693242935083 8 .004914847 .04267474 .2168521 10.130047
    21451 "A"   688.875  .015784839472585386 8 .004914847 .04267474 .2168521 10.130047
    end
    format %tdCCYY-NN-DD date

    I would appreciate your help!

    Kind regards,
    Fabien Keyzer


  • #2
    Fabien:
    your data excerpt does not mirror your code as some variablea are missing (e.g,, -Robinhood-; -dum_date-; -dum_TICKER-).
    Please help interested listers to help you out. Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo,

      Many thanks for your reply. I see indeed that I did not copy all the columns. I copied the code in the same order as my original post:

      The code I use for my regression is:

      Code:
      reghdfe RETX_sd_21days Robinhood E_vol Asset_growth Long_term_debt Size, absorb(dum_date dum_TICKER) vce(cluster dum_date dum_TICKER)
      I used to following code for a regression for decile 1 (as an example):
      Code:
      reghdfe RETX_sd_21days Robinhood E_vol Asset_growth Long_term_debt Size if decile_10==1, absorb(dum_date dum_TICKER) vce(cluster dum_date dum_TICKER)
      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input long date str9 TICKER float Robin_user double RETX_sd_21days float(decile_10 E_vol Asset_growth Long_term_debt Size dum_date dum_TICKER)
      21306 "A"       590  .024704669955529814 8 .004914847 .04267474 .2168521 10.130047   1 1
      21307 "A"  586.4737   .02496701844494897 8 .004914847 .04267474 .2168521 10.130047   2 1
      21308 "A"  587.4583  .025027515252421216 8 .004914847 .04267474 .2168521 10.130047   3 1
      21311 "A"     585.9   .02490161882111235 8 .004914847 .04267474 .2168521 10.130047   4 1
      21312 "A"   577.125  .025622605385144024 8 .004914847 .04267474 .2168521 10.130047   5 1
      21313 "A"  581.2083  .025625072442753808 8 .004914847 .04267474 .2168521 10.130047   6 1
      21314 "A"  583.0417  .025548991795362092 8 .004914847 .04267474 .2168521 10.130047   7 1
      21315 "A"   595.625   .02545921972439692 8 .004914847 .04267474 .2168521 10.130047   8 1
      21318 "A"  661.9167  .025375674797751033 8 .004914847 .04267474 .2168521 10.130047   9 1
      21319 "A"  910.1667  .025373823067314984 8 .004914847 .04267474 .2168521 10.130047  10 1
      21320 "A" 1186.4584  .012971544203729387 8 .004914847 .04267474 .2168521 10.130047  11 1
      21321 "A" 1225.4375  .012755792037015906 8 .004914847 .04267474 .2168521 10.130047  12 1
      21322 "A" 1146.5294  .012332868317013777 8 .004914847 .04267474 .2168521 10.130047  13 1
      21325 "A" 1082.5834  .013091860825230424 8 .004914847 .04267474 .2168521 10.130047  14 1
      21326 "A" 1001.3333  .012486383993162544 8 .004914847 .04267474 .2168521 10.130047  15 1
      21327 "A"  939.4583   .01237881906090757 8 .004914847 .04267474 .2168521 10.130047  16 1
      21328 "A"  921.7059   .01236852128382127 8 .004914847 .04267474 .2168521 10.130047  17 1
      21329 "A"   905.875  .013410349475215385 8 .004914847 .04267474 .2168521 10.130047  18 1
      21333 "A"       904  .013439015279697474 8 .004914847 .04267474 .2168521 10.130047  19 1
      21334 "A"     909.6  .013001905520743713 8 .004914847 .04267474 .2168521 10.130047  20 1
      21335 "A"  905.8333  .012621857295848906 8 .004914847 .04267474 .2168521 10.130047  21 1
      21336 "A"  895.2083  .012523655122617675 8 .004914847 .04267474 .2168521 10.130047  22 1
      21339 "A"  882.4583  .012168525698544297 8 .004914847 .04267474 .2168521 10.130047  23 1
      21340 "A"  875.1667  .011937756780267936 8 .004914847 .04267474 .2168521 10.130047  24 1
      21341 "A"  862.0833  .012134404918243163 8 .004914847 .04267474 .2168521 10.130047  25 1
      21342 "A"  828.2083   .01061856243625401 8 .004914847 .04267474 .2168521 10.130047  26 1
      21343 "A"   813.375  .011131506125058354 8 .004914847 .04267474 .2168521 10.130047  27 1
      21346 "A"  796.7826  .011176947470294222 8 .004914847 .04267474 .2168521 10.130047  28 1
      21347 "A"  779.7083  .011295382294606197 8 .004914847 .04267474 .2168521 10.130047  29 1
      21348 "A"  776.0417   .01153289893858018 8 .004914847 .04267474 .2168521 10.130047  30 1
      21349 "A"  767.9583   .01153200235438123 8 .004914847 .04267474 .2168521 10.130047  31 1
      21350 "A"       758  .011653067059779672 8 .004914847 .04267474 .2168521 10.130047  32 1
      21353 "A"  750.4583  .011772842312328433 8 .004914847 .04267474 .2168521 10.130047  33 1
      21354 "A"  750.5833  .011237425044435619 8 .004914847 .04267474 .2168521 10.130047  34 1
      21355 "A"   752.625  .010960555351483168 8 .004914847 .04267474 .2168521 10.130047  35 1
      21356 "A"  752.2917  .010684257958031636 8 .004914847 .04267474 .2168521 10.130047  36 1
      21357 "A"  747.2917  .010676820606914777 8 .004914847 .04267474 .2168521 10.130047  37 1
      21360 "A"  742.2174  .011185137263403989 8 .004914847 .04267474 .2168521 10.130047  38 1
      21361 "A"   739.375   .00990601093982708 8 .004914847 .04267474 .2168521 10.130047  39 1
      21362 "A"   739.125  .009871991730532175 8 .004914847 .04267474 .2168521 10.130047  40 1
      21363 "A"    765.25  .010000063895312309 8 .004914847 .04267474 .2168521 10.130047  41 1
      21364 "A"  817.6667  .010961502868554667 8 .004914847 .04267474 .2168521 10.130047  42 1
      21367 "A"    838.25  .011670944449788922 8 .004914847 .04267474 .2168521 10.130047  43 1
      21368 "A"    840.75  .012258936231664424 8 .004914847 .04267474 .2168521 10.130047  44 1
      21370 "A"   834.375  .012179594288376101 8 .004914847 .04267474 .2168521 10.130047  45 1
      21371 "A"   826.625  .012135405427447432 8 .004914847 .04267474 .2168521 10.130047  46 1
      21374 "A"  819.0417   .01224513724268452 8 .004914847 .04267474 .2168521 10.130047  47 1
      21375 "A"   811.375  .012438193392232616 8 .004914847 .04267474 .2168521 10.130047  48 1
      21376 "A"  807.8333  .012479095720895696 8 .004914847 .04267474 .2168521 10.130047  49 1
      21377 "A"  800.7083   .01233595111914223 8 .004914847 .04267474 .2168521 10.130047  50 1
      21378 "A"  791.2917  .012402939763123942 8 .004914847 .04267474 .2168521 10.130047  51 1
      21381 "A"  791.3333  .012478065908349892 8 .004914847 .04267474 .2168521 10.130047  52 1
      21382 "A"   785.875   .01233477422095114 8 .004914847 .04267474 .2168521 10.130047  53 1
      21383 "A"    777.25  .014297394053910848 8 .004914847 .04267474 .2168521 10.130047  54 1
      21384 "A"    769.75  .014469021234493664 8 .004914847 .04267474 .2168521 10.130047  55 1
      21385 "A"  761.0833  .014297753285104114 8 .004914847 .04267474 .2168521 10.130047  56 1
      21388 "A"       757  .014271448963207489 8 .004914847 .04267474 .2168521 10.130047  57 1
      21389 "A"  752.3333   .01432832617966895 8 .004914847 .04267474 .2168521 10.130047  58 1
      21390 "A"  741.7083  .014065552309581333 8 .004914847 .04267474 .2168521 10.130047  59 1
      21391 "A"   733.087  .013494042048833756 8 .004914847 .04267474 .2168521 10.130047  60 1
      21392 "A"  725.1667  .013254176921549187 8 .004914847 .04267474 .2168521 10.130047  61 1
      21395 "A"   719.625  .012833193685748324 8 .004914847 .04267474 .2168521 10.130047  62 1
      21396 "A"   712.625  .012327518573474392 8 .004914847 .04267474 .2168521 10.130047  63 1
      21397 "A"  712.2083  .011458601390482364 8 .004914847 .04267474 .2168521 10.130047  64 1
      21398 "A"  713.2917  .010802028275263269 8 .004914847 .04267474 .2168521 10.130047  65 1
      21399 "A"  715.1667  .010794200241529796 8 .004914847 .04267474 .2168521 10.130047  66 1
      21402 "A"  714.2917  .010796396703504855 8 .004914847 .04267474 .2168521 10.130047  67 1
      21403 "A"  707.1667  .010575760454405767 8 .004914847 .04267474 .2168521 10.130047  68 1
      21404 "A"  699.7826  .009939910726452516 8 .004914847 .04267474 .2168521 10.130047  69 1
      21406 "A"    723.92  .009743962426818655 8 .004914847 .04267474 .2168521 10.130047  71 1
      21409 "A"  760.5833  .009681166005387647 8 .004914847 .04267474 .2168521 10.130047  72 1
      21410 "A"  794.2083  .009610244348013781 8 .004914847 .04267474 .2168521 10.130047  73 1
      21411 "A"  843.9583  .010259044237580056 8 .004914847 .04267474 .2168521 10.130047  74 1
      21412 "A"     789.5  .007498114760397694 8 .004914847 .04267474 .2168521 10.130047  75 1
      21413 "A"   765.875  .007215992326041391 8 .004914847 .04267474 .2168521 10.130047  76 1
      21416 "A"  754.4583 .0064096497229258935 8 .004914847 .04267474 .2168521 10.130047  77 1
      21417 "A"   752.375  .006385461347471412 8 .004914847 .04267474 .2168521 10.130047  78 1
      21418 "A"  743.0833 .0075833596737493285 8 .004914847 .04267474 .2168521 10.130047  79 1
      21419 "A"  732.4167   .00772817923294989 8 .004914847 .04267474 .2168521 10.130047  80 1
      21420 "A"  719.6667   .00833255412334665 8 .004914847 .04267474 .2168521 10.130047  81 1
      21423 "A"   714.625    .0083555016791896 8 .004914847 .04267474 .2168521 10.130047  82 1
      21424 "A"  713.1667   .00839080976977848 8 .004914847 .04267474 .2168521 10.130047  83 1
      21425 "A"   708.625  .008314352829244233 8 .004914847 .04267474 .2168521 10.130047  84 1
      21426 "A"  708.3043  .008421647941021607 8 .004914847 .04267474 .2168521 10.130047  85 1
      21427 "A"     706.5  .008586653345913646 8 .004914847 .04267474 .2168521 10.130047  86 1
      21431 "A"  699.0833   .00860877523068432 8 .004914847 .04267474 .2168521 10.130047  87 1
      21432 "A"  695.5833  .008487650903677098 8 .004914847 .04267474 .2168521 10.130047  88 1
      21433 "A"   691.375  .009804726534148074 8 .004914847 .04267474 .2168521 10.130047  89 1
      21434 "A"       691  .009911790257500516 8 .004914847 .04267474 .2168521 10.130047  90 1
      21437 "A"  691.4167  .010337012160953424 8 .004914847 .04267474 .2168521 10.130047  91 1
      21438 "A"    692.25  .010248501746247796 8 .004914847 .04267474 .2168521 10.130047  92 1
      21439 "A"  688.3333  .013519025713368245 8 .004914847 .04267474 .2168521 10.130047  93 1
      21440 "A"  683.0435   .01460767195318382 8 .004914847 .04267474 .2168521 10.130047  94 1
      21441 "A"     678.5  .014599385812976824 8 .004914847 .04267474 .2168521 10.130047  95 1
      21444 "A"     682.5  .014645848949743344 8 .004914847 .04267474 .2168521 10.130047  96 1
      21445 "A"    689.25  .016022547768937433 8 .004914847 .04267474 .2168521 10.130047  97 1
      21446 "A"   687.875   .01603286970705724 8 .004914847 .04267474 .2168521 10.130047  98 1
      21447 "A"  688.2174  .016449046264918842 8 .004914847 .04267474 .2168521 10.130047  99 1
      21448 "A"  687.2609  .015783693242935083 8 .004914847 .04267474 .2168521 10.130047 100 1
      21451 "A"   688.875  .015784839472585386 8 .004914847 .04267474 .2168521 10.130047 101 1
      end
      format %tdCCYY-NN-DD date
      Kind regards,
      Fabien Keyzer

      Comment


      • #4
        Fabien:
        unfortunately, your example still does not help.
        That said, you may want to consider somethng along the following lines:
        Code:
        . use "https://www.stata-press.com/data/r17/nlswork.dta"
        . reghdfe ln_wage (c.age##c.age i.union)##i.decile, abs(idcode year) vce(cluster idcode year)
        (dropped 673 singleton observations)
        (MWFE estimator converged in 8 iterations)
        Warning: VCV matrix was non-positive semi-definite; adjustment from Cameron, Gelbach & Miller applied.
        warning: missing F statistic; dropped variables due to collinearity or too few clusters
        
        HDFE Linear regression                            Number of obs   =     18,337
        Absorbing 2 HDFE groups                           F(  39,     11) =          .
        Statistics robust to heteroskedasticity           Prob > F        =          .
                                                          R-squared       =     0.7590
                                                          Adj R-squared   =     0.7020
        Number of clusters (idcode)  =      3,461         Within R-sq.    =     0.0690
        Number of clusters (year)    =         12         Root MSE        =     0.2532
        
                                         (Std. err. adjusted for 12 clusters in idcode year)
        ------------------------------------------------------------------------------------
                           |               Robust
                   ln_wage | Coefficient  std. err.      t    P>|t|     [95% conf. interval]
        -------------------+----------------------------------------------------------------
                       age |   .0732311   .0226104     3.24   0.008      .023466    .1229962
                           |
               c.age#c.age |  -.0006522   .0002922    -2.23   0.047    -.0012952   -9.12e-06
                           |
                   1.union |   .1527108   .0432455     3.53   0.005     .0575282    .2478934
                           |
                    decile |
                        2  |  -.2888482   .3014105    -0.96   0.358    -.9522483    .3745518
                        3  |   -.047352   .3144961    -0.15   0.883    -.7395531    .6448492
                        4  |  -.1059397   .3163015    -0.33   0.744    -.8021146    .5902352
                        5  |   .0752988   .2616737     0.29   0.779    -.5006411    .6512388
                        6  |   .1005899   .3344964     0.30   0.769    -.6356318    .8368116
                        7  |   .3145102   .3396737     0.93   0.374    -.4331065    1.062127
                        8  |   .2879666   .3765782     0.76   0.461    -.5408765     1.11681
                        9  |  -.0990946   .4398687    -0.23   0.826    -1.067239    .8690497
                       10  |  -.2073338   .3283412    -0.63   0.541     -.930008    .5153404
                           |
              decile#c.age |
                        2  |   .0262718   .0198266     1.33   0.212    -.0173662    .0699099
                        3  |   .0118005   .0208048     0.57   0.582    -.0339905    .0575915
                        4  |   .0211978    .021024     1.01   0.335    -.0250758    .0674713
                        5  |   .0051115   .0169874     0.30   0.769    -.0322776    .0425005
                        6  |   .0057903   .0215197     0.27   0.793    -.0415743    .0531548
                        7  |  -.0072426   .0215746    -0.34   0.743    -.0547281    .0402428
                        8  |  -.0034584    .023031    -0.15   0.883    -.0541492    .0472325
                        9  |   .0197678   .0270442     0.73   0.480    -.0397561    .0792917
                       10  |   .0231888   .0206567     1.12   0.286    -.0222762    .0686538
                           |
        decile#c.age#c.age |
                        2  |   -.000511   .0003191    -1.60   0.138    -.0012133    .0001912
                        3  |  -.0002987   .0003406    -0.88   0.399    -.0010484    .0004509
                        4  |  -.0004924   .0003429    -1.44   0.179    -.0012471    .0002623
                        5  |  -.0001562   .0002728    -0.57   0.578    -.0007568    .0004443
                        6  |  -.0001716   .0003461    -0.50   0.630    -.0009333    .0005902
                        7  |   .0000318   .0003381     0.09   0.927    -.0007124     .000776
                        8  |  -.0000113   .0003515    -0.03   0.975    -.0007849    .0007623
                        9  |  -.0003226   .0004121    -0.78   0.450    -.0012295    .0005844
                       10  |   -.000305   .0003246    -0.94   0.368    -.0010194    .0004094
                           |
              union#decile |
                     1  2  |  -.0192671    .041096    -0.47   0.648    -.1097189    .0711847
                     1  3  |  -.0501326   .0495376    -1.01   0.333    -.1591642     .058899
                     1  4  |  -.0538911   .0527313    -1.02   0.329    -.1699519    .0621698
                     1  5  |  -.0675458   .0475679    -1.42   0.183     -.172242    .0371505
                     1  6  |   -.046184   .0417019    -1.11   0.292    -.1379693    .0456012
                     1  7  |  -.0350214   .0482874    -0.73   0.483    -.1413012    .0712584
                     1  8  |  -.0647151   .0398501    -1.62   0.133    -.1524246    .0229945
                     1  9  |  -.0839549   .0393673    -2.13   0.056    -.1706017     .002692
                     1 10  |   -.092658   .0372371    -2.49   0.030    -.1746163   -.0106997
                           |
                     _cons |  -.0153581   .5071987    -0.03   0.976    -1.131695    1.100979
        ------------------------------------------------------------------------------------
        
        Absorbed degrees of freedom:
        -----------------------------------------------------+
         Absorbed FE | Categories  - Redundant  = Num. Coefs |
        -------------+---------------------------------------|
              idcode |      3461        3461           0    *|
                year |        12          12           0    *|
        -----------------------------------------------------+
        * = FE nested within cluster; treated as redundant for DoF computation
        
        . mat list e(b)
        
        e(b)[1,55]
                                                                                                                                               
                             c.age#         0b.          1.         1b.          2.          3.          4.          5.          6.          7.
                   age       c.age       union       union      decile      decile      decile      decile      decile      decile      decile
        y1   .07323107  -.00065218           0   .15271083           0  -.28884824  -.04735198  -.10593971   .07529883   .10058992   .31451015
        
                                                                                                                                               
                     8.          9.         10.  1b.decile#   2.decile#   3.decile#   4.decile#   5.decile#   6.decile#   7.decile#   8.decile#
                decile      decile      decile      co.age       c.age       c.age       c.age       c.age       c.age       c.age       c.age
        y1   .28796656  -.09909463  -.20733382           0   .02627181   .01180051   .02119776   .00511145   .00579028  -.00724265  -.00345836
        
                                     1b.decile#   2.decile#   3.decile#   4.decile#   5.decile#   6.decile#   7.decile#   8.decile#   9.decile#
              9.decile#  10.decile#     co.age#      c.age#      c.age#      c.age#      c.age#      c.age#      c.age#      c.age#      c.age#
                 c.age       c.age      co.age       c.age       c.age       c.age       c.age       c.age       c.age       c.age       c.age
        y1   .01976777   .02318879           0  -.00051104  -.00029873  -.00049237  -.00015624  -.00017156   .00003184  -.00001131  -.00032257
        
             10.decile#                                                                                                                        
                 c.age#   0b.union#   0b.union#   0b.union#   0b.union#   0b.union#   0b.union#   0b.union#   0b.union#   0b.union#   0b.union#
                 c.age   1b.decile   2o.decile   3o.decile   4o.decile   5o.decile   6o.decile   7o.decile   8o.decile   9o.decile  10o.decile
        y1  -.00030503           0           0           0           0           0           0           0           0           0           0
        
                                                                                                                                               
              1o.union#    1.union#    1.union#    1.union#    1.union#    1.union#    1.union#    1.union#    1.union#    1.union#            
             1b.decile    2.decile    3.decile    4.decile    5.decile    6.decile    7.decile    8.decile    9.decile   10.decile       _cons
        y1           0  -.01926711  -.05013261  -.05389109  -.06754575  -.04618401  -.03502141  -.06471506  -.08395488  -.09265798  -.01535811
        
        . test 1.union#2.decile 1.union#3.decile
        
         ( 1)  1.union#2.decile = 0
         ( 2)  1.union#3.decile = 0
        
               F(  2,    11) =    0.52
                    Prob > F =    0.6068
        
        .
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Hi Carlo,

          Thanks for your reply. I made this post a bit of a mess so I will open another one which is provided with more detailed information.

          for everyone interested in the other post: https://www.statalist.org/forums/for...fe#post1668509

          Fabien Keyzer

          Comment


          • #6
            For anyone following this thread, the link in #5 is incorrect--it just takes you back to this page. The correct link is https://www.statalist.org/forums/for...-using-reghdfe.

            Comment

            Working...
            X