QuestionQuestion

1. Read the data contained in the question01.dat file directly from the data file into a temporary SAS data set called question01. The data in each record are in order: golf course (name), number of holes (holes), par (par), total yardage (yardage), and greens fees (fees). Print the resulting SAS data set ensuring that the output is centered, your page size is no larger than 58 lines, and the linesize no longer than 80 characters.

That is: (1) double space your output, (2) label the variables as in the above output, (3) title the output as it appears above, (4) suppress the printing of the observation number, and (5) make sure that the yardage contains a comma (e.g., 7,263) and the fees are preceded by a dollar sign (e.g., $125.00).

2. Read the data contained in the question02.dat file using a DATALINES statement into a permanent SAS data set called question02. The data in each record are in order: id number (idno), last name (name), team color (team), starting weight in pounds (strtwght), and ending weight (endwght). In the same data step in which you read the data into the SAS data set, create a new variable called category that is defined as follows:
• if ending weight is less than 120, then category is 1
• if ending weight is at least 120 but less than 150, then category is 2
• if ending weight is at least 150 but less than 180, then category is 3
• if ending weight is at least 180, then category is 4
Print the resulting SAS data set question02.

3. Save this permanent SAS data set called question03.sas7bdat on a convenient location on your computer. The contents of the data set are: student name (student), grade of the first exam (grade1), grade of the second exam (grade2), and grade of the third exam (grade3). Use the data set to create a temporary data set called question03 that contains the original variables, plus three new variables:
• average1 (a numeric variable containing the average of the first and second exams for each student)
• average2 (a numeric variable containing the average of the second and third exams for each student)
• status (a character variable which equals "incomplete" if either average1 or average2 is missing, "no change" if average1 equals average2, "improved" if average1 is less than average2, and "regressed" if if average1 is greater than average2).
In creating the temporary question03 data set, use only one data step. Print the resulting SAS data set question03.

Solution PreviewSolution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

Q1)
Code:
data question01;
infile '/folders/myshortcuts/SASuni/may 2018/question01.dat' delimiter=" ";
input
name $1-19
holes
Par
Yardage $
fees
;
run;

data question01;
set question01;
yardage_=input(yardage, comma8.0);
format yardage_ comma8.0;
attrib
name label="Golf Course"
holes label="No. of*holes"
fees label="Greens*Fees" format=DOLLAR8.2
;
drop yardage;
rename yardage_=Yardage;
run;...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

50% discount

Hours
Minutes
Seconds
$75.00 $37.50
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Applied Statistics Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats