/* HouseholdIncome2014.sas */ /* Table HINC-06. Income Distribution to $250,000 or More for Households: 2014 */ /* Source: U.S. Census Bureau, Current Population Survey, 2015 Annual Social and Economic Supplement. */ /* (Numbers in thousands. Households as of March of the following year.) */ /* data below */ data income; input number incomemidpt; fraction = number/124585; fraction1 = fraction*(incomemidpt <= 200000); fraction2 = fraction*(incomemidpt >= 200000); number1 = number*(incomemidpt <= 200000); number2 = number*(incomemidpt >= 200000); indicate1 = (incomemidpt <= 200000); indicate2 = (incomemidpt >= 200000)/5; percent1 = fraction1*100; percent2 = fraction2*100; percent = percent1 + percent2; lower = incomemidpt - 2500; upper = incomemidpt + 2499; if incomemidpt = 225000 then lower = 200000; if incomemidpt = 225000 then upper = 249999; if incomemidpt = 275000 then lower = 250000; if incomemidpt = 275000 then upper = .; cards; 4571 2500 4320 7500 6766 12500 6779 17500 6865 22500 6363 27500 6232 32500 5857 37500 5430 42500 5060 47500 5084 52500 4220 57500 4477 62500 3709 67500 3737 72500 3484 77500 3142 82500 2750 87500 2665 92500 2339 97500 2679 102500 2070 107500 1922 112500 1623 117500 1863 122500 1452 127500 1512 132500 1219 137500 1290 142500 1024 147500 1146 152500 848 157500 875 162500 786 167500 717 172500 607 177500 619 182500 556 187500 485 192500 436 197500 3249 225000 3757 275000 ; /* -----------------------------------------------------*/ /* some modifications to basic histograms */ /* 1. input bin midpoints and counts */ /* 2. overlay histograms to obtain different bin widths */ /* -----------------------------------------------------*/ proc sgplot data=income; title 'income distribution SCALING corect!'; title2 'count is count per 10000 width'; histogram incomemidpt / binwidth=10000 binstart=5000 boundary=upper scale=count datalabel=count freq=number1 weight=indicate1 fillattrs=(color=lightblue); histogram incomemidpt / binwidth=50000 binstart=225000 boundary=upper scale=count datalabel=count freq=number2 weight=indicate2 fillattrs=(color=lightblue); proc print data=income; var lower upper incomemidpt number percent; title 'income distribution: interval midpoint, number of households, percentage'; proc means data=income sum; var number percent; /* proc sgplot data=income; title 'income distribution SCALING wrong!'; histogram incomemidpt / binwidth=10000 binstart=5000 boundary=upper scale=count datalabel=count freq=number; density incomemidpt / type=kernel freq=number; proc sgplot data=income; title 'income distribution graphics experiment'; histogram incomemidpt / binwidth=10000 binstart=5000 boundary=upper scale=percent datalabel=percent freq=number; density incomemidpt / type=kernel freq=number; */ /* Income of Household Number mean StdError Total 124,587 75,738 446 Under $5,000 4,571 1,080 41 $5,000 to $9,999 4,320 7,936 31 $10,000 to $14,999 6,766 12,317 25 $15,000 to $19,999 6,779 17,338 27 $20,000 to $24,999 6,865 22,162 28 $25,000 to $29,999 6,363 27,101 30 $30,000 to $34,999 6,232 32,058 32 $35,000 to $39,999 5,857 37,061 31 $40,000 to $44,999 5,430 41,979 30 $45,000 to $49,999 5,060 47,207 31 $50,000 to $54,999 5,084 51,986 37 $55,000 to $59,999 4,220 57,065 35 $60,000 to $64,999 4,477 62,016 39 $65,000 to $69,999 3,709 67,081 40 $70,000 to $74,999 3,737 72,050 35 $75,000 to $79,999 3,484 77,023 38 $80,000 to $84,999 3,142 81,966 40 $85,000 to $89,999 2,750 87,101 40 $90,000 to $94,999 2,665 92,033 42 $95,000 to $99,999 2,339 97,161 39 $100,000 to $104,999 2,679 101,921 43 $105,000 to $109,999 2,070 107,187 54 $110,000 to $114,999 1,922 112,069 55 $115,000 to $119,999 1,623 117,133 56 $120,000 to $124,999 1,863 122,127 54 $125,000 to $129,999 1,452 127,166 60 $130,000 to $134,999 1,512 131,863 54 $135,000 to $139,999 1,219 137,284 58 $140,000 to $144,999 1,290 142,199 62 $145,000 to $149,999 1,024 147,130 63 $150,000 to $154,999 1,146 151,940 68 $155,000 to $159,999 848 157,177 75 $160,000 to $164,999 875 162,019 85 $165,000 to $169,999 786 167,101 80 $170,000 to $174,999 717 172,169 87 $175,000 to $179,999 607 177,187 91 $180,000 to $184,999 619 182,055 81 $185,000 to $189,999 556 187,299 102 $190,000 to $194,999 485 192,241 113 $195,000 to $199,999 436 197,211 100 $200,000 to $249,999 3,249 220,267 381 $250,000 and over 3,757 402,476 6,023 */