The line on the picture is a weighted least squares trendline,and I plan to use ggplot to draw it.
The ordinate of the center of a circle is the Y-axis value("HR for CHD……");
We can see ten different cirlces in the picture because there are ten different "HR" value, and every set of data points have the same Y value(a total of 10 sets of data points).
【Sorry there was a mistake I just made! Maybe the abscissa of the circle centre is the average of X value of a set of data points? 】
3.The size of the circle depends on the sample size.
df <- data.frame(y=c(1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 6, 6, 7, 8),
x=c(48, 78, 72, 70, 66, 92, 93, 75, 75, 80, 95, 97, 90, 96, 99, 99))
Just use these data for test.I have known how to draw a weighted least squares trendline in ggplot, but how can I add 8 circles( there are 8 different "y" value in the test data) .