Hello statalist community
I have a question regarding to a regression that I am trying to run. I am trying to run a Fama and Macbeth (1973) regression that results in precision-weighted coefficient estimates, where the weights correspond to the number of observations available in unit of my time variable.
My data looks as follows:
clear
input double permno float(EXRET ln_MV ln_MB) double INCVOL float(INSOWN num_QUARTER)
75118 -.09188042 -.17394273 -4.079042 . 67.86006 1
14090 .011367133 3.5268445 -4.1252265 . 54.00001 1
30382 .012683257 1.2758546 -3.2697885 . 18.484806 1
60097 .005917849 1.4279808 -4.3667173 . 0 1
64960 .009459197 1.5369115 -3.75801 . 17.608946 1
41179 .04053437 2.239441 -3.626001 . 65.296234 1
62017 .03039851 -.9708987 . 5.041212983927174 26.248156 1
51204 .05096019 .6808063 -4.1211305 . 34.359245 1
57226 .0347284 -.9807659 . 1.754919149542207 33.353725 1
41937 .0475407 1.6939538 . . 39.21838 1
69650 .0028317515 -2.1318092 -3.807035 . 2.462433 1
32540 -.04812591 .08902234 -3.836588 . 0 1
66018 .0032750345 4.3927784 -4.593813 . 34.548725 1
69710 .08173437 -.8410673 -2.9540646 . 6.239182 1
27270 -.05765951 .804093 . 1.3177912841818864 44.89112 1
50550 -.020612793 -.22040667 . 2.835814276190232 0 1
60548 -.02092875 -1.2251457 -3.7543085 . 7.035306 1
15843 -.006694769 -.7520509 -4.518493 .6794824094918304 24.23382 1
50286 -.0031408006 1.5588275 -3.309391 .5758592928832414 0 1
41320 .08330814 -1.061155 -4.192554 2.7021948426158775 7.217255 1
48216 -.0013428715 -.22072466 -3.379341 . 17.538462 1
66376 -.072539106 -1.4476544 -3.817711 . 1.219158 2
60871 -.02740731 2.0190823 -3.420131 1.5873913537442483 46.0588 2
14323 -.08038726 .7199376 -4.135314 . 27.83807 2
61890 .019189665 2.812176 . .7214691461056102 5.541264 2
19984 .02026492 -.4716051 -3.369945 . 9.0375 2
21557 .08498475 1.4488747 . .7482703841072569 52.20262 2
38907 .02365439 -.6657271 -3.17557 . 2.461004 2
14955 .01936653 .9368136 . 2.7673795796344525 . 2
49227 -.03613048 -.9969589 -3.4286404 . 9.232439 2
11376 -.02382662 .12864709 -3.9517674 1.70242742629187 26.153223 2
37234 -.009017959 .14103003 -4.400966 1.5356260187501378 0 2
13661 -.013558804 2.6313634 . .5996879972513035 53.35809 2
41136 .0042614574 -.581693 -4.547617 . 13.309722 2
50999 .06627529 -1.634179 -3.4234354 4.695817631805514 24.996477 2
66070 -.03870002 .3992056 -3.317362 . 32.348495 2
38280 -.04766248 2.0901208 -3.192255 . 98.59851 2
27474 .06973523 -1.0441952 -4.468653 . 25.11545 2
22374 -.020181894 -.6932272 -2.769915 . 23.581787 2
46018 .06129824 -.6577125 -3.906885 . 20.110804 2
67459 .010933916 .9657459 -2.0422113 . 7.39625 2
end
Code that I ran:
xtset permno num_QUARTER
byso num_QUARTER: asreg EXRET ln_MV ln_MB INCVOL INSOWN, fmb
As per my understanding, this estimates the model by individual quarters, but how can I precision-weight the coefficient estimates by using the number of observations per quarter as the weights?
Any help appreciated, thanks in advance,
Benedikt Dieker
I have a question regarding to a regression that I am trying to run. I am trying to run a Fama and Macbeth (1973) regression that results in precision-weighted coefficient estimates, where the weights correspond to the number of observations available in unit of my time variable.
My data looks as follows:
clear
input double permno float(EXRET ln_MV ln_MB) double INCVOL float(INSOWN num_QUARTER)
75118 -.09188042 -.17394273 -4.079042 . 67.86006 1
14090 .011367133 3.5268445 -4.1252265 . 54.00001 1
30382 .012683257 1.2758546 -3.2697885 . 18.484806 1
60097 .005917849 1.4279808 -4.3667173 . 0 1
64960 .009459197 1.5369115 -3.75801 . 17.608946 1
41179 .04053437 2.239441 -3.626001 . 65.296234 1
62017 .03039851 -.9708987 . 5.041212983927174 26.248156 1
51204 .05096019 .6808063 -4.1211305 . 34.359245 1
57226 .0347284 -.9807659 . 1.754919149542207 33.353725 1
41937 .0475407 1.6939538 . . 39.21838 1
69650 .0028317515 -2.1318092 -3.807035 . 2.462433 1
32540 -.04812591 .08902234 -3.836588 . 0 1
66018 .0032750345 4.3927784 -4.593813 . 34.548725 1
69710 .08173437 -.8410673 -2.9540646 . 6.239182 1
27270 -.05765951 .804093 . 1.3177912841818864 44.89112 1
50550 -.020612793 -.22040667 . 2.835814276190232 0 1
60548 -.02092875 -1.2251457 -3.7543085 . 7.035306 1
15843 -.006694769 -.7520509 -4.518493 .6794824094918304 24.23382 1
50286 -.0031408006 1.5588275 -3.309391 .5758592928832414 0 1
41320 .08330814 -1.061155 -4.192554 2.7021948426158775 7.217255 1
48216 -.0013428715 -.22072466 -3.379341 . 17.538462 1
66376 -.072539106 -1.4476544 -3.817711 . 1.219158 2
60871 -.02740731 2.0190823 -3.420131 1.5873913537442483 46.0588 2
14323 -.08038726 .7199376 -4.135314 . 27.83807 2
61890 .019189665 2.812176 . .7214691461056102 5.541264 2
19984 .02026492 -.4716051 -3.369945 . 9.0375 2
21557 .08498475 1.4488747 . .7482703841072569 52.20262 2
38907 .02365439 -.6657271 -3.17557 . 2.461004 2
14955 .01936653 .9368136 . 2.7673795796344525 . 2
49227 -.03613048 -.9969589 -3.4286404 . 9.232439 2
11376 -.02382662 .12864709 -3.9517674 1.70242742629187 26.153223 2
37234 -.009017959 .14103003 -4.400966 1.5356260187501378 0 2
13661 -.013558804 2.6313634 . .5996879972513035 53.35809 2
41136 .0042614574 -.581693 -4.547617 . 13.309722 2
50999 .06627529 -1.634179 -3.4234354 4.695817631805514 24.996477 2
66070 -.03870002 .3992056 -3.317362 . 32.348495 2
38280 -.04766248 2.0901208 -3.192255 . 98.59851 2
27474 .06973523 -1.0441952 -4.468653 . 25.11545 2
22374 -.020181894 -.6932272 -2.769915 . 23.581787 2
46018 .06129824 -.6577125 -3.906885 . 20.110804 2
67459 .010933916 .9657459 -2.0422113 . 7.39625 2
end
Code that I ran:
xtset permno num_QUARTER
byso num_QUARTER: asreg EXRET ln_MV ln_MB INCVOL INSOWN, fmb
As per my understanding, this estimates the model by individual quarters, but how can I precision-weight the coefficient estimates by using the number of observations per quarter as the weights?
Any help appreciated, thanks in advance,
Benedikt Dieker
Comment