Description
Instruction:
1. Homeworks must be submitted via sakai by 6pm EST of the due
date. Late homeworks are not accepted. For each homework, maximum
number of resubmission is three and no late resubmission is accepted. If you
miss the deadline (6pm, class meeting day), you will get zero point for that
homework.
2. Homework submission should contain only two files: your write-up and
SAS code.
3. By Write-up, I expect you should organize your answers to each question
in homework in a clean and clear way that make your report readable and
even beautiful, rather than throw everything from SAS output to your
readers. You are responsible for picking up relevant SAS output to support
your answers.
Your write-up should be of a pdf format file. No other format is accepted.
five points will be taken off for not following this.
Please name your write-up solution to homework 1 in this
way: hw1_firstnamelastname.pdf. For example, I am gonna name my writeup answer as: hw1_yichenhe.pdf; For those who do not follow the naming
rule, two points will be taken off each time.
4.Please provide all your SAS code in a separate hw1.sas file. Upload
the SAS file along with your wirte-up. For those who do not follow the
rule, two points will be taken off each time.
Problem 1: Fill the blanks in the following SAS code, according to (a)and
(b).
1.1 Data:
Table-1
1.2 SAS code to complete:
Name Score1 Score2 Score3 Score4 Score5 Final
Gamma1 11.25 9.75 10 10 10 90
Delta1 9.5 7.5 8 10 10 95
Epsilon1 11.5 10 9.75 3.5 10 100
Theta1 12.5 10 9.5 9 10 100
options ;
data mydata;
input ;
datalines;
Gamma1 11.25 9.75 10 10 10 90
Delta1 9.5 7.5 8 10 10 95
Epsilon1 11.5 10 9.75 3.5 10 100
Theta1 12.5 10 9.5 9 10 100
;
run;
proc print data=mydata;
;
run;
a) Complete the above code by filling blanks, according to the followings:
1. options : suppress date in your sas output; (hint: google
“Customizing Your SAS Session : OPTIONS Statement” )
2. options: linesize = 78;
3. Print the data for Name, Score3, and Final.
b) Rewrite the program so all the data may be written on only two lines
instead of four lines. Report your output. (Hint: Recall the use of @@ in
the input statement before the semicolon.)
Problem 2: Read and print the following data set. And submit your output
and SAS code.
2.1 Data:
Name from to pounds_million
Benjamin Mendy Monaco Man City 52.0
Alvaro Morata Real Madrid Chelsea 58.0
Romelu Lukaku Everton Man United 75.0
Onsmane Dembele Dortmund Barcelona 97.0
Philippe Coutinho Liverpool Barcelona 105.0
Neymar Barcelona PSG 199.8
For those who are not soccer fans, this is the top most expensive soccer
players in the past year. The first variable Name is soccer players’ names.
The second and third variables from and to correspond respectively to a old
soccer club a player transfer from and a new club to. The last variable is
market value of a player in million pounds.