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)?
ifhere is a qualifier, not a command.lowesssmooths each y variable as a function of the x variable. I would recommend starting with a simplerlinechart. Something likeis likely to be legal and may be useful. Consider also
Direct labelling (identifier text next to each line) is more work.