ST 610N -- Fall 2006 Homework 1 Due Tuesday, 12 September 2006 EXERCISE Use the following data that's also in the file infmnc2k.dat in the class directory. Write a SAS program to read in the county name and lots of information relevant to understanding patterns of infant mortality in North Carolina: county name cols 1-12 white infant deaths 13-16 nonwhite infant deaths 17-21 total infant deaths 22-27 white births 28-33 nonwhite births 34-39 total births 40-45 high school graduation rate (%) 46-51 unemployment rate (%) 52-56 per capita personal income ($) 57-62 median family income ($) 63-68 ALAMANCE 13 17 30 1510 392 1902 67.9 2.8 26679 53100 BUNCOMBE 17 6 23 2318 279 2597 74.5 2.6 27393 46800 WAYNE 11 9 20 1104 659 1763 71.2 4.0 20050 43200 WILSON 3 8 11 609 471 1080 62.2 7.0 24550 47000 a) Create a SAS dataset with the county name (COUNTY) and the three economic variables (UNEMP, PCPI, MFAMINC). Include three new variables: BIG indicates that a county has a large number of births (>5000) INFMOR gives the infant mortality rate (deaths/1000 births) FNW gives the fraction of births that are nonwhite (nwb/births) b) Include code to do some checks on the data -- the two death counts should add up, as well as the two counts for births. c) Print the data using PROC PRINT and include an appropriate title. The syntax of a TITLE statement is TITLE ' -text- ' ; The quote is the right single quote mark, on many keyboards it's on the same key as the double quote ", and -text- stands for any text you want to put in. Print just the following variables (and in this order): county name, infant mortality rate, BIG, and the three economic variables (UNEMP, PCPI, MFAMINC). (If you created a variable to do the checks, you can include this in your list -- but try to do the checks without printing anything out.) d) Use the code PROC PLOT DATA=whatever ; PLOT INFMORT*PCPI ; to plot the infant mortality versus pcpi. Notice that you cannot determine the county. Now try PROC PLOT DATA=whatever; PLOT INFMORT*PCPI=COUNTY; (You may want to adjust the page size for these plots -- OPTIONS PS=40 ; uses 40 lines for a SAS output page.) FOR ALL EXERCISES: Hand in (1) Your program (2) Your output