I'm working on a project, and I need to do a graph where there is two curves of logistic regression. I'd like to display the curve of the disease status (encoded by 0 and 1), along with the Age (numeric variable) and the Gender (factor with two levels: "hommes" and "femmes").
I tried this code :
ggplot(fusion)+aes(x = Age, y = Gallstone.Status , color = Gender )+
geom_point()+
labs(x= "Age", y = "Statut malade ou non", title = "Probabilité d'être malade selon le sexe et l'âge")+
geom_smooth(data = fusion, x = Age, y = proba_reindex)
The result is a graph with the points, paired by color, and two curves of linear regression which I don't desire. How to make both of sigmoids displayed by R?
Also, I've tried to use the predict function to compute probabilities on each gender to have the disease with their age with:
hommes$prob_maladie_age <- predict(reg_logistique_hommes, type = "response")
femmes$prob_maladie_age <- predict(reg_logistique_femmes, type = "response")
I'm unsatisfied as their range is not between 0 and 1. Is it useful to standard them with the formula p_new = (p - min(p))/(max(p) - min(p)), would it have a sense? And is it useful to compute them to trace the two sigmoids? Can you give me a code to trace the two sigmoids?
I tried to trace a graph with a distinction of the two genders, and to reindex the probabilities.

dput(head(fusion,20)),data.frame(..),read.table(..), or similar, pls also include something forreg_logistique_*; and often actual plots/output (with verbatim errors/warnings) versus intended output. Refs: stackoverflow.com/q/5963269, minimal reproducible example, and stackoverflow.com/tags/r/info.geom_smooth()is inconsistent: (1) sincefusionwas in the originalggplot(fusion), no need to include it here, though it does no harm; (2)geom_smooth(x=Age)is trying to find (perhaps successfully) a VECTOR namedAgein the calling/global environment, and it is not attempting to use the same-named column in thedata=. If it works without error, it means you have vectors named that, and you are falling prone to potential data corruption (or at least possibly-different data).