ST 445 -- SUMMER I, 2012 HOMEWORK #4 -- DUE WEDNESDAY 13 JUNE 2012 J. K. Angell compiled radiosonde measurements for many years to examine the patterns of temperature change in the atmosphere. One compilation has five regions of the earth (and associated files): north polar npolar.txt north temperate ntemp.txt tropical trop.txt south temperate stemp.txt south polar spolar.txt Measurements are in degrees C, deviations from climatological mean. The first 3 files have a 24 line header; headers in the last two are 26 lines long. One year corresponds to a record, with four seasons (winter, spring, summer, autumn) for each year, with four levels of the atmosphere (surface, troposphere (850-300mb), tropopause (300-100mb), lower stratosphere (100-50mb), delineated by pressure (mb=millibars). So on each record is the year, the four seasons and annual average for surface, four seasons and annual for troposphere, etc, finishing with four seasons and annual for lower stratosphere: year win spr sum aut ann win spr sum....sum aut ann so a total for 1+4*(4+1) = 21 columns of data. For further information see the site http://cdiac.ornl.gov/trends/temp/angell/angell.html Read in the data from ONE of the five regions and perform the following tasks: a) Create a dataset for the SURFACE ONLY with each observation corresponding to a season/quarter, with variables YEAR, QTR (numeric)(quarter/season), and SURF. Also create a time or date variable that properly indexes the data. (You can use something simple here; we will cover date variables soon enough.) b) Plot surface temperature deviations versus time/date. c) Check whether given the annual averages match (close enough) the sample mean from the quarterly values. (Note the given annual average may be missing for a year if any quarterly value is missing.) d) What quarter/season has the highest variance? 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 use a different dataset to do this part.) *Bonus* Do (a) and (b) for another level of the atmosphere (troposphere, tropopause, stratosphere). Clearly say which file you used. FOR ALL EXERCISES: Hand in (paper) (1) The answers to any questions asked. (2) Your program * With clear dicumentation using comments * (3) Your output