Dear Statalist,
I have a randomized order of treatments in four rounds. Rounds 1-4 are always in order, but the treatments are not.
I would like to 1) understand the ordering, i.e., how often was treatment 1 in round 1, in round 2, in round 3, and 4 and so on with the remaining 3 treatments.
I thought of using count if:
and so on but I hope there is a more elegant way to present the data in a table.
2) I would like to use this information of order and treatment in my regression as an independent variable. Would I use i.round##i.treatment for that?
Here is an excerpt of the data using dataex:
Thank you very much in advance!
Kind regards,
Scott
I have a randomized order of treatments in four rounds. Rounds 1-4 are always in order, but the treatments are not.
I would like to 1) understand the ordering, i.e., how often was treatment 1 in round 1, in round 2, in round 3, and 4 and so on with the remaining 3 treatments.
I thought of using count if:
Code:
count if treatment == 1 == round ==1
2) I would like to use this information of order and treatment in my regression as an independent variable. Would I use i.round##i.treatment for that?
Here is an excerpt of the data using dataex:
Code:
dataex round treatment
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte(round treatment) 1 2 2 3 3 1 4 4 1 1 2 3 3 4 4 2 1 4 2 3 3 2 4 1 1 1 2 4 3 2 4 3 1 3 2 4 3 1 4 2 end
Thank you very much in advance!
Kind regards,
Scott
Comment