Dear forum, I have a set of longitudinal patient data representing patient id (subjid), time in study (time), lab reading (aval) and a dose indicator variable (dose) that can take values 0, 1 or 2. Each patient's dose can change over the study time course.
I would like to produce a line plot for each patient (5 patients per chart) of aval (y axis) vs. time (x axis).
I would like the line colour for each patient to be red if dose=0, orange if dose=1 and green if dose=2. As each patient can change dose over time, each individual line plot should be capable of changing colour over time according to what the dose indicator is at that time point.
I'm using STATA 12.2. Any help much appreciated!
Related Posts with Changing the line colour of panel data line plot according to an indicator variable
Margins with interactions and factor notation in probit.I'm pretty sure this has a simple solution and thought I would take advantage of the expertise here.…
ARDL ECM InterpretationHi, I have been a little confused about interpreting my results from "ardl" command and "ardl, ec" c…
Logistic regression and year dummiesDear researchers, I have an unbalanced dataset for a period extending from 2002-2019. I am trying t…
Peer Firm Averages excluding ith observationHi All, I am pretty new to Stata , so a bit lost on this one. I am trying to find Peer Firm averages…
how to store margins after biprobit modelHi, I would like to estimate the predicted probabilities after running a biprobit model. I have trie…
Subscribe to:
Post Comments (Atom)
0 Response to Changing the line colour of panel data line plot according to an indicator variable
Post a Comment