Announcement

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

  • Fama-Macbeth regression (problems)

    Hi!
    I am currently working on my master thesis and are trying to conduct a Fama-Macbeth regression. I want to use different gold mining stocks as the dependent variables, and the log changes in the gold price as the independent variable. I am able to do the regression, but only get "0(omitted)" for the independent variable:

    Fama-MacBeth Estimation

    panel variable: firmid Number of obs = 11280
    time variable: date Number of date(s) = 120
    R-squared = 0.0000
    ------------------------------------------------------------------------------
    ERP | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    GOLD | 0 (omitted)
    _cons | -.0076154 .0118524 -0.64 0.522 -.0310823 .0158516
    ------------------------------------------------------------------------------
    120 date regressions


    I suspect there could be something wrong with our data, or our sorting of data. Here is a samle:
    firmid year Gold ERP
    1 1 -0.019431725 -0.0201138
    1 2 0.035683520 -0.0176034
    1 3 0.017367882 -0.0386295
    1 4 -0.015468690 -0.0204544
    1 5 0.022587536 -0.0324364
    1 6 -0.008195546 0.04616726
    1 7 -0.017356307 0.00836654
    1 8 0.011955348 0.08899398
    1 9 0.011144885 -0.0088698
    1 10 0.105910796 0.23437753
    1 11 0.057463168 0.02708793
    1 12 -0.005003019 -0.036941
    1 13 0.059881162 0.021038
    1 14 0.085130960 0.1895452
    1 15 0.074990192 0.04909454
    1 16 -0.109518762 -0.2461444
    1 17 -0.033997609 -0.1161874
    1 18 0.053308553 0.07388602
    1 19 0.050238875 0.13873372
    1 20 -0.030692120 -0.1344284
    1 21 -0.111466902 -0.1570298
    1 22 0.070959272 0.07244675
    1 23 -0.187802900 -0.5179759
    1 24 0.061161992 0.16708275
    1 25 0.108367687 0.33464153
    1 26 0.060037715 -0.0215995
    1 27 0.018558628 -0.2518928
    1 28 -0.010237710 0.19148002
    1 29 -0.042936447 -0.1558742
    1 30 0.101315711 0.24459425
    1 31 -0.054541318 -0.0567587
    1 32 0.029922781 0.03109677
    1 33 -0.003934844 -0.0298609
    1 34 0.057754006 0.03170587
    1 35 0.036250681 0.00905472
    1 36 0.121169433 0.23250078
    1 37 -0.073423431 -0.1569372
    1 38 -0.001186835 -0.0759875
    1 39 0.021686944 0.05197144
    1 40 0.005837936 0.02554202
    1 41 0.047382079 0.08185457
    1 42 0.038940325 -0.0055025
    1 43 -0.007281685 0.01177018
    1 44 -0.027598580 -0.0512879
    1 45 0.049165933 0.10148392
    1 46 0.057980014 0.03626628
    1 47 0.025583200 0.02176512
    1 48 0.025074764 0.08728586
    1 49 0.021735181 0.00276466
    1 50 -0.062154752 -0.0860563
    1 51 0.065795050 0.1080543
    1 52 0.001418729 -0.0476349
    1 53 0.075005928 -0.0321241
    1 54 0.006166648 -0.0489444
    1 55 -0.039769625 -0.0543341
    1 56 0.093800061 0.06974765
    1 57 0.113070937 0.07324308
    1 58 -0.102180718 -0.1116895
    1 59 0.031547793 0.06512512
    1 60 0.025153997 0.06835422
    1 61 -0.102858293 -0.1545062
    1 62 0.105199189 0.08486806
    1 63 -0.020847627 -0.0251367
    1 64 -0.018148100 -0.0831247
    1 65 -0.011923340 -0.0891899
    1 66 -0.031196210 0.03568007
    1 67 -0.008188135 -0.1125678
    1 68 0.003366870 -0.1424405
    1 69 0.054835924 0.17047807
    1 70 0.048014569 0.08406657
    1 71 -0.034283840 -0.1325591
    1 72 -0.000687321 -0.0850906
    1 73 -0.031855841 0.03782254
    1 74 0.003836449 -0.0836839
    1 75 -0.055623441 -0.0910301
    1 76 0.010893814 -0.0130594
    1 77 -0.098726210 -0.4125793
    1 78 -0.025804222 0.10793495
    1 79 -0.122232396 -0.3388198
    1 80 0.052798369 0.09737778
    1 81 0.058264315 0.1303121
    1 82 -0.076846787 -0.060349
    1 83 0.015122551 -0.0011349
    1 84 -0.064775717 -0.1475265
    1 85 -0.016333161 0.12617632
    1 86 0.045360259 0.09046977
    1 87 0.068853610 0.06028646
    1 88 -0.055297677 -0.1361997
    1 89 0.000881631 -0.0445955
    1 90 -0.029158892 -0.0733773
    1 91 0.064968501 0.13452788
    1 92 -0.026178069 0.00109057
    1 93 -0.005732051 0.00981948
    1 94 -0.058700917 -0.2205723
    1 95 -0.037492904 -0.2130504
    1 96 0.022336194 0.0402766
    1 97 -0.007817099 -0.1436218
    1 98 0.069395714 0.18153773
    1 99 -0.050665181 -0.0101532
    1 100 -0.006382215 -0.0605923
    1 101 -0.023571533 0.08457989
    1 102 0.019123948 -0.1005432
    1 103 -0.021419670 -0.1231994
    1 104 -0.069160716 -0.4445195
    1 105 0.043430954 0.00742665
    1 106 -0.022608949 -0.0866074
    1 107 0.017925306 0.22603891
    1 108 -0.063028221 -0.0209924
    1 109 -0.003392271 -0.0294913
    1 110 0.058825708 0.31062873
    1 111 0.090420986 0.27570347
    1 112 -0.017172998 0.02806701
    1 113 0.065415543 0.33638057
    1 114 -0.067322704 -0.1231231
    1 115 0.098979411 0.27302902
    1 116 0.010432158 0.00073342
    1 117 -0.027988457 -0.2224693
    1 118 -0.000746820 -0.0235115
    1 119 -0.017642947 0.05679867
    1 120 -0.098512851 -0.203778
    2 1 -0.019431725 -0.0407056
    2 2 0.035683520 -0.0041583
    2 3 0.017367882 -0.0182022
    2 4 -0.015468690 -0.0549337
    2 5 0.022587536 -0.0280577
    2 6 -0.008195546 0.00299388
    2 7 -0.017356307 -0.0460065
    2 8 0.011955348 0.03752575
    2 9 0.011144885 0.01263126
    2 10 0.105910796 0.08230174
    2 11 0.057463168 0.06984858
    2 12 -0.005003019 0.00689
    2 13 0.059881162 -0.0259781
    2 14 0.085130960 0.08481894
    2 15 0.074990192 -0.0177556
    2 16 -0.109518762 -0.1576084
    2 17 -0.033997609 -0.0366984
    2 18 0.053308553 0.09824646
    2 19 0.050238875 0.10925096
    2 20 -0.030692120 -0.1226396
    2 21 -0.111466902 -0.0483519
    2 22 0.070959272 -0.1559209
    2 23 -0.187802900 -0.384109
    2 24 0.061161992 0.1378668
    2 25 0.108367687 0.29862568
    2 26 0.060037715 -0.0333823
    2 27 0.018558628 -0.0387225
    2 28 -0.010237710 0.22404896
    2 29 -0.042936447 -0.2020577
    2 30 0.101315711 0.21426983
    2 31 -0.054541318 -0.1291548
    2 32 0.029922781 -0.0082184
    2 33 -0.003934844 -0.0405501
    2 34 0.057754006 0.053754
    2 35 0.036250681 0.02719548
    2 36 0.121169433 0.24481792
    2 37 -0.073423431 -0.1625734
    2 38 -0.001186835 -0.0381723
    2 39 0.021686944 0.09894132
    2 40 0.005837936 0.05085164
    2 41 0.047382079 0.03735062
    2 42 0.038940325 -0.0054101
    2 43 -0.007281685 0.07646839
    2 44 -0.027598580 -0.0593014
    2 45 0.049165933 0.08134719
    2 46 0.057980014 0.05408182
    2 47 0.025583200 -0.0393499
    2 48 0.025074764 -0.0262848
    2 49 0.021735181 0.02376237
    2 50 -0.062154752 -0.0780639
    2 51 0.065795050 -0.0075184
    2 52 0.001418729 -0.03117
    2 53 0.075005928 0.0571724
    2 54 0.006166648 -0.0335935
    2 55 -0.039769625 -0.0352921
    2 56 0.093800061 0.02904932
    2 57 0.113070937 0.12135452
    2 58 -0.102180718 0.01271651
    2 59 0.031547793 0.03661329
    2 60 0.025153997 0.04729951
    2 61 -0.102858293 -0.1368462
    2 62 0.105199189 0.01828626
    2 63 -0.020847627 -0.0240681
    2 64 -0.018148100 -0.1355142
    2 65 -0.011923340 -0.0811731
    2 66 -0.031196210 0.04573794
    2 67 -0.008188135 -0.0366975
    2 68 0.003366870 -0.0879513
    2 69 0.054835924 0.13199169
    2 70 0.048014569 0.09440712
    2 71 -0.034283840 -0.0455959
    2 72 -0.000687321 -0.152882
    2 73 -0.031855841 0.01648392
    2 74 0.003836449 -0.0606009
    2 75 -0.055623441 -0.0983012
    2 76 0.010893814 0.04365526
    2 77 -0.098726210 -0.2390588
    2 78 -0.025804222 0.06788311
    2 79 -0.122232396 -0.1447425
    2 80 0.052798369 -0.0197597
    2 81 0.058264315 0.07106932
    2 82 -0.076846787 -0.1550212
    2 83 0.015122551 -0.0462825
    2 84 -0.064775717 -0.0863984
    2 85 -0.016333161 -0.0341559
    2 86 0.045360259 -0.0913567
    2 87 0.068853610 0.11700939
    2 88 -0.055297677 -0.0076633
    2 89 0.000881631 0.0450097
    2 90 -0.029158892 -0.0828656
    2 91 0.064968501 0.10498116
    2 92 -0.026178069 0.00476495
    2 93 -0.005732051 0.07230399
    2 94 -0.058700917 -0.1632441
    2 95 -0.037492904 -0.185219
    2 96 0.022336194 0.02784287
    2 97 -0.007817099 -0.0394492
    2 98 0.069395714 0.28409592
    2 99 -0.050665181 0.03057395
    2 100 -0.006382215 -0.1306279
    2 101 -0.023571533 0.15352171
    2 102 0.019123948 0.02532945
    2 103 -0.021419670 -0.1609913
    2 104 -0.069160716 -0.3426554
    2 105 0.043430954 0.01869508
    2 106 -0.022608949 -0.0546651
    2 107 0.017925306 0.21451229
    2 108 -0.063028221 -0.0654103
    2 109 -0.003392271 -0.0221077
    2 110 0.058825708 0.13288656
    2 111 0.090420986 0.21125279
    2 112 -0.017172998 0.04714075
    2 113 0.065415543 0.25455638
    2 114 -0.067322704 -0.0503848
    2 115 0.098979411 0.21099244
    2 116 0.010432158 0.0903092
    2 117 -0.027988457 -0.1135175
    2 118 -0.000746820 -0.034521
    2 119 -0.017642947 -0.0041448
    2 120 -0.098512851 -0.1623982
    3 1 -0.019431725 -0.0791206
    3 2 0.035683520 -0.0161854
    3 3 0.017367882 -0.0774433
    3 4 -0.015468690 -0.0573347
    3 5 0.022587536 -0.0309149
    3 6 -0.008195546 0.01489949
    3 7 -0.017356307 -0.0152531
    3 8 0.011955348 0.01697372
    .........

    We have been stuck for several days, and all help are really appreciated.

  • #2
    Fama and McBeth regressions are cross-sectional regressions estimated in each time period. If you look at your data, first three periods of firmid 1 and 2 as an example, the values are the same, which might be the case for other firmids as well. Regressing ERP on a constant, regression will omit the constant. No surprise at all.
    Code:
     
    old ERP
    1 1 -0.019431725 -0.0201138
    1 2 0.035683520 -0.0176034
    1 3 0.017367882 -0.0386295
    2 1 -0.019431725 -0.0407056
    2 2 0.035683520 -0.0041583
    2 3 0.017367882 -0.0182022
    2 4 -0.015468690 -0.0549337
    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


    • #3
      Thank you so much for your quick reply.
      How do you suggest we do a Fama Macbeth regression with macro variables (Gold price changes) ? All macro variables will only vary over time and not over firm. (Thats why they are constant over firms, right?)

      Comment


      • #4
        Yes, this is true that macro variables are constant across firms, but not across time periods, therefore Fama and Mcbeth regression on macro variables in a single country is a bad idea. You might consider time series or panel regression instead. FB regression lends itself more easily to cases where the variable varies across cross-sectional units and is relatively constant over time within each cross-sectional unit
        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


        • #5
          Okey, thank you. I hear what you are saying, but at the same time i have seen several studies where they use macro-factors (only varying across time, and not firms) in Fama Macbeth regression. We want to check if there is a premium for investing in gold stocks with a high gold beta, similar to the CAPM beta and risk premium. Didn't Fama-French test CAPM using the Fama-Macbeth approach?

          Like the study in this thesis:
          http://dare.uva.nl/cgi/arno/show.cgi?fid=635358

          Thank you so much for the help, sir.

          Comment


          • #6
            The said thesis as well as Fama and French first calculate betas, then in the second stage (cross-sectional )regression, betas are used as independent variables to explain observed returns.
            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


            • #7
              Okey, so in our first step we do a time series regression and obtain n(number of firms) betas, and then use those betas to conduct t cross sectional regressions to get t gammas(beta to beta)?

              Comment

              Working...
              X