/* Data and SAS code to accompany the article "The relationship between toothlessness and income in seniors" by Rick Wicklin, published 24Jul2015, on The DO Loop blog http://blogs.sas.com/content/iml/2015/07/24/income-vs-toothless.html Inspired by Robert Allison's blog post "Only brush the teeth you want to keep", published 23Jul2015, http://blogs.sas.com/content/sastraining/2015/07/23/only-brush-the-teeth-you-want-to-keep/ */ data Teeth; input State $20. pct LCL UCL StdErr N; informat pct PERCENT8.1 LCL PERCENT8.1 UCL PERCENT8.1 StdErr PERCENT8.1 N COMMA5.; format pct PERCENT6.; label pct = "Percent of Seniors"; datalines; Alabama 27.2% 23.8% 30.6% 1.7% 813 Alaska 23.6% 16.9% 30.3% 3.4% 262 Arizona 14.3% 11.5% 17.1% 1.4% 1,400 Arkansas 22.7% 20.4% 25.0% 1.2% 1,558 California 14.0% 10.9% 17.1% 1.6% 1,316 Colorado 12.9% 10.9% 14.9% 1.0% 1,238 Connecticut 12.8% 11.1% 14.5% 0.8% 2,191 Delaware 17.8% 14.9% 20.7% 1.5% 992 District of Columbia 20.8% 16.9% 24.7% 2.0% 789 Florida 17.4% 15.7% 19.1% 0.9% 3,109 Georgia 21.5% 19.0% 24.0% 1.3% 1,721 Hawaii 9.6% 7.6% 11.6% 1.0% 1,433 Idaho 19.7% 17.1% 22.3% 1.3% 1,217 Illinois 19.3% 16.6% 22.0% 1.4% 1,270 Indiana 21.2% 18.9% 23.5% 1.2% 1,551 Iowa 19.8% 17.6% 22.0% 1.1% 1,476 Kansas 19.1% 17.3% 20.9% 0.9% 2,161 Kentucky 38.9% 35.9% 41.9% 1.6% 1,628 Louisiana 28.9% 26.3% 31.5% 1.3% 1,473 Maine 26.2% 22.9% 29.5% 1.7% 912 Maryland 16.2% 14.0% 18.4% 1.1% 2,131 Massachusetts 17.2% 15.5% 18.9% 0.9% 3,012 Michigan 17.3% 15.1% 19.5% 1.1% 1,394 Minnesota 18.6% 16.1% 21.1% 1.3% 1,051 Mississippi 31.5% 28.9% 34.1% 1.3% 1,643 Missouri 24.1% 21.0% 27.2% 1.6% 1,513 Montana 18.2% 15.9% 20.5% 1.2% 1,474 Nebraska 18.6% 16.7% 20.5% 1.0% 2,234 Nevada 18.4% 14.6% 22.2% 1.9% 802 New Hampshire 18.6% 16.3% 20.9% 1.2% 1,347 New Jersey 18.2% 16.6% 19.8% 0.8% 3,666 New Mexico 23.8% 21.3% 26.3% 1.3% 1,588 New York 17.5% 15.3% 19.7% 1.1% 1,521 North Carolina 22.6% 21.0% 24.2% 0.8% 4,045 North Dakota 22.9% 20.1% 25.7% 1.4% 1,327 Ohio 21.6% 17.8% 25.4% 1.9% 1,560 Oklahoma 28.3% 26.1% 30.5% 1.1% 2,091 Oregon 15.9% 13.7% 18.1% 1.1% 1,233 Pennsylvania 23.9% 21.5% 26.3% 1.2% 3,547 Rhode Island 17.9% 15.6% 20.2% 1.2% 1,211 South Carolina 23.0% 20.8% 25.2% 1.1% 2,354 South Dakota 21.4% 19.3% 23.5% 1.1% 1,909 Tennessee 34.9% 31.1% 38.7% 1.9% 1,094 Texas 18.6% 15.8% 21.4% 1.4% 1,689 Utah 14.8% 12.3% 17.3% 1.3% 1,014 Vermont 19.7% 17.7% 21.7% 1.0% 1,742 Virginia 14.4% 12.0% 16.8% 1.2% 1,223 Washington 15.4% 14.3% 16.5% 0.6% 6,337 West Virginia 40.5% 37.2% 43.8% 1.7% 1,005 Wisconsin 16.9% 14.4% 19.4% 1.3% 1,055 Wyoming 20.1% 17.6% 22.6% 1.3% 1,165 ; data income; input state $20. income; informat income COMMA6.; format income DOLLAR7.; label income = "Median Income"; datalines; Alabama 43,922 Alaska 60,643 Arizona 50,230 Arkansas 42,001 California 56,634 Colorado 62,538 Connecticut 69,132 Delaware 57,802 District of Columbia 59,023 Florida 46,899 Georgia 47,375 Hawaii 62,384 Idaho 49,711 Illinois 53,322 Indiana 47,664 Iowa 52,191 Kansas 48,500 Kentucky 42,598 Louisiana 42,050 Maine 51,338 Maryland 69,964 Massachusetts 65,338 Michigan 50,033 Minnesota 57,893 Mississippi 41,664 Missouri 48,180 Montana 42,909 Nebraska 56,849 Nevada 51,713 New Hampshire 69,712 New Jersey 65,920 New Mexico 45,852 New York 52,816 North Carolina 46,825 North Dakota 56,434 Ohio 47,634 Oklahoma 48,119 Oregon 53,715 Pennsylvania 51,656 Rhode Island 52,969 South Carolina 43,033 South Dakota 48,682 Tennessee 42,510 Texas 50,649 Utah 59,027 Vermont 56,734 Virginia 64,674 Washington 59,442 West Virginia 44,509 Wisconsin 53,856 Wyoming 56,114 ; data all; merge teeth income; by state; run; proc corr data=all; var income pct; run; title "All Teeth Extracted vs. Median Income"; proc sgplot data=all; scatter x=income y=pct / yerrorlower=LCL yerrorupper=UCL; loess x=income y=pct; run; proc sgplot data=all; scatter x=income y=pct / datalabel=state; loess x=income y=pct; run;