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


Please Help Members By Posting Answers For Below Questions

How sas treats the dsd delimiters?

730


What is the maximum length of the macro variable? : sas-macro

633


which features do you use to check the data validations and errors? : Sas-administrator

556


How to create an external dataset with sas code?

596


data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

1807






what is SAS OPTIMIZATION?

1823


what are sas/access and sas/connect? : Sas programming

558


What is maximum storage capability of SAS?

913


What is the sas data set? : sas-grid-administration

582


Tell me about % include and % eval? : sas-macro

689


sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately

3118


Differentiate between format and informat? : sas-grid-administration

589


What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

693


What is the order of application for output data set options, input data set options and SAS statements?

1091


Differentiate between ceil and floor functions.

670