I am not able to plot for the aforesaid question on binary outcome.
data=data.frame(feature1=c(rep(1,10),rep(2,10),rep(3,10)),feature2=c(rep(letters[1:2],15)),Outcome=sample(0:1,30,replace = T)) ggplot(data,aes(feature1,Outcome))+geom_point()+geom_smooth(method ='glm',method.args=list(family='binomial'))+facet_wrap(~feature2)
here I get only points at 1s and 0s, But I want points at probabilities by non-parametric model.(i.e (Outcome==1)/(all Outcomes(0s and 1s) for a particular ‘feature1’ segregated by ‘feature2’)
I know I can form a column for required probabilities from NonParametric model, but it will be very tedious to do for all combination of ‘facet_wrap’ and ‘aes’