Hi,
I am using STATA version 13.
I have a dataset with several date variables (start and stop dates of different treatements), which should have all been given sequentially.
I am trying to find out the pattern of treatments - in order words the order in which the treatments were given first, second, third according to the start date.
My plan was/ is:
1) I reshaped all the date variables (integer, float) from long to wide
2) Create a new variable, which puts the treatments according to the start date in order for each ID
With the latter I struggle.
Does anybody have any suggestions?
Many thanks,
Yvonne
I am using STATA version 13.
I have a dataset with several date variables (start and stop dates of different treatements), which should have all been given sequentially.
I am trying to find out the pattern of treatments - in order words the order in which the treatments were given first, second, third according to the start date.
My plan was/ is:
1) I reshaped all the date variables (integer, float) from long to wide
2) Create a new variable, which puts the treatments according to the start date in order for each ID
With the latter I struggle.
Does anybody have any suggestions?
Many thanks,
Yvonne
Comment