BookmarkSubscribeRSS Feed
swar
Obsidian | Level 7

Hi. This is the structure of my data

 

id dt_admission dt_discharge

1 3/21/2013 3/24/2013

2 3/23/2014   3/25/2014

3 4/22/2014  4/25/2014

4                    4/24/2015

5                    5/1/2015

 

For the last two dates, I have to impute dt_admission based on dt_discharge. 

 

I have two thoughts...

 

imp_dt _admission = dt_discharge -(specific  number of days)  or 

imp_dt_admission = dt_discharge - (avg(dt_discharge - dt admission)) for entire data

 

Can anyone provide me proc mi procedure or data procedure for imputation of dates?

 

3 REPLIES 3
thomp7050
Pyrite | Level 9

Out of curiosity, why use proc mi?  Why not write data steps based on the logic that you have provided?

swar
Obsidian | Level 7
Yes.. That's right. But just a thought on proc mi.
ballardw
Super User

One might ask what the resulting set will be used for.  That may have some impact on building rules.

 

I can see that further information might be useful in considering building rules such as treatment information. Simple broken bones may have a notably shorter period than an open-hear surgery for instance.

 

And considering we had another question today about indentifying admissions (possibly multiple) of deceased persons then why admission date is missing becomes kind of interesting.

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
  • 3 replies
  • 989 views
  • 0 likes
  • 3 in conversation