Dear Stata Users
I am running the following code:
I have the following questions:
1. How do I modify a code so stars in *csv file are next to t-test, not next to the coefficients?
2. How do I modify a code so that all coefficients are rounded to 4 decimal places?
3. I would like to learn how to store estimates in an alternative way. I do not find esttab convinient. Results are stored in *csv file in a way difficult for further formating. All results are stored as text: ="-2.7589". What is the alternative way to export regression results to excel spreadsheet?
Thank you.
I am running the following code:
Code:
tsset t eststo, title("Specification 1"): newey Kospi_rtr FindL1 KrtrL1, lag (4) eststo, title("Specification 2"): newey Kospi_rtr FinstL1 KrtrL1, lag (4) eststo, title("Specification 3"): newey Kospi_rtr FforL1 KrtrL1, lag (4) eststo, title("Specification 4"): newey Kospi_rtr FindL1 FinstL1 FforL1 KrtrL1, lag (4) esttab using "AlltradingdaysSpc_1to6.csv", append title ("All trading days") coeflabel(Kospi_rtr "MktRet" KrtrL1 "MktRetlag1" FinstL1 "NOFinstlag1" FindL1 "NOFindlag1" FforL1 "NOFforlag1") mtitle("Specification 1" "Specification 2" "Specification 3" "Specification 4") cells(b(fmt(a4)) t(fmt(2) par))
1. How do I modify a code so stars in *csv file are next to t-test, not next to the coefficients?
2. How do I modify a code so that all coefficients are rounded to 4 decimal places?
3. I would like to learn how to store estimates in an alternative way. I do not find esttab convinient. Results are stored in *csv file in a way difficult for further formating. All results are stored as text: ="-2.7589". What is the alternative way to export regression results to excel spreadsheet?
Thank you.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(date Kospi_rtr KrtrL1) double(FindL1 FinstL1 FforL1) float t 16072 . . . . . 1 16075 .0034521355 . -.00011784640090361977 -.000014492068673607026 .00013303976064839485 2 16076 -.0007618144 .0034521355 -.00001858190904077246 -.0001416343375096526 .00015651636168056407 3 16077 .0044020107 -.0007618144 .000018082479620871834 -.00016446221751471266 .00013462336156651474 4 16078 -.003502024 .0044020107 -.00006477076594818576 -3.3345260272982114e-07 .00006016959155763672 5 16079 .025280854 -.003502024 .00005392315291704728 -.00019177899699457523 .00014004128167051442 6 16082 .006735469 .025280854 .00005974674967805392 -.0002814979349148859 .0002048587521535676 7 16083 -.002633596 .006735469 .00004558705455499578 -.00024026846992716876 .00018815614904580397 8 16084 .001510634 -.002633596 5.0422022373254836e-06 -.00024286243549898894 .00023439698727461736 9 16085 -.004660404 .001510634 -.00005916039672485067 -.0001394851531256149 .00020226736243540263 10 16086 .002659278 -.004660404 -.00002696289054936368 -.00018635229934024485 .00021394409638796945 11 16089 .010396816 .002659278 -.00001855893899501892 -.00010975959939948518 .0001450185866311689 12 16090 .005474417 .010396816 -.00003531531244060233 1.2933848632624244e-06 6.398041111203486e-06 13 16096 .008986297 .005474417 .000051049563318311274 -.00025103944510139947 .00018963230428067942 14 16097 -.006826825 .008986297 .00004450510832651873 -.000276131753983601 .00022765945922570803 15 16098 -.0040353634 -.006826825 -.000026097850002825813 -.0001297627364251843 .00015474188742275192 16 16099 -.007212835 -.0040353634 -7.198678220123213e-07 -.0002029224247545971 .00016799711247339746 17 16100 -.005960808 -.007212835 .00021304781149620106 -.00016525868962050805 -.000032531174397505135 18 16103 .007372697 -.005960808 .00019594228901980684 -.0002668573913719077 .00007241820787580663 19 16104 -.017620752 .007372697 .000013253134273047228 -.00006864797096860753 .000047788760478552585 20 end format %tdNN/DD/CCYY date
Comment