Dear Stata Community,
Consider the following data example,
Where yearly return refers to returns calculated from month t until t+11
And where past return refers to returns calculated from month t-12 until t-1
and MVlog and logBM are computed at t-5.
What is the difference between;
xtset permno fyear
xtset permno date
when running;
asreg yearly_return pastreturn MVlog logBM, newey(16) fmb window(date -120 -1)
Thank you in advance for your time and consideration,
Consider the following data example,
Code:
* Example generated by -dataex-. For more info, type help dataex clear input long permno int fyear float(date yearly_return pastreturn MVlog logBM) 10001 2003 526 -.04000033 . 2.7470114 .9929781 10001 2004 538 .753453 -.04000033 2.851246 .9102439 10001 2006 562 .2048728 . 3.275811 .9014823 10001 2012 640 .05517977 . 4.3578887 .9948049 10001 2013 652 -.07614732 .05517977 4.429978 1.0337856 10001 2014 664 -.2750734 -.07614732 4.7499437 .9616078 10001 2015 676 .7123322 -.2750734 4.3600655 1.045629 10005 1988 352 -.40000015 . -.6552504 -.37912425 10005 1989 364 .6666673 -.40000015 -1.3483976 -.01468603 10005 1990 376 .6 .6666673 -1.3483976 .24672206 10014 1972 163 -.2777788 . 2.643654 1.1760638 10018 1994 422 -.8749999 . 1.2255386 .9414079 10019 1992 394 .4615384 . 3.3356984 1.0492061 10021 1990 376 -.6538458 . -.37469345 .005342972 10021 1991 388 .066666216 -.6538458 -.37469345 -.25921646 10021 1992 400 -.4479162 .066666216 -.8498009 -.3583653 10021 1993 412 4.433959 -.4479162 -.2987674 -1.2088495 10025 2003 530 .847825 . 4.1162286 .9519883 10026 1995 433 .0833334 . 4.6749806 .9765223 10026 1996 445 .09615196 .0833334 4.543845 1.0061294 10028 1990 376 8.733331 . -.14050418 -2.2353818 10028 2015 676 1.9943388 . 1.4006114 .9663729 10029 1989 361 .4848481 . 2.577182 1.0336713 10032 2004 541 1.457466 . 6.166995 .9505379 10035 1995 433 -.2394371 . 5.04009 .9747478 10035 1996 445 .03703811 -.2394371 4.6861973 1.0374911 10035 1997 457 -.4107135 .03703811 4.623489 1.032027 10035 1998 469 .8181817 -.4107135 4.427463 1.0657483 10036 1988 346 -.4285715 . .1982359 2.102216 10036 1989 358 -.25 -.4285715 -1.1960907 -.0008356783 10036 1990 370 .666667 -.25 -1.1960907 .383638 10039 1989 364 -.2499995 . .10989607 1.742068 10042 1997 460 -.7941174 . 3.89323 1.0294901 10042 1998 472 .4999995 -.7941174 2.445321 1.559421 10042 1999 484 -.12381048 .4999995 2.6762586 1.427618 10042 2000 496 .26087007 -.12381048 2.5256486 1.3998827 10042 2001 508 -.19999857 .26087007 2.821153 1.2433417 10043 1989 367 .08749946 . 3.172727 1.0132569 10043 1991 391 .3255827 . 3.116843 1.0842364 10043 1992 403 -.008772658 .3255827 3.1422324 1.0917183 10043 1993 415 -.0442472 -.008772658 3.564421 .9929457 10043 1994 427 .05555877 -.0442472 3.3890405 1.0668535 10043 1995 439 .3684202 .05555877 3.432576 1.069369 10043 1996 451 .53846186 .3684202 3.487925 1.0575354 10046 1988 352 -.4714283 . 1.9505422 1.1698655 10046 1989 364 -.16216275 -.4714283 1.9505422 1.145754 10046 1990 376 -.22580606 -.16216275 .56424785 3.7372894 10046 1991 388 .5 -.22580606 .7465695 2.736219 10046 1992 400 -.05555509 .5 1.0944054 1.726776 10046 1993 412 -.6470591 -.05555509 1.1520345 1.60054 10047 1992 398 -.59183615 . 2.0512831 1.8745857 10047 1993 410 -.7000002 -.59183615 3.3681834 1.0656427 10051 1994 424 .6190451 . 3.213783 1.049671 10051 1995 436 .58823633 .6190451 3.1267715 1.1012415 10051 2000 496 11.723228 . 3.2116246 1.5691178 10051 2001 508 -.2764922 11.723228 4.7392464 1.0510893 10051 2004 544 .14897396 . 5.165761 .9725549 10051 2005 556 .7764512 .14897396 4.837208 1.0558592 10051 2006 568 -.01006608 .7764512 5.120608 1.0002797 10055 1992 404 -.8846153 . 2.694196 1.1413442 10055 1993 416 -.8333333 -.8846153 3.225752 1.1267066 10057 1975 193 .27027106 . 3.547568 1.2364576 10057 1976 205 .08510655 .27027106 3.6385396 1.2077203 10057 1982 277 .326668 . 4.409622 1.0874184 10057 1984 301 -.26845762 . 4.5096087 1.0498995 10057 1985 313 -.1651371 -.26845762 4.40216 1.046579 10057 1986 325 .032965865 -.1651371 4.127217 1.0790898 10057 1988 349 .024997944 . 4.0345945 1.0201061 10057 1990 373 .7906957 . 3.543868 1.1739488 10057 1991 385 -.09090906 .7906957 3.6717014 1.1141077 10057 1992 397 .19999987 -.09090906 3.7486625 1.0962434 10057 1993 409 .488097 .19999987 4.0904117 1.0057707 10058 1981 265 -.18749987 . -.15840973 -4.021886 10058 1982 277 -5.32967e-07 -.18749987 -.5709295 -1.1205348 10058 1983 289 -.15384577 -5.32967e-07 -.57892597 .3156217 10064 1990 376 1.4236153 . 4.2473445 1.0768205 10064 1993 412 -.3571429 . 5.671184 .9919688 10064 1994 424 9.187055e-07 -.3571429 5.274479 1.078993 10064 1995 436 1.000002 9.187055e-07 5.054471 1.1041697 10077 1988 353 -.4067796 . 3.4168246 1.1909196 10077 1989 365 -.4285713 -.4067796 3.0346165 1.3315755 10077 1990 377 -.533333 -.4285713 2.845374 1.3919848 10077 1991 389 -.14285642 -.533333 1.746762 1.8406335 10077 1992 401 -.9583333 -.14285642 1.8073868 1.691531 10079 1988 357 .09677254 . 1.8399146 1.0226563 10080 1988 352 .4000008 . 2.246491 1.1656886 10080 1989 364 -.04761967 .4000008 2.3365517 1.0980461 10080 1992 400 -.05555581 . 2.4722645 1.059117 10080 1993 412 .235294 -.05555581 2.3092132 1.1556388 10080 1994 424 -.26190433 .235294 2.3511372 1.1723671 10080 1995 436 -.22580636 -.26190433 2.0602746 1.359023 10080 1996 448 -.17708294 -.22580636 1.9464457 1.4038653 10080 1997 460 -.13923998 -.17708294 1.482882 1.7383646 10080 1998 472 -.20588204 -.13923998 1.4874398 1.7412082 10080 1999 484 -.4074079 -.20588204 1.1105407 2.3601463 10080 2002 520 .13513619 . 1.5631007 1.6491514 10082 1987 340 1.1999996 . .368083 2.7044754 10083 1988 346 .06250124 . 3.478737 1.0332339 10084 1988 349 .260869 . 1.9139034 1.1617838 10084 1990 373 -.04761912 . .4965999 3.3872955 end format %tm date
And where past return refers to returns calculated from month t-12 until t-1
and MVlog and logBM are computed at t-5.
What is the difference between;
xtset permno fyear
xtset permno date
when running;
asreg yearly_return pastreturn MVlog logBM, newey(16) fmb window(date -120 -1)
Thank you in advance for your time and consideration,
Comment