I am sorry if this question is very simple, however, I could not find any solution to my problem. I want to plot logistic regressions lines with ggplot2. The problem is that I cannot use geom_abline
because I dont have the original model, just the slope and intercept for each regression line. I have use this approach for linear regressions, and this works fine with geom_abline
, because you can just give multiple slopes and intercepts to the function.
geom_abline(data = estimates, aes(intercept = inter, slope = slo)
where inter
and slo
are vectors with more then one value.
If I try the same approach with coefficients from a logistic regression, I will get the wrong regression lines (linear). I am trying to use geom_line, however, I cannot use the function predict
to generate the predicted values because I dont have the a original model objetc.
Any suggestion?
Thanks in advance, Gustavo
predict(model,list(resources=xv),type="response")
. But I cannot get this values because I only have the the slope and intercept values. – Gustavo B Paternoplogis
). – Benjamin