BookmarkSubscribeRSS Feed
Astounding
PROC Star

I can give you a little guidance, but I can't solve it.  I'm having trouble seeing how the output you post matches your description of what you want to achieve.  Regardless of what is needed, however, this looks like a case where the problem would become easier if you were to transpose the data.  Picture one observation per ID, with variables StartDate1 through StartDate20 and Drug1 through Drug20.  (Of course, 20 is an arbitrary number ... you need to create enough variables to hold the data for the patient with the largest number of dates.)

 

While I rarely recommend transposing data into that form, this strikes me as a problem that would become easier if you were to do that.

 

Good luck.

shasank
Quartz | Level 8
@Reeza Can you help me with this question?
shasank
Quartz | Level 8
@Tom Can you help me with this question.??

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 17 replies
  • 1829 views
  • 3 likes
  • 4 in conversation