4.4 Run the following program to create a SAS data set called CLINICAL. Using this data set, compute the difference in weight from one visit to the next. DATA CLINICAL; *Use LENGTH statement to control the order of variables in the data set; LENGTH PATIENT VISIT DATE VISIT 8; RETAIN DATE VISIT WEIGHT; DO PATIENT = 1 TO 25; END; IF RANUNI (135) LT 5 THEN GENDER = 'Female'; ELSE GENDER = 'Male'; X = RANUNI (135); IF X LT 33 THEN GROUP = 'A'; ELSE IF X LT .66 THEN GROUP = 'B'; ELSE GROUP = 'C': DO VISIT = 1 TO INT (RANUNI (135)*5); IF VISIT = 1 THEN DO; END; DATE VISIT = INT (RANUNI (135) *100) + 15800; WEIGHT =INT (RANNOR (135) 10 +150); ELSE DO; DATE VISIT = DATE VISIT + VISIT (10+ INT (RANUNI (135) *50)); WEIGHT WEIGHT +INT (RANNOR (135) *10); END; OUTPUT; END; DROP X; RUN; IF RANUNI (135) LT .2 THEN LEAVE; FORMAT DATE VISIT DATE9.;

Glencoe Algebra 1, Student Edition, 9780079039897, 0079039898, 2018
18th Edition
ISBN:9780079039897
Author:Carter
Publisher:Carter
Chapter10: Statistics
Section10.3: Measures Of Spread
Problem 8PPS
icon
Related questions
Question
4.4 Run the following program to create a SAS data set called CLINICAL. Using this data
set, compute the difference in weight from one visit to the next.
DATA CLINICAL;
*Use LENGTH statement to control the order of
variables in the data set;
LENGTH PATIENT VISIT DATE VISIT 8;
RETAIN DATE VISIT WEIGHT;
DO PATIENT = 1 TO 25;
END;
IF RANUNI (135) LT 5 THEN GENDER = 'Female';
ELSE GENDER = 'Male';
X = RANUNI (135);
IF X LT 33 THEN GROUP = 'A';
ELSE IF X LT .66 THEN GROUP = 'B';
ELSE GROUP = 'C':
DO VISIT = 1 TO INT (RANUNI (135)*5);
IF VISIT = 1 THEN DO;
END;
DATE VISIT = INT (RANUNI (135) *100) + 15800;
WEIGHT =INT (RANNOR (135) 10 +150);
ELSE DO;
DATE VISIT = DATE VISIT + VISIT (10+ INT (RANUNI (135) *50));
WEIGHT WEIGHT +INT (RANNOR (135) *10);
END;
OUTPUT;
END;
DROP X;
RUN;
IF RANUNI (135) LT .2 THEN LEAVE;
FORMAT DATE VISIT DATE9.;
Transcribed Image Text:4.4 Run the following program to create a SAS data set called CLINICAL. Using this data set, compute the difference in weight from one visit to the next. DATA CLINICAL; *Use LENGTH statement to control the order of variables in the data set; LENGTH PATIENT VISIT DATE VISIT 8; RETAIN DATE VISIT WEIGHT; DO PATIENT = 1 TO 25; END; IF RANUNI (135) LT 5 THEN GENDER = 'Female'; ELSE GENDER = 'Male'; X = RANUNI (135); IF X LT 33 THEN GROUP = 'A'; ELSE IF X LT .66 THEN GROUP = 'B'; ELSE GROUP = 'C': DO VISIT = 1 TO INT (RANUNI (135)*5); IF VISIT = 1 THEN DO; END; DATE VISIT = INT (RANUNI (135) *100) + 15800; WEIGHT =INT (RANNOR (135) 10 +150); ELSE DO; DATE VISIT = DATE VISIT + VISIT (10+ INT (RANUNI (135) *50)); WEIGHT WEIGHT +INT (RANNOR (135) *10); END; OUTPUT; END; DROP X; RUN; IF RANUNI (135) LT .2 THEN LEAVE; FORMAT DATE VISIT DATE9.;
Expert Solution
steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Glencoe Algebra 1, Student Edition, 9780079039897…
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Big Ideas Math A Bridge To Success Algebra 1: Stu…
Algebra
ISBN:
9781680331141
Author:
HOUGHTON MIFFLIN HARCOURT
Publisher:
Houghton Mifflin Harcourt
Holt Mcdougal Larson Pre-algebra: Student Edition…
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning
Elementary Geometry For College Students, 7e
Elementary Geometry For College Students, 7e
Geometry
ISBN:
9781337614085
Author:
Alexander, Daniel C.; Koeberlein, Geralyn M.
Publisher:
Cengage,
Functions and Change: A Modeling Approach to Coll…
Functions and Change: A Modeling Approach to Coll…
Algebra
ISBN:
9781337111348
Author:
Bruce Crauder, Benny Evans, Alan Noell
Publisher:
Cengage Learning