Current Test_3 SAS File
%include 'd:\projects\cva\sas\cva_data.sas';
data five;
set main;
if win=1;
if xprnc=3;
if market=3 or market=7;
if sigsize = 1 then high = signal;
if sigsize = 1 then low = signal;
theta=1800;
mid=(low+high)/2;
range=highlow;
if sigsize = 5 and market = 3 then discount = ((theta  (range/2))/2);
if sigsize = 5 and market = 5 then discount = (((theta  (range/2))/3)*2);
if sigsize = 5 and market = 7 then discount = (((theta  (range/2))/4)*3);
if sigsize = 1 and market = 3 then discount = 900;
if sigsize = 1 and market = 5 then discount = 1200;
if sigsize = 1 and market = 7 then discount = 1350;
if sigsize = 5 and market = 3 then bid_y = bid  (range/4);
if sigsize = 5 and market = 5 then bid_y = bid  (range/3);
if sigsize = 5 and market = 7 then bid_y = bid  (3*range/8);
if sigsize = 1 and market = 3 then bid_y = bid;
if sigsize = 1 and market = 5 then bid_y = bid;
if sigsize = 1 and market = 7 then bid_y = bid;
predict = mid  discount;
diff=bidpredict;
proc sort;
by grpsize sigsize market;
proc glm;
class grpsize sigsize market;
model diff = grpsizesigsizemarket;
means grpsizesigsizemarket;
title 'OLS of diff by entitys and individuals (veteran winners) including bankrupt';
proc glm;
model bid = mid range;
by grpsize sigsize market;
title 'OLS of bid by mid and range (veteran winners) including bankrupt';
data;
set five;
if sigsize=1 and market=3;
proc reg;
model bid = mid;
restrict mid=1,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid (veteran winners) including bankrupt';
data;
set five;
if sigsize=1 and market=7;
proc reg;
model bid = mid;
restrict mid=1,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid (veteran winners) including bankrupt';
data;
set five;
if sigsize=5 and market=3;
proc reg;
model bid = mid range;
restrict mid=1,range=.25,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid and range (veteran winners) including bankrupt';
data;
set five;
if sigsize=5 and market=7;
proc reg;
model bid = mid range;
restrict mid=1,range=.375,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid and range (veteran winners) including bankrupt';
data five_a;
set five;
/* deleting all veteran bankrupt bidders from the point they went bankrupt onwards */
if (market=7 and grpsize=1 and sigsize=1 and xprnc=3 and session=1 and entity=6 and period>9) then delete;
if (market=7 and grpsize=1 and sigsize=1 and xprnc=3 and session=2 and entity=2 and period>7) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=3 and session=2 and entity=4 and period>8) then delete;
if (market=7 and grpsize=1 and sigsize=1 and xprnc=3 and session=1 and entity=4 and period>10) then delete;
if (market=3 and grpsize=1 and sigsize=1 and xprnc=3 and session=1 and entity=2 and period>5) then delete;
if (market=3 and grpsize=5 and sigsize=5 and xprnc=3 and session=1 and entity=2 and period>6) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=3 and session=1 and entity=1 and period>0) then delete;
if (market=7 and grpsize=1 and sigsize=1 and xprnc=3 and session=1 and entity=0 and period>8) then delete;
if (market=3 and grpsize=1 and sigsize=5 and xprnc=3 and session=5 and entity=1 and period>6) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=3 and session=2 and entity=0 and period>17) then delete;
if (market=3 and grpsize=5 and sigsize=1 and xprnc=3 and session=3 and entity=2 and period>3) then delete;
if (market=7 and grpsize=5 and sigsize=5 and xprnc=3 and session=2 and entity=6 and period>20) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=3 and session=3 and entity=1 and period>8) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=3 and session=1 and entity=5 and period>12) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=3 and session=1 and entity=0 and period>5) then delete;
if (market=7 and grpsize=5 and sigsize=5 and xprnc=3 and session=2 and entity=1 and period>4) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=3 and session=1 and entity=6 and period>28) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=3 and session=3 and entity=6 and period>16) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=3 and session=1 and entity=0 and period>8) then delete;
if (market=3 and grpsize=1 and sigsize=5 and xprnc=3 and session=5 and entity=0 and period>21) then delete;
if sigsize = 1 then high = signal;
if sigsize = 1 then low = signal;
theta=1800;
mid=(low+high)/2;
range=highlow;
if sigsize = 5 and market = 3 then discount = ((theta  (range/2))/2);
if sigsize = 5 and market = 5 then discount = (((theta  (range/2))/3)*2);
if sigsize = 5 and market = 7 then discount = (((theta  (range/2))/4)*3);
if sigsize = 1 and market = 3 then discount = 900;
if sigsize = 1 and market = 5 then discount = 1200;
if sigsize = 1 and market = 7 then discount = 1350;
if sigsize = 5 and market = 3 then bid_y = bid  (range/4);
if sigsize = 5 and market = 5 then bid_y = bid  (range/3);
if sigsize = 5 and market = 7 then bid_y = bid  (3*range/8);
if sigsize = 1 and market = 3 then bid_y = bid;
if sigsize = 1 and market = 5 then bid_y = bid;
if sigsize = 1 and market = 7 then bid_y = bid;
predict = mid  discount;
diff=bidpredict;
proc sort;
by grpsize sigsize market;
proc glm;
class grpsize sigsize market;
model diff = grpsizesigsizemarket;
means grpsizesigsizemarket;
title 'OLS of diff by entitys and individuals (veteran winners)';
proc glm;
model bid = mid range;
by grpsize sigsize market;
title 'OLS of bid by mid and range (veteran winners)';
data;
set five_a;
if sigsize=1 and market=3;
proc reg;
model bid = mid;
restrict mid=1,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid (veteran winners)';
data;
set five_a;
if sigsize=1 and market=7;
proc reg;
model bid = mid;
restrict mid=1,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid (veteran winners)';
data;
set five_a;
if sigsize=5 and market=3;
proc reg;
model bid = mid range;
restrict mid=1,range=.25,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid and range (veteran winners)';
data;
set five_a;
if sigsize=5 and market=7;
proc reg;
model bid = mid range;
restrict mid=1,range=.375,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid and range (veteran winners)';
data six;
set main;
if win=1;
if xprnc=2;
if market=3 or market=7;
if sigsize = 1 then high = signal;
if sigsize = 1 then low = signal;
theta=1800;
mid=(low+high)/2;
range=highlow;
if sigsize = 5 and market = 3 then discount = ((theta  (range/2))/2);
if sigsize = 5 and market = 5 then discount = (((theta  (range/2))/3)*2);
if sigsize = 5 and market = 7 then discount = (((theta  (range/2))/4)*3);
if sigsize = 1 and market = 3 then discount = 900;
if sigsize = 1 and market = 5 then discount = 1200;
if sigsize = 1 and market = 7 then discount = 1350;
if sigsize = 5 and market = 3 then bid_y = bid  (range/4);
if sigsize = 5 and market = 5 then bid_y = bid  (range/3);
if sigsize = 5 and market = 7 then bid_y = bid  (3*range/8);
if sigsize = 1 and market = 3 then bid_y = bid;
if sigsize = 1 and market = 5 then bid_y = bid;
if sigsize = 1 and market = 7 then bid_y = bid;
predict = mid  discount;
diff=bidpredict;
proc sort;
by grpsize sigsize market;
proc glm;
class grpsize sigsize market;
model diff = grpsizesigsizemarket;
means grpsizesigsizemarket;
title 'OLS of diff by entitys and individuals (intermediate winners) including bankrupt';
proc glm;
model bid = mid range;
by grpsize sigsize market;
title 'OLS of bid by mid and range (intermediate winners) including bankrupt';
data;
set six;
if sigsize=1 and market=3;
proc reg;
model bid = mid;
restrict mid=1,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid (intermediate winners) including bankrupt';
data;
set six;
if sigsize=1 and market=7;
proc reg;
model bid = mid;
restrict mid=1,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid (intermediate winners) including bankrupt';
data;
set six;
if sigsize=5 and market=3;
proc reg;
model bid = mid range;
restrict mid=1,range=.25,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid and range (intermediate winners) including bankrupt';
data;
set six;
if sigsize=5 and market=7;
proc reg;
model bid = mid range;
restrict mid=1,range=.375,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid and range (intermediate winners) including bankrupt';
data six_a;
set six;
/* deleting all intermediate bankrupt bidders from the point they went bankrupt onwards */
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=2 and entity=2 and period>2) then delete;
if (market=7 and grpsize=1 and sigsize=1 and xprnc=2 and session=2 and entity=5 and period>0) then delete;
if (market=3 and grpsize=1 and sigsize=5 and xprnc=2 and session=5 and entity=2 and period>26) then delete;
if (market=5 and grpsize=5 and sigsize=5 and xprnc=2 and session=1 and entity=3 and period>18) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=2 and session=2 and entity=4 and period>2) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=4 and entity=6 and period>20) then delete;
if (market=7 and grpsize=1 and sigsize=1 and xprnc=2 and session=2 and entity=1 and period>4) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=1 and entity=3 and period>2) then delete;
if (market=7 and grpsize=5 and sigsize=5 and xprnc=2 and session=1 and entity=5 and period>5) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=4 and entity=0 and period>3) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=2 and entity=4 and period>9) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=2 and session=1 and entity=0 and period>5) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=4 and entity=2 and period>15) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=2 and session=2 and entity=0 and period>3) then delete;
if (market=7 and grpsize=5 and sigsize=5 and xprnc=2 and session=1 and entity=3 and period>24) then delete;
if (market=3 and grpsize=5 and sigsize=1 and xprnc=2 and session=2 and entity=2 and period>0) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=2 and entity=3 and period>21) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=6 and entity=6 and period>7) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=6 and entity=4 and period>2) then delete;
if (market=7 and grpsize=1 and sigsize=1 and xprnc=2 and session=4 and entity=3 and period>7) then delete;
if (market=7 and grpsize=5 and sigsize=5 and xprnc=2 and session=2 and entity=5 and period>13) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=5 and entity=2 and period>8) then delete;
if (market=3 and grpsize=5 and sigsize=5 and xprnc=2 and session=3 and entity=2 and period>20) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=2 and session=1 and entity=2 and period>0) then delete;
if (market=3 and grpsize=1 and sigsize=1 and xprnc=2 and session=2 and entity=0 and period>5) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=5 and entity=5 and period>13) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=1 and entity=5 and period>13) then delete;
if (market=3 and grpsize=1 and sigsize=5 and xprnc=2 and session=5 and entity=0 and period>20) then delete;
if (market=3 and grpsize=5 and sigsize=1 and xprnc=2 and session=1 and entity=2 and period>0) then delete;
if (market=3 and grpsize=1 and sigsize=1 and xprnc=2 and session=1 and entity=1 and period>4) then delete;
if (market=7 and grpsize=5 and sigsize=1 and xprnc=2 and session=1 and entity=6 and period>7) then delete;
if (market=3 and grpsize=5 and sigsize=5 and xprnc=2 and session=1 and entity=2 and period>4) then delete;
if (market=3 and grpsize=5 and sigsize=1 and xprnc=2 and session=3 and entity=2 and period>2) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=3 and entity=2 and period>8) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=4 and entity=5 and period>6) then delete;
if (market=7 and grpsize=1 and sigsize=5 and xprnc=2 and session=3 and entity=3 and period>14) then delete;
if (market=7 and grpsize=1 and sigsize=1 and xprnc=2 and session=1 and entity=6 and period>16) then delete;
if (market=5 and grpsize=5 and sigsize=5 and xprnc=2 and session=1 and entity=4 and period>26) then delete;
if sigsize = 1 then high = signal;
if sigsize = 1 then low = signal;
theta=1800;
mid=(low+high)/2;
range=highlow;
if sigsize = 5 and market = 3 then discount = ((theta  (range/2))/2);
if sigsize = 5 and market = 5 then discount = (((theta  (range/2))/3)*2);
if sigsize = 5 and market = 7 then discount = (((theta  (range/2))/4)*3);
if sigsize = 1 and market = 3 then discount = 900;
if sigsize = 1 and market = 5 then discount = 1200;
if sigsize = 1 and market = 7 then discount = 1350;
if sigsize = 5 and market = 3 then bid_y = bid  (range/4);
if sigsize = 5 and market = 5 then bid_y = bid  (range/3);
if sigsize = 5 and market = 7 then bid_y = bid  (3*range/8);
if sigsize = 1 and market = 3 then bid_y = bid;
if sigsize = 1 and market = 5 then bid_y = bid;
if sigsize = 1 and market = 7 then bid_y = bid;
predict = mid  discount;
diff=bidpredict;
proc sort;
by grpsize sigsize market;
proc glm;
class grpsize sigsize market;
model diff = grpsizesigsizemarket;
means grpsizesigsizemarket;
title 'OLS of diff by entitys and individuals (intermediate winners)';
proc glm;
model bid = mid range;
by grpsize sigsize market;
title 'OLS of bid by mid and range (intermediate winners)';
data;
set six_a;
if sigsize=1 and market=3;
proc reg;
model bid = mid;
restrict mid=1,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid (intermediate winners)';
data;
set six_a;
if sigsize=1 and market=7;
proc reg;
model bid = mid;
restrict mid=1,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid (intermediate winners)';
data;
set six_a;
if sigsize=5 and market=3;
proc reg;
model bid = mid range;
restrict mid=1,range=.25,intercept=900;
by grpsize;
title 'Restricted regression of bid = mid and range (intermediate winners)';
data;
set six_a;
if sigsize=5 and market=7;
proc reg;
model bid = mid range;
restrict mid=1,range=.375,intercept=1350;
by grpsize;
title 'Restricted regression of bid = mid and range (intermediate winners)';
run;
quit;
