Code a PROC MEANS that shows both summed and averaged
output of the data.
Answer Posted / amit nakrani
I think we can do it in following way. Please correct me if
it is wrong.
proc means noprint data = sourcedata;
var var1 var2;
by var3;(optional)
output out = newdata
sum(var1,var2) = SumVar1 SumVar2
mean(var1,var2) = MeanVar1 MeanVar2;
run;
proc print data = newdata;
run;
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
How can sas program be validated?
What are the automatic variables for macro? : sas-macro
how many display types available in sas bi dashboard? : Sas-bi
What is the role of administrative users? : sas-grid-administration
what is the purpose of _error_? : Sas programming
Have you ever used the SAS Debugger?
explain the proc in sas? : Sas-administrator
What is the differnce between SDTM 3.1.2 to 3.1.1 version
What are pdv and it functions?
What are the features of SAS?
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
Where do you use proc means over proc freq?
what is null hypothesis? why do you consider that?
How do you convert basic cube to transaction cube and transaction cube to basic cube?
What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro