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 : marginal effects for all observationsHello, I'm currently running into some issue with margins. I'm estimating 2 models, a fractional …
Testing for a known break date in a time series with yearly dataI have a data set that contains variables for economic growth (called "dgdp") and the change of unem…
How forum software deals with Unicode whitespaceThe following dataex output contains several uchar(160): Code: * Example generated by -dataex-. T…
Generating cross-sectional information from employment spellsHi all, I am currently working with a polish data set and would like to generate the professional e…
Rename the list of variables with the name of each sheet*Hi, I am importing 3 sheets from excel and I want to rename the list of variables with the name of e…
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