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 treatment emergent events and treatment emregent adverse event

0 Answers  


Explain data step in SAS

0 Answers  


firstobs and obs are working only option wise,but we are using infile statement with firstobs and obs in a statement wise? so firstobs,obs working at options and statemnts or not?

1 Answers  


When you will use nowd option in report???

6 Answers   Accenture,


What do you feel about hardcoding?

4 Answers   Oracle,






Under what circumstances would you code a SELECT construct instead of IF statements?

4 Answers  


Why is SAS considered self-documenting?

1 Answers   Quintiles,


what are sas bi dashboard components? : Sas-bi

0 Answers  


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

0 Answers  


What statement do you code to tell SAS that it is to write to an external file? What statement do you code to write the record to the file?

2 Answers   Accenture,


Describe a time when you were really stuck on a problem and how you solved it?

0 Answers   DELL,


What are common programming errors committed in sas

0 Answers  


Categories