Quiz:
Reading
Raw Data
Select the best answer for each question and click Score My Quiz.
- Which SAS statement associates
the fileref Crime with the raw data file C:\States\Data\Crime?
- Filerefs remain
in effect until . . .
- Which statement identifies the
name of a raw data file to be read with the fileref Products and specifies that the
DATA step read only through record 15?
- Which INPUT statement below correctly
reads raw data with these descriptions?
Field Name |
Start Column |
End Column |
Data Type |
Brand |
1 |
35 |
character |
Wear |
37 |
42 |
numeric |
|
- Which of the
following is true when using column input?
- Which program creates the output
shown below?
1---+----10---+----20---+----30 |
3427 Chen Steve Raleigh |
1436 Davis Lee Greensboro |
2812 King Vicky Memphis |
1653 Sanchez Jack Austin |
Obs |
ID |
LastName |
FirstName |
City |
1 |
3427 |
Chen
|
Steve |
Raleigh
|
2 |
1436 |
Davis
|
Lee
|
Greensboro |
3 |
2812 |
King
|
Vicky |
Memphis
|
4 |
1653 |
Sanchez |
Jack
|
Austin
|
- Which statement correctly reads
the fields in the following order:
StockNumber, Price, Item,
Finish, Style ?
Field Name |
Starting Column |
Ending Column |
Data Type |
StockNumber |
1 |
3 |
character |
Finish |
5 |
9 |
character |
Style |
11 |
18 |
character |
Item |
20 |
24 |
character |
Price |
27 |
32 |
numeric |
|
1---+----10---+----20---+----30---+ |
310 oak pedestal table 329.99 |
311 maple pedestal table 369.99 |
312 brass floor lamp 79.99 |
313 glass table lamp 59.99 |
313 oak rocking chair 153.99 |
- Which raw data
file can be read using column input?
- What happens
when invalid values are encountered in a DATA step?
- Which SAS statement subsets the
raw data shown below so that only the observations where
Sex
(in the second field) has a value of F are processed?
1---+----10---+----20---+ |
Alfred M 14 69.0 112.5 |
Becka F 13 65.3 98.0 |
Gail F 14 64.3 90.0 |
Jeffrey M 13 62.5 84.0 |
John M 12 59.0 99.5 |
Karen F 12 56.3 77.0 |
Mary F 15 66.5 112.0 |
Philip M 16 72.0 150.0 |
Sandy F 11 51.3 50.5 |
Tammy F 14 62.8 102.5 |
William M 15 66.5 112.0 |
|