proc datasets library=WORK kill; run; quit;
libname Cooked "d:\Data\";
/* Import Trade data and compute some variables */
data TrdGrpDataTemp;
set cooked.DrkTradesPlus_TrdGrp1;
sprd = (log(ask) - log(bid))*100;
sprd5 = (log(askpi5) - log(bidpi5))*100;
sprd30 = (log(askpi30) - log(bidpi30))*100;
PI5 = abs(log(askpi5 + bidpi5)-log(ask+bid))*100;
PI30 = abs(log(askpi30 + bidpi30)-log(ask+bid))*100;
PR = abs(log(askpi5 + bidpi5)-log(ask+bid)-(log(askpi30 + bidpi30)-log(askpi5+bidpi5)))*100;
if sign(log(askpi5 + bidpi5)-log(ask+bid)-1) = sign(log(askpi30 + bidpi30)-log(askpi5+bidpi5)-1) then PRI = 1; else PRI = 0;
PAS = divide((askpi30 + bidpi30)/2 - (askpi5 + bidpi5)/2,(ask + bid)/2)*100;
if ask < bid then delete;/* Filter1a */
if askpi5 < bidpi5 then delete;/* Filter1b */
if askpi30 < bidpi30 then delete;/* Filter1c */
if date > "30SEP2019"d then delete; /* Delete the last couple of days. */
if venue = "UBSP" OR venue = "CGMA" OR venue = "2011" OR venue = "2311" OR venue = "3611" OR venue = "MACB" then ifnoHFT = 1;
else if not missing(venue) then ifnoHFT = 0;
if missing(venue) then delete;
run;
/* t-test */
ods exclude all;
proc ttest data = TrdGrpDataTemp;
var val sprd price sprd5 sprd30 pi5 pi30 pr pas;
class ifnoHFT;
ods output ttests = Summary_test equality = summary_test2 statistics = Summary_test1;
run;
ods exclude none; Hi, All, The above code went through; but when I replaced the second line by a larger sized dataset (of cos, exactly the same data structure. In fact, the larger one contains all observations in the small dataset), i.e., change " cooked.DrkTradesPlus_TrdGrp1 " into " cooked.DrkTradesPlus_AllGrp ". I have got the following error messages. WARNING: Output 'statistics' was not created. Make sure that the output object name, label, or
path is spelled correctly. Also, verify that the appropriate procedure options are used
to produce the requested output object. For example, verify that the NOPRINT option is
not used.
WARNING: Output 'equality' was not created. Make sure that the output object name, label, or
path is spelled correctly. Also, verify that the appropriate procedure options are used
to produce the requested output object. For example, verify that the NOPRINT option is
not used.
WARNING: Output 'ttests' was not created. Make sure that the output object name, label, or path
is spelled correctly. Also, verify that the appropriate procedure options are used to
produce the requested output object. For example, verify that the NOPRINT option is not
used. I have googled and read some of posts in this forum, but I could not figure out why. Here is the list I troubleshoot: 1. Some posts say it is possible because the level of "class" statement is not 2 any more. - It is not applied in my case. Because the larger dataset contains all observations in the "TrdGrp1" dataset; 2. Some posts say sth to do with ODS output. - From my understanding, I have correctly specified to make sure the place to ODS is correct. Any suggestions, please?
... View more