BookmarkSubscribeRSS Feed
Kunko
Obsidian | Level 7

Dear SAS Community experts,

 

I am SPSS user and currently using SAS to analyze data for my PhD study. As a new user of SAS I am unable to calculate the length of time duration in days between drug supply for patients receiving certain drugs every few weeks or few months. 

 

newStudyCode                 Date of supply                                        Drug

1                                         25AUG2014:00:00:00                              A   

1                                         22SEP2014:00:00:00                            A 

1                                         27OCT2014:00:00:00                             A                                     

1                                         28NOV2014:00:00:00                          A     

1                                         23DEC2014:00:00:00                           A 

2                                         30JUN2016:00:00:00                            B

2                                         10AUG2016:00:00:00                            B

2                                         08SEP2016:00:00:00                               B

2                                         11OCT2016:00:00:00                                B

2                                         01NOV2016:00:00:00                                C                           

2                                         19DEC2016:00:00:00                                 C

2                                          11JAN2017:00:00:00                                 C

2                                          13FEB2017:00:00:00                                  C

 

I do have about 189 drugs taken by patients for five years with recurrent dates of supply for each patient. For instance, a patient could take a single drug or combination of drugs over a time. I have modified my post below and also edited on your website support page. I want to know the time intervals between each supply and the average of the intervals for each drug. 

 

1 REPLY 1

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 303 views
  • 1 like
  • 2 in conversation