ST 555 -- Summer 2013 Homework #5 -- Due WEDNESDAY, 19 June 2013 Among the controversial votes during the past NC legislative session were some taken early in the morning. To assess whether the times were unusual, the Raleigh News and Observer (story, 13 Jan 2012) did some analysis of the times when votes occurred. Our goal is to replicate some of their study to assess the story's accuracy. In the 'ncleg' directory are files of the result of votes for the last several sessions. The files are named '20xxVotes.txt' where xx goes from 01 to 09 (five files). Your task is to read them all in, put them together, and do some analysis. The format of the data is roll call sequence number (numeric) chamber (S or H, character) date (yymmdd10.) time (hhmmss.000, so use hhmmss8. and read another numeric variable and drop it, that is input seq chamber $ date yymmdd10. time hhmmss8. junk prefix ....; and then drop junk) prefix (Chamber, bill, resolution etc. -- character) billid (numeric) yes votes no votes excused absences excused votes didn't vote total yes/no votes ... and more stuff that we don't care about *** the data are semicolon delimited, but there's a space between the date and the time, so use two delimiters, space and semicolon, that is, dlm=' ;' as well as dsd *** a) Read in the data from each of the five files. Create a variable HOD (hour of the day) using the SAS function hour(x) which gives the hour from a time variable. Also create a variable WHEN (character or numeric) that roughly corresponds to morning, afternoon, evening, and night (4 values). b) Check to see if the total yes/no votes matches the sum of the two. (Since these are integers, no need to worry about rounding.) c) Put the datasets from these five files together for analysis. d) Create a frequency table of HOD and chamber. (how many votes at each hour for each chamber) e) Find the mean number of votes for each value of WHEN. For each chamber (separately), do an analysis of variance of number of votes to determine whether these means are significantly different. 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