Not sure how to write this code. I am trying to answer this question:
- Remove from the data set any observations where the date of delivery was recorded as before the date of admission to the hospital or after the date of discharge from the hospital.
When I use this code it says I have no observations:
date2 = date of delivery
date1 = date of admission to the hospital
dod = date of discharge
data dil_merge;
merge hw6.dil1 hw6.dil2_temp;
by MEDRNO;
if xwtgainlb > 60 then delete;
if xwtgainlb < 60 then delete;
if date2 < date1 then delete;
if date2 > dod then delete;
run;