Question: I need help with SAS coding Extend the code in Step 6 by adding six more IF - THEN sets of statements to check for

I need help with SAS coding
Extend the code in Step 6 by adding six more IF-THEN sets of statements to check for disease (dx1-dx10) value ranges and create the other six indicators, DXGRP1, DXGRP2, DXGRP3, DXGRP4, DXGRP5, DXGRP6, DXGRP7.
Your final data set, STEP6, should have PATID and the seven DXGRP# indicators.
DX values DXGRP DESCRIPTION
-------------------------------
331(pertussis/whooping cough)
752(infectious mononucleosis)
90-993(syphilis and other venereal diseases: STDs)
4104(myocardial infarction)
430-4385(cerebovascular disease)
403-46(chronic kidney disease)
585-66(chronic kidney disease)
638-96(chronic kidney disease)
4627(acute sore throat)
Keep only PATID DXGRP1-DXGRP7.
Don't forget to output your processing after the DO/END loop.
Finally, add a LABEL statement to add variable labels as follows
DX values DXGRP DESCRIPTION
-------------------------------
DXGRP1 pertussis/whooping cough
DXGRP2 infectious mononucleosis
DXGRP3 syphilis and other STDs
DXGRP4 myocardial infarction
DXGRP5 cerebovascular disease
DXGRP6 chronic kidney disease
DXGRP7 acute sore throat
These tasks will complete the DATA step.
Then, use a PROC FREQ to show the frequency of DXGRP1 through DXGRP7 as
DXGRP1, DXGRP2 and DXGRP7 are all zero frequency.
DXGRP3 appears as in Steps 4 and 5.
DXGRP4: Value 1 appears in three observations.
DXGRP5:
Value Frequency
089
110
21
DXGRP6: Value 1 appears in three observations
All variable labels should appear in the output tables!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!