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.



Dear all, proc means data=dsn noprint completetypes; class trtmntgroup /preloadfmt; output..

Answer / 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

More SAS Interview Questions

what is the difference between informat$8. $char8.

3 Answers   SAS,


How are the analysis data sets structured?

3 Answers  


What Proc glm does?

0 Answers  


i have a dataset with 25 obs; 10th obs has like ramu,anji,ramu,azad,ramu like this. i want to know how many times the word repeats in that obs?

3 Answers  


explain the main difference between the nodup and nodupkey options? : Sas-administrator

0 Answers  






If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?

10 Answers   Accenture,


Which are SAS Windows Clients & SAS Java Clients

3 Answers   TCS,


How would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable?

1 Answers   Quintiles,


is there any differnce between proc means and proc summary?

5 Answers  


What can be the size of largest dataset in SAS?

0 Answers  


What is the role of administrative users? : sas-grid-administration

0 Answers  


How do dates work in SAS data?

0 Answers  


Categories