06-11-2014 07:56 AM
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
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?
06-11-2014 08:36 AM
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?
06-11-2014 09:56 AM
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.