I have ~14.000 observations with an independent variable, interactions
, and a dependent variable, accuracy
. The accuracy can be either 0 (misclassification) or 1 (true classification). There is a weak, but statistically significant relationship between the two as seen in the figure below (whiskers specify 95% confidence interval).
I would like to have a smooth plot across the possible values of the interactions instead of binning them as done in the previous figure. I've tried using GAM in R to do that, but I end up with the following figure, which is clearly wrong. I've also tried logistic regression, which just ended up being a straight line, thus not capturing the convergence around interactions = 100
.
How can I get a smooth plot of the relationship between the two values that captures the initial rise in accuracy and then the convergence around interactions=100
? It would be preferred if a confidence interval could be inferred as well. The data can be found at codeshare.io. Interactions above 400 are not interesting so they can be left out if needed.