BookmarkSubscribeRSS Feed
thanikondharish
Calcite | Level 5

ID

planned

code

type

111

1

SCREEN

SCREENING

111

2

IV

TREATMENT 1

111

3

ORAL

TREATMENT 2

111

4

FOLLOWUP

FOLLOW-UP

112

1

SCREEN

SCREENING

112

2

IV

TREATMENT 1

112

3

ORAL

TREATMENT 2

112

4

FOLLOWUP

FOLLOW-UP

i have data like see above there is a planned order to particular treatment

but actual it doesn't happen so how to assign order like see below data

 

ID

planned

code

actual

type

111

1

SCREEN

1

SCREENING

111

2

IV

2

TREATMENT 1

111

3

ORAL

3

TREATMENT 2

111

4

FOLLOWUP

4

FOLLOW-UP

112

1

SCREEN

1

SCREENING

112

2

IV

3

TREATMENT 1

112

3

ORAL

2

TREATMENT 2

112

4

FOLLOWUP

4

FOLLOW-UP

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Post test data in the form of a datastep!  AS for your question,there is not enough information.  Why should IV be 3 in the second ID and not 2, no information provided as to why.  We cannot provide accurate answers if you don't provide the information.

Reeza
Super User

How do we (or SAS) know something is out of order?

I would expect to see dates or something in that data set.

 


@thanikondharish wrote:

ID

planned

code

type

111

1

SCREEN

SCREENING

111

2

IV

TREATMENT 1

111

3

ORAL

TREATMENT 2

111

4

FOLLOWUP

FOLLOW-UP

112

1

SCREEN

SCREENING

112

2

IV

TREATMENT 1

112

3

ORAL

TREATMENT 2

112

4

FOLLOWUP

FOLLOW-UP

i have data like see above there is a planned order to particular treatment

but actual it doesn't happen so how to assign order like see below data

 

ID

planned

code

actual

type

111

1

SCREEN

1

SCREENING

111

2

IV

2

TREATMENT 1

111

3

ORAL

3

TREATMENT 2

111

4

FOLLOWUP

4

FOLLOW-UP

112

1

SCREEN

1

SCREENING

112

2

IV

3

TREATMENT 1

112

3

ORAL

2

TREATMENT 2

112

4

FOLLOWUP

4

FOLLOW-UP


 

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 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
  • 2 replies
  • 533 views
  • 2 likes
  • 3 in conversation