I have a data set I am trying to get averages (of two difference variables) for by day. I have been succesfful in the past with the below code but after adding some more variables and merging more data, I am not getting averages for every day. It does it for some but not for all. It appears that on days when I am missing values for that variable, and thus the mean should be ".", it is leaving them separate. What can i do? Below is my code.
proc sort data=sows;by a b c d e;
Run;
proc means Noprint data=example;
by a b c d e;
Var x y;
Output Out=Totals
MEAN (x y) = xavrg yavrg;
Run;
Proc print data=Totals;
run;
data example; set Totals (keep=a b c d e xavrg yavrg);
Proc Print data=example;
run;
Thanks
... View more