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

What is Tabulate.?Why we use it.? Which type of output we get from Tabulate.?

3 Answers   TCS,


what are informats in sas? : Sas-administrator

0 Answers  


how we can create optional or required parameters in SAS macro...

5 Answers   TCS,


how will you locate the sas platform applications? : Sas-bi

0 Answers  


%STPbegin;%STPEND; ERROR: No logical assign for filename _WEBOUT. WARNING: No body file. HTML output will not be created. unable to fix it.plz help

2 Answers  






what is portability of sas programmes?

2 Answers   Capital One,


what are methods to identify duplicate observations?

5 Answers   HCL,


If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?

0 Answers  


Describe the function and utility of the most difficult SAS macro that you have written?

0 Answers   Oracle,


What are the different types of sas functions?

0 Answers  


What is the difference between verification and validation?

9 Answers   Oracle,


Explain the difference between nodup and nodupkey options?

0 Answers  


Categories