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 |
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.
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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.