Hello all!
Im in need of help on a certain area in SAS and hope to find it here.
I have data om patients and their number of readmissions in to a hospital. The patients ID repeats several times according to each new readmission date e.g
ID read_date
1 11Jun2009
1 01Jan2010
1 23Feb2010
2 30Nov2011
2 21Dec2009
....
Each patient/ID has different inclusion dates (date as to when they were included in the study)
My question is; is there a way for me to only keep the readmissions from each patient one year from their respective inclusion dates?
Thanks!
Are you dealing with another dataset? or just this one.
In the case of the example above, how do you know which date is the one you want to use as your 1 year starting point? Is it always the earliest one?
Hi, I think I've figured it out. As said before the data was these two variables including a variable for each called ''inclusiondate'' so it would look like this:
ID read_date inclusion_date
1 11Jun2009 09Jan2008
1 01Jan2010 09Jan2008
1 23Feb2010 09Jan2008
2 30Nov2011 08Feb2008
2 21Dec2009 08Feb2008
....
I decided at the end to just subtract the two dates from each other and eliminate all the observations that had over 365 days in between.
Thanks for your reply but I hope my ''simple'' method would be enough for now.
Sounds like a good solution to me! Glad you figured it out :smileycool:
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.