ST 445 -- Summer 2013 Homework #4 -- Due MONDAY, 10 June 2013 Measurements of atmospheric carbon dioxide are in nine files in the directory 'csiro' according to nine stations. All of these files have a long descriptive header, but the lengths vary. Below is the list of stations, file names, and the length of the header. Alert alt_mm.dat 16 Cape Ferguson cferg_mm.dat 16 Cape Grim cgrim_mm.dat 16 Estevan Point estpo_mm.dat 17 Macquarie Island macq_mm.dat 16 Mawson mawson_mm.dat 16 Mauna Loa mlo_mm.dat 16 Shetland Islands shetland_mm.dat 16 South Pole spo_mm.dat 16 All stations end in 2001, except for Alert which ends in 2006. For more information about these data, see http://cdiac.ornl.gov/trends/co2/csiro These files all have the following format: a header, then the data, then a footer with more explanatory information. The body of the data has a column for the year, then twelve columns of monthly values, and the annual average column for a total of 14 columns. These values are *tab-delimited* so use 'dsd' and 'dlm' in your infile statement. Read in the data from one station and perform the following tasks: a) Create a dataset with each observation corresponding to a month, with variables YEAR, MONTH (numeric), and CO2. Also create a time or date variable that properly indexes the data. b) Plot CO2 versus time/date. c) Check whether given the annual averages match (close enough) the sample mean from the monthly values. (Note the given annual average is missing for a year if any monthly value is missing.) d) What month has the highest average carbon dioxide? e) Using a simple linear regression model with year and annual averages, estimate the annual rate of change (slope) (and give a standard error). (You may want to create a different dataset to do this part.) Which station to read? Use the last digit of your student id and take the stations in numeric order: Alert (1), Cape Ferguson (2), ..., South Pole (9). If you have a 0 in your student id, use the last nonzero digit. FOR ALL EXERCISES: Hand in (paper) (1) The answers to any questions asked. (2) Your program * With at least as many comments as you have toes! * (3) Your output