Question: The code in the textbook uses a C: folder reference, which we are not using. It also has a quotation mark that is not
The code in the textbook uses a C: folder reference, which we are not using. It also has a quotation mark that is not in the character set that our environment can understand. Therefore, please use the following code as the starting point for this assignment:
LIBNAME sasdata homemichaelweinbergmysharedfilelinksmichaelweinbergChapter;
DATA alaska DROP Year Month Day;
SET sasdata.earthquakes;
IF State Alaska;
EruptionDate MDYMonthDay,Year;
RUN;
PROC PRINT DATA alaska NOROWNUM;
WHERE Year GT ;
VAR EruptionDate Magnitute;
TITLE 'Alaska's Earthquakes in or Later';
FORMAT EruptionDate DATE;
RUN;
The United States Geological Survey provides data on earthquakes of historical interest. The SAS data set called EARTHQUAKES contains data about earthquakes with a magnitude greater than in the United States and its territories. The variables are year, month, day, state, and magnitude. You assign a new employee the task of writing a program to create a data set with just the earthquakes from Alaska and then print the eruption date and magnitude for Alaskan earthquakes occurring in or later. The following is the program the new employee gives you.
LIBNAME sasdata c:MySASLib;
DATA alaska DROP Year Month Day;
SET sasdata.earthquakes;
IF State Alaska;
EruptionDate MDYMonthDay,Year;
RUN;
PROC PRINT DATA alaska NOROWNUM;
WHERE Year GT ;
VAR EruptionDate Magnitute;
TITLE Alaskas Earthquakes in or Later;
FORMAT EruptionDate DATE;
RUN;
a Examine the SAS data set including the variable labels and attributes. Identify and correct any bugs in the preceding code so that this program will run correctly.
b Add comments to your revised program for each fix so that the new employee can understand her mistakes.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
