I want to add a logistic plot to data. My call to ggplot is:
ggplot(data = SSI.dt, aes(x = elapsed, y = 1 - control)) + geom_point() + stat_smooth(method = 'glm', family = binomial) + xlab('Surgery Duration (min)') + ylab('Probability SSI') + labs(title = 'THA Surgical Site Infections') ggsave(filename = 'Plots/SSI.Duration.pdf’) An error message is returned: Unknown parameters: family Removing “family = binomial” returns a straight line with points appropriately placed on y = 0 and y = 1. I found some previous messages on markmail that listed my call as the correct syntax structure. I’d appreciate thoughts/pointers. Nathan -- Nathan Pace, MD, MStat Department of Anesthesiology University of Utah 801.581.6393 n.l.p...@utah.edu ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.