Question: ( 3 2 points total ) The text file Schools 1 txt has five variables ( listed in the order given ) : School _

(32 points total) The text file Schools1 txt has five variables (listed in the order given):
School_ID, Magnet, Grade, Students, and Score. Read the data into a SAS data set in
whichever style is most convenient.
a.(8 points) In the same data step used to read the data create a new variable called
Enrollment which is a character-based variable that takes on a value "Small" if the
number of students is less than 60; "Medium" if the number of students is between 60
and 99, inclusive; and "Large" if 100 or more. Make sure you use efficient code. Print
the entire data set which includes your new variable.
b.(8 points) Sort your data by the variable Grade such that the original order is retained
in the original data set and the sorted data is output to a different, new data set. Print
the first 8 observations for all variables of the sorted data set.
c.(8 points) Another text file Schools 2 txt has three variables. The first variable is the
identical to the School_ID variable from the Schools1 data set. The second variable,
spending per student (Expenditures), and the third variable, percent gifted students
(Gifted), have non-standard numeric data values. Use the list style of input to read all
variables such that they are stored as standard numeric values. Print the entire data set
to confirm all variables are numeric.
d.(8 points) Print the entire data set from (c) again but re-format the values of the
variables Expenditures and Gifted as they were originally formatted.
( 3 2 points total ) The text file Schools 1 txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!