4.2 Run the following DATA step to create a SAS data set called ABC CORP. Create a new SAS data set called AGES that contains all the variables in ABC_CORP plus three new variables. One is AGE ACTUAL, which is the exact age from DOB to January 15, 2005. The second is AGE_TODAY, which is the age as of the date the program is run, rounded to the nearest tenth of a year. The third is AGE, with the fractional part dropped, as of the date stored in the variable VISIT_DATE. Print out a listing of this new data set. ***Program to create data set ABC_CORP; DATA ABC CORP; DO SUBJ = 1 TO 10; DOB INT (RANUNI (1234) *15000); VISIT DATE = INT (RANUNI (0) 1000) + 01JAN2000'D; END; OUTPUT; FORMAT DOB VISIT_DATE DATE9.; RUN;

Glencoe Algebra 1, Student Edition, 9780079039897, 0079039898, 2018
18th Edition
ISBN:9780079039897
Author:Carter
Publisher:Carter
Chapter10: Statistics
Section10.2: Representing Data
Problem 22PFA
icon
Related questions
Question
4.2 Run the following DATA step to create a SAS data set called ABC CORP. Create a
new SAS data set called AGES that contains all the variables in ABC_CORP plus three
new variables. One is AGE ACTUAL, which is the exact age from DOB to January 15,
2005. The second is AGE_TODAY, which is the age as of the date the program is run,
rounded to the nearest tenth of a year. The third is AGE, with the fractional part
dropped, as of the date stored in the variable VISIT_DATE. Print out a listing of this
new data set.
***Program to create data set ABC_CORP;
DATA ABC CORP;
DO SUBJ = 1 TO 10;
DOB INT (RANUNI (1234) *15000);
VISIT DATE = INT (RANUNI (0) 1000) + 01JAN2000'D;
END;
OUTPUT;
FORMAT DOB VISIT_DATE DATE9.;
RUN;
Transcribed Image Text:4.2 Run the following DATA step to create a SAS data set called ABC CORP. Create a new SAS data set called AGES that contains all the variables in ABC_CORP plus three new variables. One is AGE ACTUAL, which is the exact age from DOB to January 15, 2005. The second is AGE_TODAY, which is the age as of the date the program is run, rounded to the nearest tenth of a year. The third is AGE, with the fractional part dropped, as of the date stored in the variable VISIT_DATE. Print out a listing of this new data set. ***Program to create data set ABC_CORP; DATA ABC CORP; DO SUBJ = 1 TO 10; DOB INT (RANUNI (1234) *15000); VISIT DATE = INT (RANUNI (0) 1000) + 01JAN2000'D; END; OUTPUT; FORMAT DOB VISIT_DATE DATE9.; RUN;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Glencoe Algebra 1, Student Edition, 9780079039897…
Glencoe Algebra 1, Student Edition, 9780079039897…
Algebra
ISBN:
9780079039897
Author:
Carter
Publisher:
McGraw Hill
College Algebra (MindTap Course List)
College Algebra (MindTap Course List)
Algebra
ISBN:
9781305652231
Author:
R. David Gustafson, Jeff Hughes
Publisher:
Cengage Learning
Holt Mcdougal Larson Pre-algebra: Student Edition…
Holt Mcdougal Larson Pre-algebra: Student Edition…
Algebra
ISBN:
9780547587776
Author:
HOLT MCDOUGAL
Publisher:
HOLT MCDOUGAL
Algebra: Structure And Method, Book 1
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell