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 are the criticality that you have faced during your project in SAS?
Which is Best Institute for learning SAS BASE & SAS BI in Hyderabad? Can anyone suggest me ?
i have a data set with 20 observations i want label from 8 to 15 observations ? how you create this one.
what is the difference between floor and ceil functions in sas? : Sas-administrator
how to add distinctly var variable values ex.. Data a; input var; datalines; 0 1 2 3 -1 -2 -3 ; run; adding all +ve value in one varibale n do the same for -ve too
In the flow of DATA step processing, what is the first action in a typical DATA Step?
What is Linear Regression?
How to include or exclude specific variables in a data set?
What are the efficacy variables in your study?
2 Answers Accenture, Quintiles,
Mention few capabilities of sas framework.
What are the ways in which macro variables can be created in sas programming?
how do you derive descriptive statistics?
1 Answers Accenture, Quintiles,