Hi there, I'm relatively new to stata and I'm struggling to incorporate multiple variables into a single graph.
The dataset consists of individuals who either have data from visit 1, visit 2, or both. I would like to plot age1 (from visit 1) against x1 and age2 against x2 (from visit 2). I would like to distinguish whether the data is from visit 1 or 2 by presenting visit 1 as a square and visit 2 as a circle. I would then like to connect the pair-wise longitudinal data points with a line. Finally, I would like to then colour each data-point according to another variable which can be either 0, 1 or 2 (for visit 1 this is y1, and for visit 2 this is y2).
Is it possible to do this on stata and does anyone have any advice on how to do this?
Many thanks in advance
The dataset consists of individuals who either have data from visit 1, visit 2, or both. I would like to plot age1 (from visit 1) against x1 and age2 against x2 (from visit 2). I would like to distinguish whether the data is from visit 1 or 2 by presenting visit 1 as a square and visit 2 as a circle. I would then like to connect the pair-wise longitudinal data points with a line. Finally, I would like to then colour each data-point according to another variable which can be either 0, 1 or 2 (for visit 1 this is y1, and for visit 2 this is y2).
Is it possible to do this on stata and does anyone have any advice on how to do this?
Many thanks in advance
Comment