I have this data and would like to conduct a mixed model analysis to determine the following:
Effect of individual capacity measures on survival in each of the treated groups
Effect of median capacity measures on survival in each of the treated groups
I would also like to be able to graph this data if possible. In my real data, visit days can be up to 20 visits with corresponding measures. There are no missing values for any of the subjects.
----------------------- copy starting from the next line -----------------------
------------------ copy up to and including the previous line --------------
The code I am using is
----------------------- copy starting from the next line -----------------------
Code:
xtmixed capacitymedian treat#visitday || id:
------------------ copy up to and including the previous line ------------------
But this gives me the calculation for each individual visit. What I would like to compare is the treated groups and their differences in survival to see whether survival is improved in the treated groups with higher capacity values.
Effect of individual capacity measures on survival in each of the treated groups
Effect of median capacity measures on survival in each of the treated groups
I would also like to be able to graph this data if possible. In my real data, visit days can be up to 20 visits with corresponding measures. There are no missing values for any of the subjects.
----------------------- copy starting from the next line -----------------------
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte(id visitday treat D capacity1 capacity2 capacity13 died) 30 1 0 . 22 32 30 1 30 2 0 . 23 34 55 1 30 3 0 . 28 28 43 1 30 4 0 . 25 33 40 1 44 1 1 . 6 4 10 0 44 2 1 . 10 9 12 0 44 3 1 . 6 8 8 0 28 1 1 . 10 5 8 0 28 2 1 . 11 12 9 0 28 3 1 . 8 13 10 0 28 4 1 . 9 8 6 0 28 5 1 . 7 8 9 0 28 6 1 . 11 8 10 0 end
The code I am using is
----------------------- copy starting from the next line -----------------------
Code:
xtmixed capacitymedian treat#visitday || id:
------------------ copy up to and including the previous line ------------------
But this gives me the calculation for each individual visit. What I would like to compare is the treated groups and their differences in survival to see whether survival is improved in the treated groups with higher capacity values.

Comment