Clyde Schechter Thank you for your reply, Clyde!
Here is my partial dataset:
------------------ copy up to and including the previous line ------------------
Data descriptions:
P1: first single sort
double_P2: second sort based on P1
exret_m is the quarterly excess returns
mktrf_m is the market factor
The above 4*4 table is built after running
similarly following the code in the post #9.
Do you think it's possible to get the t-stat for the difference of excess returns based on P1 and double_P2? Many thanks for your help in advance! Hope to hear from you!
Here is my partial dataset:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input double permno float(quarter P1 double_P2 exret_m mktrf_m) 10010 106 1 1 -.3845 -.08600003 10010 113 1 1 .018909574 .04789996 10010 114 1 1 -.006199956 .032999992 10010 115 1 1 .08460915 .01489997 10010 116 1 1 -.04751635 .015699983 10010 117 1 1 -.18891817 -.013499975 10011 122 1 1 .21622217 -.06120002 10011 123 1 1 -.25600004 .02460003 10011 124 1 1 .12746811 .026499987 10011 125 1 1 -.29489768 -.04939997 10011 126 1 1 -.25460005 -.015900016 10011 127 1 1 -.05643159 .10839999 10011 128 1 1 -.0926857 -.026600003 10011 130 1 1 .0212096 .011899948 10011 131 1 1 .05434287 .015300035 10011 132 1 1 -.08062506 .023 10011 133 1 1 .27919006 .0031000376 10011 134 1 1 .1753142 -.0012000203 10011 135 1 1 -.067873776 .016499996 10012 181 1 1 -.25230002 .005699992 10018 114 1 1 -.006199956 .032999992 10018 115 1 1 -.4273526 .01489997 10018 116 1 1 .7205727 .015699983 10018 117 1 1 -.007099986 -.013499975 10018 118 1 1 .04905558 -.00760001 10018 138 1 1 -.003700018 -.02310002 10018 140 1 1 -.25460005 .02190006 10018 142 1 1 -.14715713 .033499956 10028 167 1 1 .6489855 .016100049 10028 168 1 1 -.1696169 .0424 10028 169 1 1 -.27018887 -.07209998 10028 170 1 1 -.001399994 -.1035 10028 171 1 1 -.09855747 -.05760002 end format %tq quarter
Data descriptions:
P1: first single sort
double_P2: second sort based on P1
exret_m is the quarterly excess returns
mktrf_m is the market factor
The above 4*4 table is built after running
Code:
-program define myregress-, -rangestat-, -runby myregress- and -table P1 double_P2-
Do you think it's possible to get the t-stat for the difference of excess returns based on P1 and double_P2? Many thanks for your help in advance! Hope to hear from you!

Comment