I have the university edition of SAS. I have data from treatment groups A, B, and C. I am trying to use DO loops to process the groups separately for comparison. I can do it in one nested DO loop when the data lengths are the same. But these groups have different numbers of observations and I am running into trouble. Here is my code:
data AirPoll1 (keep = Group Ozone);
label Group = "Treatment Group";
label Ozone = 'Ozone level (in ppb)';
do i=1 to 1;
input Group $@@
do j=1 to 15;
input Ozone @@;
output;
end;
end;
do i=1 to 1;
input Group $ @@;
do j=1 to 10;
input Ozone @@;
output;
end;
end;
do i=1 to 1;
input Group $ @@;
do j=1 to 11;
input Ozone @@;
output;
end;
end;
datalines;
A 4 6 3 4 7 8 2 3 4 1 8 9 5 6 3
B 5 3 6 2 1 2 4 3 2 4
C 8 9 7 8 6 7 6 7 9 8 9
;
run;
proc univariate data = AirPoll1;
Var Ozone;
by Group;
histogram Ozone;
run;
The error I am getting is:
ERROR 161-185: No matching DO/SELECT statement.
Is there a quick way to fix this?
do i=1 to 1; input Group $@@**;**- kl78