Announcement

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

  • Fama MacBeth regression with weights

    Hello everyone,

    I want to run quarterly weighted FamaMacBeth regressions. The weights correspond to the number of observations used in each quarterly cross-sectional regression.



    My time identifier is "quarter_year" and my firm identifier is "permno". The dependant variable is "SUE" and the independant variables are "
    D_LOW", "D_HIGH", "SIZE", "BM", "RET_50", "RET_5", "IO", "IVOL", "LAG_SUE", "TURN_50".


    The following is how far I came with -xtfmb- (from SSC), but it allows only aweights, which doesn't work in my case I think.
    tsset permno quarter_year
    xtfmb SUE D_LOW D_HIGH SIZE BM RET_50 RET_5 IO IVOL LAG_SUE TURN_50


    The following got me the mean of the estimators of each cross sectional regression with -statsby- and -collapse-,but I don't know how to weight them.
    statsby _b e(r2), by(quarter_year): regress SUE D_LOW D_HIGH SIZE BM RET_50 RET_5 IO IVOL LAG_SUE TURN_50
    collapse (mean) _b_cons _b_D_LOW _b_D_HIGH _b_SIZE _b_BM _b_RET_50 _b_RET_5 _b_IO _b_IVOL _b_LAG_SUE _b_TURN_50 _eq2_stat_1


    Does anyone know how to this with the number of observations as weights?
    Last edited by David Mueller; 25 Jul 2018, 07:22. Reason: Edited to add tags

  • #2
    You'll increase your chances of a helpful answer by following the FAQ on asking questions - provide Stata code in code delimiters, readable Stata output, and sample data using dataex.

    xtfmb is user written so a helpful answer to such a question depends a lot on whether someone active on the list happens to have worked extensively with that routine. I don't use xtfmb, but let me suggest a couple of potential directions. First, you might be able to manipulate aweights to get what what you want. Second, you can keep number of observations in the statsby and then keep the number of observations in the collapse so you can weight them yourself.

    Comment

    Working...
    X