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


Please Help Members By Posting Answers For Below Questions

what is hierarchy flattening? : Sas-di

614


What is the difference between where and if statement?

613


what is data access? : Sas-di

599


What are the five ways to do a table lookup in sas? : sas-grid-administration

586


what other sas products have you used and consider yourself proficient in using? : Sas programming

679






Are you involved in writing the inferential analysis plan? Tables specifications?

3476


Can you execute a macro within a macro? Describe. : sas-macro

667


Describe the ways in which you can create a macro variable?

618


Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?

1766


why is sas data integration studio important? : Sas-di

557


For what purpose would you use the RETAIN statement?

1038


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

576


how to debug and test the sas program? : Sas-administrator

569


what is hash files in sas and why we are using this one in sas?

1722


Hi, If anyone has base SAS certification dumps, please share.

1381