Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

SAS is required to solve. This question is only for those who have already had S

ID: 3370874 • Letter: S

Question

SAS is required to solve. This question is only for those who have already had SAS installed. Please use SAS for the following:

1. Examine the 'Demographics' data set in the Sashelp library. Use PROC PRINT to print out a table with only GLC Country Name, Population (2005). Gross National Income per Capita (PPP Int.S 2004) Revenue, and Population Living Below the Poverty Line (Year) data 2. Consider the SAS code below, which does not function properly: DATA roster; #Initiate DATA step; INPUT name $ sex $ 1stExam 2ndExam DATALINES; John M 75 82 Lynn F 89 77 Hope F 92 87 Anna F 68 71 Owen M 97 93 Stan M 84 74 Luke M 92 95 Leah F 98 92 Jill F 82 82 RUN; PROC PRINT DATA=Roster #Initiate PROC step; RUN; Alter the code so that it will function properly. Give the corresponding output.

Explanation / Answer

After altering the code it is function properly, Below the SAS code of given problem.

SAS CODE:
DATA roster;
INPUT name $ sex $ firstExam secondExam;
DATALINES;
John M 75 82
Lynn F 89 77
Hope F 92 87
Anna F 68 71
Owen M 97 93
Stan M 84 74
Luke M 92 95
Leah F 98 92
Jill F 82 82
;
RUN;
PROC PRINT DATA=Roster;
RUN;

SAS OUTPUT:
--------------------------------------------------------------------------------
The SAS System


Obs name sex firstExam secondExam
1 John M 75 82
2 Lynn F 89 77
3 Hope F 92 87
4 Anna F 68 71
5 Owen M 97 93
6 Stan M 84 74
7 Luke M 92 95
8 Leah F 98 92
9 Jill F 82 82