BookmarkSubscribeRSS Feed
shahparth260
Quartz | Level 8

 

day 

1

4

10 

 

need to have : 

    stdt      enddt       label

1)   1              4       came to see hospital

2)   4              4       miss date 

3)   4             10      came hospital

 

FYI : record 2) represent missing day when pt not come to hospital. 

 

what if I have more days missing ? 

such as 

days 

 

1

5

8

10 

 

 

 

 

PS
7 REPLIES 7
Reeza
Super User

I'm assuming you have some other variables that tell you 'miss' versus visit? Otherwise, how is that known?

shahparth260
Quartz | Level 8
Yes I have missing flag but I already subset it so that's why I got this days.
PS
Reeza
Super User

Ok. How are we supposed to know that this is a miss:

 

2)   4              4       miss date 

 

In your new example would both those middle records be missing?

 

1

5

8

10 

 

Would this be which of the following and how are we supposed to tell the computer that?

 

1 5

5 5

5 8

8 8

8 10

 

or 

1 5

5 8

8 10

 

or 

1 5

5 5

5 8

8 10

 

or 

1 5 

5 8

8 8

8 10

 


@shahparth260 wrote:
Yes I have missing flag but I already subset it so that's why I got this days.



 

 

shahparth260
Quartz | Level 8

I suppose to get ans like this for new example 

 

1 5

5 5

8 8

8 10

 

PS
shahparth260
Quartz | Level 8

which ever day missing should be represent as single 

 

PS
Patrick
Opal | Level 21
Reeza
Super User

Here's one way:

Screen Shot 2018-03-16 at 7.20.09 PM.png

 

I suspect you have other variables present that would make this much simpler.

 

 

 

 

sas-innovate-2024.png

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.

 

Register now!

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
  • 7 replies
  • 865 views
  • 1 like
  • 3 in conversation