Question: How do I switch the do loops that create surgical and nonsurgical, so that nonsurgical is displayed fully. There should be: 26 surgical/yes 1260 surgical/no

How do I switch the do loops that create "surgical" and "nonsurgical", so that "nonsurgical" is displayed fully.

There should be:

26 surgical/yes

1260 surgical/no

19 nonsurgical/yes

802 nonsurgical/no

For a total of 2017 rows but I only get 1887 rows with my data..

Please helppp!

data method4;

do counter=1 to 26;

response='yes';

group='surgical';

output;

end;

do counter=1 to 1260;

response='no';

group='surgical';

output;

end;

do counter=1 to 19;

response='yes';

group='nonsurgical';

output;

end;

do counter=1 to 802;

response='no';

group='nonsurgical';

output;

end;

run;

proc print data=method4;

run;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!