Contributor
Posts: 20

# Frequency distribution

[ Edited ]

I have the below shown parts data that shows the increase/decrease in usage.

 Part usage change ABC5601 10% ABC7551 -5% ABC8206 15%

I want to create a frequency distribution as below.

 distribution Part count 1% to 5% 5 6% to 10% 15 (5%) to (1%) 10

Is there any sas proc that takes the interval value as input and create a freq distribution table ?

Super User
Posts: 13,498

## Re: Frequency distribution

@KrisNori wrote:

I have the below shown parts data that shows the increase/decrease in usage.

 Part usage change ABC5601 10% ABC7551 -5% ABC8206 15%

I want to create a frequency distribution as below.

 distribution Part count 1% to 5% 5 6% to 10% 15 (5%) to (1%) 10

Is there any sas proc that takes the interval value as input and create a freq distribution table ?

You may have to provide a little more data such as input that would allow use to create the example output from.

If your "usage change" is a numeric variable this might be possible with proc freq and a custom format to create groups of values based on those values. Some concerns would arise on where the endpoints of your "distribution" column appears as I would expect that unless the values of that "usage change" have been rounded that you might have values like 5.4% (or 0.54) . So where the endpoint values for given display "range" should be would need some clarification.

Super User
Posts: 23,659

## Re: Frequency distribution

@KrisNori wrote:

Is there any sas proc that takes the interval value as input and create a freq distribution table ?

PROC FREQ and apply a format on the value.

``````*create the format;
proc format;
value age_group
low - 13 = 'Pre-Teen'
13 - 15 = 'Teen'
run;

*Summarize data
proc freq data=sashelp.class;
table age / out=want;
format age age_group.;
run;``````

The want data set has the summarized data in a data set. Do note that the variable AGE has the underlying values still present but a format applied which can be confusing at first if you're just starting out with formats.

Discussion stats
• 2 replies
• 97 views
• 2 likes
• 3 in conversation