Code a PROC MEANS that shows both summed and averaged
output of the data.

Answers were Sorted based on User's Feedback



Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / 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

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / sreekanth rao

please correct me if my thought process is wrong.

question is to show only sum and avg...

proc means data=test sum mean;
by var (optional);
run;

here we are req only for sum mean. use out=new data set
name to print most recent data set.

Thanks

hi friends expecting the ansewrs.


Thanks
Sreekanth rao

Is This Answer Correct ?    3 Yes 5 No

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / sumit

proc means data=work.emp sum mean;
class deptno;
var sal;
run;

Is This Answer Correct ?    0 Yes 2 No

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / venkatesh.layam

proc means data=sashelp.calss means sum=total;
class gender;
var age;
run;

Is This Answer Correct ?    0 Yes 3 No

Code a PROC MEANS that shows both summed and averaged output of the data. ..

Answer / srini

Proc Means data=test noprint;
var var1 var2(optional)
output out=newdataset
sum= mean=;
run;

Is This Answer Correct ?    0 Yes 8 No

Post New Answer

More SAS Interview Questions

The below code we are using for creating more than one macro variables in proc sql using into clause. How we can use same code to create macro variables vara, varb, varc instead of var1, var2, var3.? proc sql noprint; select count(distinct(patient)) into :var1 - :var3 from dataset1 group by trtreg1c ; quit;

1 Answers   Accenture,


How would you include common or reuse code to be processed along with your statements?

3 Answers   Accenture,


explain about sas business intelligence? : Sas-bi

0 Answers  


Does anybody has SAS Platform Administration certification dumps. pls send to hariithepalli@gmail.com

0 Answers  


You have a data set of 100 observations,how can you restrict the output so that the output has only data from row no. 10 to row no. 20

9 Answers  


Mention few ways with which a “table lookup’ is done in sas programming.

1 Answers  


what is the difference between proc report and proc format?

7 Answers   CTS,


what are different analysis datasets you created and what are the new variables created

2 Answers   Sciformix,


What is PDV?

0 Answers  


How to read an input file in sas?

0 Answers  


Diff between proc sql merge and join?

1 Answers   HSBC, Sristek,


/* To determine the maximum and minimum of V1 */ data before3; input v1 v2 v3; cards; 3 2 1 4 6 5 2 1 3 6 5 4 1 3 2 5 4 6 ; run;

5 Answers  


Categories