ST 590G -- Computation for Data Analysis First Assignment -- due Thursday, 01 September 2011 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.) 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 number. The file 'UMTMVS.txt' was obtained from FRED, and holds monthly values of a manufacturing index in tab-delimited format. d) Read in these data and create a dataset with variables MFG and a time/date variable. e) Plot the manufacuring index versus time/date. f) Put these two datasets together via merge/by. g) Regress your CO2 value on the manufacturing index. Report the results and comment on the fit. FOR ALL EXERCISES: Hand in (1) Your program * With at least as many comments as you have toes! * (2) Your output (3) The answers to any questions asked.