Dear Members,
I am coming back to you as I have been stuck for the past few days attemting to graph the results of a randomised trial. I am very new at using STATA graph commands
I created a dataset for that matter which just has variables time (0, 1, and 5 month(s)), study group (control, group1, group2), and another variable containing the collapsed prevalence estimates (proportions) by study group and trial phase. All I wish to do is a graph which would show readers the trial results by study group and trial phase. This would be a graph with three lines on the same graph representing the level of the primary outcome for each study group and by trial phase. I am assuming the points on the X axis would be each trial phase (so 0, 1 and 5 months (s), and the y-axis, the prevalence).
So far all the commands I have tried have given me graphs that do not make sense (in terms of the y and x axis). The last command I tried is:
twoway (tsline prevVar t, mcolor("red"))||(tsline prevVar t, mcolor("blue"))||(tsline prevVar t, mcolor("green")).
This is from a command I found on one of the numerous help materials I had looked for online. And I have to admit that I may not understand all the command is doing.
The graph I am getting is one where the x-axis is time, but it is written (1960m1-1960m2 up until 1960m6). I am not sure why.
I don't know what the y-axix is as it goes from 0 to 5 (whereas these should be proportions, and the highest result from the trial is close to 0.30). And the graph legend shows me 6 lines of different colors (whereas I am only seeing 3 lines on the graph). 3 lines indicate the 3 trial time-points, and 3 the prevalence estimates that I do see on the graph.
Would you please be kind enough to advise me?
Thank you very much.
I am coming back to you as I have been stuck for the past few days attemting to graph the results of a randomised trial. I am very new at using STATA graph commands
I created a dataset for that matter which just has variables time (0, 1, and 5 month(s)), study group (control, group1, group2), and another variable containing the collapsed prevalence estimates (proportions) by study group and trial phase. All I wish to do is a graph which would show readers the trial results by study group and trial phase. This would be a graph with three lines on the same graph representing the level of the primary outcome for each study group and by trial phase. I am assuming the points on the X axis would be each trial phase (so 0, 1 and 5 months (s), and the y-axis, the prevalence).
So far all the commands I have tried have given me graphs that do not make sense (in terms of the y and x axis). The last command I tried is:
twoway (tsline prevVar t, mcolor("red"))||(tsline prevVar t, mcolor("blue"))||(tsline prevVar t, mcolor("green")).
This is from a command I found on one of the numerous help materials I had looked for online. And I have to admit that I may not understand all the command is doing.
The graph I am getting is one where the x-axis is time, but it is written (1960m1-1960m2 up until 1960m6). I am not sure why.
I don't know what the y-axix is as it goes from 0 to 5 (whereas these should be proportions, and the highest result from the trial is close to 0.30). And the graph legend shows me 6 lines of different colors (whereas I am only seeing 3 lines on the graph). 3 lines indicate the 3 trial time-points, and 3 the prevalence estimates that I do see on the graph.
Would you please be kind enough to advise me?
Thank you very much.
Comment