Dear all,
proc means data=dsn noprint completetypes;
class trtmntgroup /preloadfmt;
output out=tot n=n;
format trtmntgroup trtf. ;
by vstgrp descending severity;
run;
This is the code I used for AE table. I got the values
without giving the variable ‘trtmntgroup(numeric)’ in var
statement. And if I give the var statement for that variable
i’m getting the same values.How is that possible? What is
the difference between class and var statement? Could any
one explain me how does proc means work at the back end.
And what is the difference between _freq_ value and N value
in proc means.
Thanks and regards,
Rajesh.
Answer Posted / vivek
Can use CLASS or BY. However if BY is used then the dataset
should be sorted first.
The _FREQ_ variable is automatically generated by SAS and
shows the number of observations for each level of the
CLASS variable.
The _N_ variable is automatically generated by SAS. It is
initially set to 1, and it increments by 1 every time the DATA
step iterates.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How would you identify a macro variable? : sas-macro
Enlist the functions performed by sas.
Mention the difference between ceil and floor functions in sas?
Describe a time when you were really stuck on a problem and how you solved it?
Mention common programming errors committed in sas ?
what is sas metadata repository? : Sas-bi
what is sas business intelligence? : Sas-bi
What is Linear Regression?
What are the table names in oracle database...?
what is the use of sas management console? : Sas-di
Give e an example of..
what are the types of interactive display types? : Sas-bi
what is the Population you used in your project, is it ITT or PP?
How to create list output for cross-tabulations in proc freq?
Approximately what date is represented by the SAS date value of 730?