BookmarkSubscribeRSS Feed
thanikondharish
Fluorite | Level 6

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


 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 985 views
  • 2 likes
  • 3 in conversation