As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


FREQ and WEIGHT Statements

From sasCommunity
Jump to: navigation, search

Issues

What is the difference?

Which procedures support which statements?

Where are the inconsistencies?

Example

Data:

data demo;
input FW Value;
cards;
1 1
2 3
;

Using FW as the FREQ variable, as in

proc means data=demo n mean var;
var value;
freq fw;
run;

produces

         Analysis Variable : Value                  
N Mean Variance -------------------------------------------- 3 2.3333333 1.3333333 --------------------------------------------

Using FW as the WEIGHT variable, as in

proc means data=demo n mean var;
var value;
weight fw;
run;

produces

    Analysis Variable : Value                  
N Mean Variance --------------------------------- 2 2.3333333 2.6666667 ---------------------------------

Discussion Search

Documentation Links