For questions 1-8, remember that your programs must read the data values from the text files exactly as they appear. You may not edit the text files to make them more convenient for SAS.
1. The following data lists some Florida colleges and universities, the years in which they were founded, and their average tuition rates (in dollars) for undergraduates. The information was obtained from the 1998 college rankings of U. S. News & World Report. The SAS program shown below has some errors. Rewrite the program so that it reads and prints the data correctly, with year and tuition as numeric variables.
data collranks; input college yearfounded tuition University of Florida 1853 $2,070 Florida State University 1851 $1,980 Eckerd College 1958 $17,685 Rollins College 1885 $20,010 Stetson University 1883 $16,650 Flagler College 1968 $9,630 Bethune Cookman College 1904 $8,047 Barry University 1940 $13,550 proc print data=colleges; run;
2. Refer to the AIRPORTS dataset. Write a SAS program to read the data file from your diskette with an INFILE statement, store a permanent SAS dataset on your diskette, and print the dataset. There should be five variables (three character and two numeric) and 20 observations.
3. Refer to the RYAN dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be four variables (one character and three numeric) and 21 observations.
4. Refer to the HOCKEY dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. Combine the month, day, and year into one variable representing the date. There should be six variables (three character and three numeric) and 37 observations.
5. Refer to the LIMES dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be eight numeric variables and 100 observations. Combine the month, day, and year into one variable representing the date.
6. Refer to the USEDCARS dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be six variables (three character and three numeric) and 50 observations.
7. Refer to the CLINTON dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be four numeric variables and 140 observations. Combine the month, day, and year into one variable representing the date. Check The Little SAS Book, pp. 80-81, for an appropriate informat for the date.
8. Refer to the HANKS dataset. Write a SAS program to read the data file from your diskette with an INFILE statement and print the dataset. There should be 11 variables (two character and nine numeric) and 22 observations.