Question: 2.5 Going deeper: read a large external file. In this exercise, you will read data from an external raw data file (TRAUMA.CSV) in comma-separated-values

2.5 Going deeper: read a large external file. In this exercise, youwill read data from an external raw data file (TRAUMA.CSV) in comma-separated-values

2.5 Going deeper: read a large external file. In this exercise, you will read data from an external raw data file (TRAUMA.CSV) in comma-separated-values (CSV) format that contains thousands of records. The first few records look like this: SUBJECT, AGE, GENDER, PLACE, STATUS 1868, 12.1, Female, Street, Alive 1931, 18.7, Female, Street, Alive 1950, 16.6, Female, Street, Alive 1960, 8.5, Female, Street, Alive 2019, 6.7, Male, Unknown, Alive 2044, 7.8, Male, Street, Alive Note that the first line (row) in this file contains a header with variable names. a. Complete the SAS code snippet (EX_2.5.SAS): DATA TRAUMA2; INFILE 'filename' DLM= FIRSTOBS= ; * Finish the INFILE statement; GENDER $ PLACE $ STATUS $; INPUT SUBJECT $ AGE Title "Exercise 2.5 your name"; PROC MEANS; RUN; Finish this incomplete code by doing the following: I. Enter the appropriate filename in the INFILE statement. II. Place an appropriate value after the DLM = statement. III. Place an appropriate value after the FIRSTOBS= statement to begin reading with record 2. IV. Note that in the INPUT statement the only numeric variable is AGE. V. Run the corrected program. You should get the following output (with your name in the title): N Analysis Variable: AGE Mean Std Dev Minimum Maximum 16242 10.6396010 5.8030633 VI. How many records are in this data set? 0 21.0000000 b. Revise the program slightly: This time include an OBS= statement so the program will read in only the first 25 records (not including the header line). Change the PROC MEANS to PROC PRINT. Run the revised program. The Results Viewer should include a listing of the first 25 records in the data set.

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 Mathematics Questions!