data misc_train;
set seq1 end=eof;
length data $ 5;
if eof then do;
depth = &i;
data='Train';
output;
end;
label depth='Tree Depth';
label data='Data';
label _misc_='Misclassification Rate';
keep depth data _misc_;
run;
data misc_test;
set scoreout nobs=nobs end=eof;
length data $ 5;
retain misc_num 0;
if u_bad ne bad then misc_num+1;
if eof then do;
depth = &i;
data='Test';
_misc_=misc_num/nobs;
output;
end;
keep depth data _misc_;
run;
proc append base=misc data=misc_train force nowarn;
run;quit;
proc append base=misc data=misc_test force nowarn;
run;quit;