Plot with new dots


I started to re-create a RDD design where y is the margin % of a victory in a competition and W the % of winning at the next competiton.

rdd <- RDestimate(w ~ y, data = mydata, cutpoint = 0)

When I plot the rdd I got a nice graph which shows a jump at the cutoff 0. However I do have a lot of observations in the graph (see below).

I would like to replace the dots by new dots as follows: each dots reprensents average values in 0.05 percentage points wide bins with size of the dots corresponding to the numbers of observations in each bins.

I started to create breaks and bins as follows:
breaks <- c(-0.15,-0.1,-0.05,0,0.05,0.1,0.15)
mydata$tags <- c("[-0.15--0.1)","[-0.1--0.05)", "[-0.05--0)", "[0-0.05)", "[0.05-0.1)", "[0.1-0.15)")
mydata$group_tags <- cut(mydata$y,

But I only get the values per bins and not the average. Also, I cannot plot them too and I need to have the dots according to the average within the window and the size according to the number of observations.

Thanks a lot if you can help me

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.