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

How would you code the criteria to restrict the output to be produced?

6 Answers   Accenture,


If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?

2 Answers  


What do the put and input function do?

0 Answers  


Name statements that function at both compile and execution time.

3 Answers   L&T,


What is LAG function?How is it used? can any one explain

3 Answers   TRE, Verinon Technology Solutions,






Mention how to limit decimal places for the variable using proc means?

0 Answers  


Did you used proc lifetest? when?

2 Answers   Accenture, Parexel, Quintiles,


What’s the difference between var b1 – b3 and var b1 — b3?

0 Answers  


WHAT IS LAG FUNCTION ? WHERE CAN YOU IMPLEMENT THIS FUNCTION?

3 Answers   IBM, Zensar,


how would you determine the number of missing or nonmissing values in computations? : Sas programming

0 Answers  


Can you excute a macro within a macro? Describe.

3 Answers  


What are the automatic variables for macro? : sas-macro

0 Answers  


Categories