Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Fama-MacBeth regression


From   Adrian Stork <[email protected]>
To   [email protected]
Subject   st: Fama-MacBeth regression
Date   Fri, 3 Jan 2014 19:23:19 +0100

Dear all

I'm trying to run a second-pass cross-sectional regression which is
part of what finance researchers call a Fama-MacBeth regression.
I managed to get the beta-coefficients from the first-pass regression
but now I'm stuck at the second-pass CSR.
So my dataset looks currently like this (time period starts in 1987m7
and ends 2012m12):


                   ________________portfolios________________________
       _________________coefficients__________________________

date2	exsize_1	exsize_2	exsize_3	exbm_1	exbm_2	exbm_3	betaexsize_1	betaexsize_2	betaexsize_3	betaexbm_1	betaexbm_2	betaexbm_3
.... etc.
1989m6	.31	3.41	3.10	2.83	2.25	1.02	.64	.68	.67	.63	.76	.65
1989m7	1.16	1.85	4.93	9.40	3.31	4.65	.64	.68	.67	.63	.76	.65
1989m8	2.45	2.94	6.85	4.50	3.82	4.76	.64	.68	.67	.63	.76	.65
1989m9	-.60	1.38	-1.56	2.69	-.72	-1.38	.64	.68	.67	.63	.76	.65
1989m10	-1.46	-1.41	-.89	.11	-1.25	1.89	.64	.68	.67	.63	.76	.65
etc.

Now I need to regress at each individual month all the portfolios
against the their estimated coefficient.
But that is exactly what I'm not able to manage. In the end there
should be one figure at each time period t which corresponds to the
new coefficient from the individual cross-sectional regressions
As you can see I merely added the prefix "beta" for the coefficients
with respect to its portfolio.

The best I could come with is the following:

.ds ex*

.forval i=330/635{
.foreach v of varlist `r(varlist)' {
.	regress `v' beta`v' if date2==`i'
.	gen lambda`v' = _b[beta`v']
.}
.}

but here the error message is "insufficient observations" although all
obsevations are nonmissing.
I know there is a code from Kellog University
(http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/se/fm.ado)
but that does not include the first pass regression and brings me to
the same point. Also I want to understand the entire procedure and
follow my results.
Thus, does anyone have an idea how to retrieve the second pass
regression coefficients (the beta coefficient in the second pass
regression is perfectly fine and enough - no need for the constant or
the residuals right now).
I guess reshaping the dataset might also be an alternative beginning
compared to the code I wrote above.

Best,
Adrian
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index