In Stata I would like to plot ve
(y-axis) against hr
(x-axis) for each participant in one plot. Each participant (i.e., P1, P3, ...) has different values for hr
and ve
. id
is an extra variable.
I probably have to use the command if id==1
.
I tried
twoway (lowess ve hr if id==1) (lowess ve hr if id==3) (lowess ve hr if id==6)
but I am not sure if that is correct.
Which command can I use to plot hr
and ve
for the different participants in one plot (like on the picture)?