In: Computer Science
Please type SAS code for questions below
Age < 65 N = |
Age ≥ 65 N = |
Total N = |
|
Sex Male Female |
|||
Region Northeast Midwest South West |
|||
Race White Black Asian All other race groups |
Age < 65 N = |
Age ≥ 65 N = |
Total N = |
|
Sex Male Female |
|||
Region Northeast Midwest South West |
|||
Race White Black Asian All other race groups |
( FOR CONDITION AGE < 65 )
DATA TEMP;
INPUT ID SEX ;
INPUT ID REGION;
INPUT ID RACE
DATALINES;
1 MALE NORTHEAST WHITE
2 MALE MIDWEAST BLACK
3 MALE SOUTH ASIAN
4 MALE WEST ALL OTHER RACE GROUPS
5 FEMALE NORTHEAST WHITE
6 FEMALE MIDWEAST BLACK
7 FEMALE SOUTH ASIAN
8 FEMALE WEST ALL OTHER RACE GROUPS
;
RUN;
*PROCE STEP ****
PROC MEANS;
RUN;
*OUTPUT STEP***
PROC PRINT DATA=TEMP;
WHERE AGE < 65;
RUN;
( FOR CONDITION AGE >= 65 )
DATA TEMP;
INPUT ID SEX ;
INPUT ID REGION;
INPUT ID RACE
DATALINES;
1 MALE NORTHEAST WHITE
2 MALE MIDWEAST BLACK
3 MALE SOUTH ASIAN
4 MALE WEST ALL OTHER RACE GROUPS
5 FEMALE NORTHEAST WHITE
6 FEMALE MIDWEAST BLACK
7 FEMALE SOUTH ASIAN
8 FEMALE WEST ALL OTHER RACE GROUPS
;
RUN;
*PROCE STEP ****
PROC MEANS;
RUN;
*OUTPUT STEP***
PROC PRINT DATA=TEMP;
WHERE AGE <= 65;
RUN;