Announcement

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

  • Store beta coefficient for each firm-year observation

    Hello everyone,

    I am new to this forum and grateful for any help. I am trying to save beta coefficients for each firm-year observation using the following code:
    Code:
    statsby , by (GlobalCompanyKey FiscalYear) : regress ROA l.ROA Leverage
    However, I get 2 new variables, namely beta_laggedROA and beta_Leverage, containing all missing values.

    Is there something wrong with my code?
    Please tell me if there is any possible way to get the beta coefficients for each firm-year observation.

    Here is the example of my data:
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input long GlobalCompanyKey int FiscalYear float(ROA Leverage)
    1004 1989    .06603247  1.0497235
    1004 1990    .03895431   .9607902
    1004 1991    .02534457  1.0095407
    1004 1993    .02273326  1.2039707
    1004 1994    .02457176  1.1601875
    1004 1995   .036569934  1.1396438
    1004 1996    .04347752   .9668201
    1004 1997    .05317504  1.2288815
    1004 1998    .05734831   1.228687
    1004 1999    .04745357  1.1825192
    1004 2000    .02640293  1.0629902
    1004 2004   .021104025  1.3264303
    1004 2005   .035923906   1.315542
    1010 1989    .15727852    5.12465
    1010 1991    .08937106   4.067188
    1010 1993    .06737955  4.0140133
    1010 1994   .013883533  3.5789874
    1010 1995    .04181962  3.2464075
    1010 1996    .04164788   2.865455
    1010 1997   .068022504  3.3659716
    1010 1998   .020630583  3.0400996
    1010 1999   .021692766    2.93682
    1010 2000   .021056794    2.83648
    1010 2002   .021525996  3.0641944
    1010 2003    .07294965  1.8636254
    1012 1989    .04127656   1.409283
    1013 1989    .11404356   .3019915
    1013 1990    .12607272   .3555774
    1013 1991    .08910907   .5606665
    1013 1992    .08733106   .3215031
    1013 1993    .11296393  .27069703
    1013 1994    .11673997   .2641129
    1013 1995    .09181095   .1765962
    1013 1996     .1137708  .24502406
    1013 1997    .11624122   .2470821
    1013 1998    .11281598   .4223797
    1013 1999     .0523967    .339576
    1013 2000    .21863745   .3631682
    1013 2004    .01148379  1.1660852
    1013 2005    .07211726   .9834604
    end
    Best regards,
    TramAnh Nguyen.

  • #2
    The beta has to be firm specific not firm-year specific.
    Code:
    tsset Global Fiscal
    statsby _b , by (GlobalCompanyKey) : regress ROA l.ROA Leverage
    Roman

    Comment


    • #3
      Thank you very much for your reply!

      Comment

      Working...
      X