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
Different I-square results for meta summarize and meta forestplot using random empirical Bayes methodHi The meta forestplot using random(ebayes) appears to produce a different value for the I2 result …
"Data have changed" dialog boxI searched the forum for this, but I didn't find anything. Sorry if it's a repeat question. In my w…
Stata returning missing when converting string dateDear all, I have dates in two formats in a single variable one is 20-Apr-19 the other is 21-APRIL-20…
meta forestplot error in stata 16Hello I am running several meta forestplots for subgroups which worked fine in the version of stata…
Searching within stringsI have strL a variable (pgttype) that contains several results such as: "Aneuploidy CRMI 13, 15, 16…
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