Announcement

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

  • Fama and MacBeth two-step procedure with logit regressions

    Dear members,

    Is there a possibility to run a Fama and MacBeth two-step procedure in STATA where logit regressions are run for each time period and then the average of coefficients are obtained with t stats showing their significance?

    Thank you in advance!
    Best
    Jovana
    Last edited by Jovana Cadenovic; 21 Sep 2020, 04:58.

  • #2
    You can do whatever you want, the computer will not break.

    But I have never seen anybody doing it.

    Why would you do something like this? What is the purpose here?

    Comment


    • #3
      Dear Joro,

      I was hoping if there is a possibility to do it using xtfmb command somehow?
      I have a panel data with a dummy as a dependent variable, the logit model fits.


      Comment


      • #4
        Dear Jovana,

        have you found a solution for this?

        I am trying to do the same thing: Running logit regression for each time period and average the coefficients according to the Fama and MacBeth procedure. I suppose it would be an extremely strenuous thing to do by running it manually, storing the results etc.

        Also happy if anyone else has any suggestions on this or a workaround.

        Thanks and kind regards
        Erik

        Comment


        • #5
          Dear Erik Rothi

          I have just seen your post. Yes, I made a code that still requires some manual work.


          statsby _b _se e(r2_p), by(year): logit Y X1 X2 , vce (cluster ID)
          export excel year Y_b_X1 Y_b_X2 Y_b_cons Y_se_X1 Y_se_X2 Y_se_cons _eq2_stat_1 using "by_year", firstrow(variables) nolabel keepcellfmt

          global x Y_b_X1 Y_b_X2 Y_b_cons
          gen sqrt_N= sqrt(number of years)
          foreach var of global x{
          egen `var'_mean=mean(`var')
          egen `var'_sd= sd(`var')
          gen `var'_tratio=sqrt_N*`var'_mean/`var'_sd
          }
          export excel Y_b_X1_mean Y_b_X1_sd Y_b_X1_tratio Y_b_X2_mean Y_b_X2_sd Y_b_X2_tratio Y_b_cons_mean Y_b_cons_sd Y_b_cons_tratio using "mean_values", firstrow(variables) nolabel keepcellfmt

          It does require some code writing; I am pretty new in STATA so I did step by step like this.

          Hope it helps.

          Best
          Jovana

          Comment

          Working...
          X