Code a PROC MEANS that shows both summed and averaged
output of the data.
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / sumit
proc means data=work.emp sum mean;
class deptno;
var sal;
run;
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / venkatesh.layam
proc means data=sashelp.calss means sum=total;
class gender;
var age;
run;
| Is This Answer Correct ? | 0 Yes | 3 No |
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 |
What is the difference between Regression and Logistic Regression? Can u explain the Assumptions/Conditions?
How to read an input file in sas?
What is interleaving in SAS?
How would you include common or reuse code to be processed along with your statements?
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
How to get second top scorer student from a class- table having different sections A, B, C & D? each section has same number of student.
How would you generate 1000 observations from a normal distribution with a mean of 50 and standard deviation of 20. How would you use PROC CHART to look at the distribution? Describe the shape of the distribution.
What versions of SAS have you used (on which platforms)?
how can you code the confidence intervals?
6 Answers Cytel, IIT, Ranbaxy,
what is sas olap server? : Sas-di
if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation