CSULB_STAT475_handout19

CSULB_STAT475_handout19 - STAT 475 Chapter 21 CREATING...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
STAT 475 Chapter 21 CREATING MULTIPLE OBSERVATIONS FROM A SINGLE RECORD Sometimes multiple records appear on the same line. It reduces the size of the entire data file. READING REPEATING BLOCKS OF DATA If each line contains values of the same variables for different individuals (called repeating blocks of data), then the records may be read using the double “at” sign (@@) as a line-hold specifier . It holds the record across multiple iterations of the DATA step until the end of the record is reached. The syntax is input variable1 variable2 ... @@; Example. The program below reads repeated blocks of data containing student ID, and scores on a quiz, homework, exam and the final. data scores; input student_id$ quiz hw exam final @@; cards; 4533 45 32 91 112 614 50 35 98 108 1185 30 23 76 92 8018 94 98 100 119 2669 34 67 74 92 177 54 84 88 88 ; proc print noobs; run; The output is student_ id quiz hw exam final 4533 45 32 91 112 614 50 35 98 108 1185 30 23 76 92 8018 94 98 100 119 2669 34 67 74 92 177 54 84 88 88 READING THE SAME NUMBER OF REPEATING FIELDS 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
If each line contains an individual’s ID followed by some number of repeating fields, and the number of repeating fields is the same for all individuals, then the records may be read using the single “at” sign (@) as a line-hold specifier . It holds the input record for the next INPUT statement in the DATA step. The syntax
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/14/2011 for the course STAT 475 taught by Professor Olgak during the Fall '11 term at CSU Long Beach.

Page1 / 6

CSULB_STAT475_handout19 - STAT 475 Chapter 21 CREATING...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online