BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Obsidian | Level 7

## Frequency and Percent Frequency table with class width

Hi, how do I create a frequency and a percent frequency table with a class width of 5 (i.e. 65.0-69.9) for median income using SAS 9.4

 State MedianIncome Alabama 76.2 Alaska 98.4 Arizona 79.7 Arkansas 70.9 California 91.2 Colorado 89.3 Connecticut 107.5 Delaware 90.2 Florida 75.5 Georgia 79.7 Hawaii 89.7 Idaho 67.1 Illinois 89.7 Indiana 76.7 Iowa 81.3 Kansas 79.9 Kentucky 76.4 Louisiana 82.6 Maine 77.8 Maryland 108.5 Massachusetts 106.8 Michigan 81 Minnesota 89.9 Mississippi 70.4 Missouri 77 Montana 73.6 Nebraska 78.3 Nevada 75.1 New Hampshire 93.9 New Jersey 110.7 New Mexico 77.6 New York 95.2 North Carolina 76.5 North Dakota 87 Ohio 80.9 Oklahoma 74.5 Oregon 78.7 Pennsylvania 86.8 Rhode Island 94.9 South Carolina 77.1 South Dakota 72 Tennessee 73.4 Texas 82 Utah 75 Vermont 83.1 Virginia 97.2 Washington 91.6 West Virginia 76.8 Wisconsin 82.3 Wyoming 87.9
1 ACCEPTED SOLUTION

Accepted Solutions
Diamond | Level 26

## Re: Frequency and Percent Frequency table with class width

Use custom formats and then PROC FREQ.

``````proc format;
value inc 60-<65 = '60-64.9' 65-<70='65-69.9' /*etc.*/
;
run;
proc freq data=have;
tables median_income;
format median_income inc.;
run;``````
--
Paige Miller
1 REPLY 1
Diamond | Level 26

## Re: Frequency and Percent Frequency table with class width

Use custom formats and then PROC FREQ.

``````proc format;
value inc 60-<65 = '60-64.9' 65-<70='65-69.9' /*etc.*/
;
run;
proc freq data=have;
tables median_income;
format median_income inc.;
run;``````
--
Paige Miller
Discussion stats
• 1 reply
• 278 views
• 1 like
• 2 in conversation