Hello,
I have a survival data of participants enrolled on disease management program. I have dissected the data into various groups such as gender (male/female), previous medical history (yes/no), on medication (yes/no), etc. One way to create survival graphs, is by writing sts graph code for every group, for example sts graph, by (gender) OR sts graph, by (previoushistory) etc.
But this method allows you to have multiple graphs; whereas, I want to present one graph with multiple lines where each line is for different groups i.e. one for males, one for females, one for medication history as yes, and so on.
When I write the code, for lets say 3 groups: sts graph, by (gender previoushistory medication), Stata creates additional (unwanted groups). For example, one group is gender=0/previoushistory=0/medication=0, another is gender=0/previoushistory=1/medication=0, or gender=0/previoushistory=1/medication=1 and so on.
Is there a code which can allow me to show only required lines (2 per group)? OR, most importantly, is there a way to juxtapose/overlap different Kaplan Meier graphs in Stata?
Thanks!
I have a survival data of participants enrolled on disease management program. I have dissected the data into various groups such as gender (male/female), previous medical history (yes/no), on medication (yes/no), etc. One way to create survival graphs, is by writing sts graph code for every group, for example sts graph, by (gender) OR sts graph, by (previoushistory) etc.
But this method allows you to have multiple graphs; whereas, I want to present one graph with multiple lines where each line is for different groups i.e. one for males, one for females, one for medication history as yes, and so on.
When I write the code, for lets say 3 groups: sts graph, by (gender previoushistory medication), Stata creates additional (unwanted groups). For example, one group is gender=0/previoushistory=0/medication=0, another is gender=0/previoushistory=1/medication=0, or gender=0/previoushistory=1/medication=1 and so on.
Is there a code which can allow me to show only required lines (2 per group)? OR, most importantly, is there a way to juxtapose/overlap different Kaplan Meier graphs in Stata?
Thanks!
Comment