Announcement

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

  • Fama MacBeth with "asreg" in Stata

    Hello!

    I am a complete newbie to stata and I am trying to run a Fama MacBeth regression using the asreg function in Stata. I keep getting errors when I run the regressions, I believe that my main problem is how my data is set up before importing it to Stata.

    Basically, I am looking at the impact that ESG may or may not have on firms performance (stock returns). I have 299 firms from 2014-2018 inclusive with monthly returns and yearly ESG values (unbalanced panel with 16,234 observations). I have imported the Fama French Factors from their website and put all the data into one spreadsheet. I think my problem is the way I set up the "date" and I am getting confused on how I tell stata to regress for each "ID" for each month of the years. Any missing returns or ESG have been removed from the spreadsheet


    my code:
    xtset ID YrMth
    asreg ExcReturns MktRF HML SMB RMW CMA, fmb

    and in the result all the factors have been "omitted" and result in 0's

    How should my date variable be set up in stata, for example January 2015

    I may just be doing this all wrong, and confusing myself on a daily

    Any help would be greatly appreciated!

  • #2
    asreg is a command (not function) from SSC written by Attaullah Shah -- who no doubt will answer in due course.

    I think you'll probably need to give an explicit data example showing exactly how your dates are held, and perhaps more information. See https://www.statalist.org/forums/help#stata (especially 12.2) on how to do this.

    Comment


    • #3
      Nick Cox thanks for tagging me in the post.
      Ana Marc You are making the same mistake as many other users here, i.e. using panel-invariant variables with Fama and MacBeth regression. See the following posts to get started with asreg and FMB regressions.

      1. Fama – MacBeth (1973) procedure: What, how and where | asreg in Stata

      2. Fama and MacBeth regression over 25 Portfolios using asreg in Stata
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment

      Working...
      X