Cody-Problem data and programs

Cody-Problem data and programs - *Data and programs for...

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

View Full Document Right Arrow Icon
***Data and programs for end-of-chapter problems Cut and paste the lines of data and programs and copy to you your SAS session; ***Chapter 1: Problem 1.1 1 18 M 3.7 650 2 18 F 2.0 490 3 19 F 3.3 580 4 23 M 2.8 530 5 21 M 3.5 640 Problem 1.2 00768155150 00272250240 00563240200 00170345298 Problem 1.3 123874414 28,000 35 W 646239182 29,500 37 B 012437652 35,100 40 W 018451357 26,500 31 W Problem 1.4 ***Program to read in IQ and other test scores; DATA IQ_AND_TEST_SCORES; INPUT ID 1-3 IQ 4-6 MATH 7-9 SCIENCE 10-12; DATALINES; 001128550590 002102490501 003140670690 004115510510 ; Problem 1.6 ABCDE AACCE BBBBB CABDA DDAAC CABBB EEBBB ACACA Problem 1.8 137 28000 1 214 98000 3 199 150000 3 355 57000 2
Background image of page 1

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

View Full DocumentRight Arrow Icon
Problem 1.9 001 W 130 80 60 002 B 140 90 70 003 W 120 70 64 004 W 150 90 76 005 B 124 86 72 Problem 1.10 Trenton 23 25 30 Newark 18 27 22 Albany 22 21 27 ***Chapter 2; Problem 2.2 001MW08013008010 002FW08811007205 003MB05018810002 004FB 10806801 005MW06812208204 006FB101 07404 007FW07810406603 008MW04811207006 009FB07719011009 010FB06616410610 Problem 2.5 DATA PROB2_5; LENGTH GROUP $ 1; INPUT X Y Z GROUP $; DATALINES; 2 4 6 A 3 3 3 B 1 3 7 A 7 5 3 B 1 1 5 B 2 2 4 A 5 5 6 A ; Problem 2.7 1 1 5.4 10.2 8.9 2 1 5.9 9.8 7.3 3 1 4.8 12.2 9.1 4 1 6.9 11.8 8.8 5 1 15.8 10.9 9.0 6 2 4.9 13.8 6.6 7 2 5.0 12.0 7.9 8 2 6.7 10.5 8.0 9 2 18.2 11.9 6.9 10 2 5.5 9.9 9.1 Problem 2.11
Background image of page 2
Brown American 3 12 28000 Johnson VRW 6 14 33000 Rivera Texam 2 6 8000 Brown Standard 0 22 0 Brown Knowles 2 19 12000 Rivera Metro 4 8 13000 Rivera Uniman 8 7 27000 Johnson Oldham 3 16 8000 Johnson Rondo 2 14 2000 Problem 2.13 1 A 44 1 B 9 1 C 203 2 A 50 2 B 7 2 C 188 3 A 39 3 B 9 3 C 234 ***Chapter 3; Problem 3.2 001 1 L B 15 002 2 M Z 35 003 2 H F 76 004 1 L C 21 005 2 H . 58 Problem 3.3 007M1110 013F2101 137F1001 117 1111 428M3110 017F3101 037M2101 Problem 3.4 *Program to create data set BLOOD; DATA BLOOD; DO I = 1 TO 500; WBC = INT(RANNOR(1368)*2000 + 5000); X = RANUNI(0); IF X LT .05 THEN WBC = .; ELSE IF X LT .1 THEN WBC = WBC - 3000; ELSE IF X LT .15 THEN WBC = WBC + 4000; OUTPUT; END; DROP I X; RUN; Problem 3.5
Background image of page 3

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

View Full DocumentRight Arrow Icon
DATA DEMOG; INPUT WEIGHT HEIGHT GENDER $; DATALINES; 155 68 M 98 60 F 202 72 M 280 75 M 130 63 F . 57 F 166 . M ; Problem 3.12 ***Program to create data set CASE_CONTROL; LIBNAME PERM 'C:\MYDATA'; ***Substitute a libname of your choice, or make the data set temporary; DATA PERM.CASE_CONTROL; ARRAY COUNTS[4] _TEMPORARY_ (50 100 150 35); DO EXPOSURE = '1-Yes','2-No'; DO OUTCOME = '1-Dead ','2-Alive'; I + 1; DO N = 1 TO COUNTS[I]; SUBJ + 1; OUTPUT; END; END; END; DROP I; RUN; Problem 3.14 PROC FORMAT; VALUE PAIN 1 = 'YES' 2 = 'NO'; VALUE DOSE 1='LOW' 2='MEDIUM' 3='HIGH'; RUN; DATA DOSE; DO DOSE = 1 TO 3; DO I = 1 TO 50; PAIN = 2 - (RANUNI(135) GT (.6 + .08*DOSE)); OUTPUT; END; END; FORMAT PAIN PAIN. DOSE DOSE.; RUN; Problem 3.19 11127 78130 80 1787 82180110 031 62120 78 4261 68130 80 89 58120 76 9948 82178100
Background image of page 4
Problem 3.20 ***Program to create the data set CLASSICAL; PROC FORMAT; VALUE COMPOSER 1
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 29

Cody-Problem data and programs - *Data and programs for...

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

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