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 |
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
sas implimented companies in hyderabad
How to do user inputs and command line arguments in SAS? D&B
DATA ABC; INPUT TDATE DATE9. AVG; CARDS; 18APR2008 150.00 19APR2008 167.00 20APR2008 123.00 21APR2008 145.00 ; RUN HOW CAN I FIND THE DIFFERENCE BETWEEN AVG OF 18APR2008 ANF 21APR2008?? IF ANY ONE GETS IT PLS TRY TO POST IT.
8 Answers Verinon Technology Solutions,
define table lookup and how may ways it can be done...explian
How do you read in the variables that you need?
If a variable contains letters or special characters, can it be numeric data type?
Of all your work, where have you been the most successful?
What sas features do you use to check errors and data validation?
Describe the function and untility of the most difficult SAS macro that you have written.
what is washout period?
If you were told to create many records from one record show how you would do this using arrays and with PROC TRANSPOSE?