Hello,
I am doing a polypharmacy study want to identify the number of drugs used during the observational study. The study design like this in Word document and the wanted dataset is the one that i need it.
This is the sample dataset:
data drugsaa;
infile datalines;
input id:$1. regimen:$7. start:MMDDYY10. end:MMDDYY10.;
format start MMDDYY10. end day MMDDYY10.;
do day = start to end;
output;
end;
datalines;
A a 6/1/2010 11/15/2010
A b 6/1/2010 9/1/2010
A c 8/1/2010 9/1/2010
A d 8/1/2010 12/15/2010
A e 8/1/2010 11/15/2010
B a 1/1/2012 9/1/2012
B b 3/1/2012 7/1/2012
C a 1/1/2011 4/1/2011
C b 1/1/2011 9/1/2011
C d 6/1/2011 7/1/2011
D a 8/1/2012 10/1/2012
D b 8/3/2012 10/1/2012
D c 8/3/2012 12/15/2012
D d 10/15/2012 12/1/2012
E a 5/1/2011 3/1/2012
E b 5/15/2011 3/1/2012
E c 5/15/2011 5/1/2012
E e 8/1/2011 9/1/2011
;;;
run;
thanks for all your help .
The study design like this
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.