I'm running a regression on some data that would benefit from RDD. Thus, I would like to show a Line of Best Fit/Regression Line above and below a threshold of 0.5 on the x-axis.
I am struggling to do this. I have tried the clip(x1,x2,y1,y2)
command, but it still draws the line across the entire plot. I have also tried to use subsets to draw a regression line >/< 0.5, which also gives a line across the entire plot.
Would it maybe be better to use a lowess line? This is really uncharted R territory for me, so I am really not sure how to proceed.