ggplot2でロジスティック回帰の近似曲線を描く
バージョンアップで昔の指定方法ができなくなってた。
調べたら下記のようにやれば描ける。ggplot2は綺麗なんだけど仕様変更が多いから困る。
binomial_smooth <- function(...) { geom_smooth(method = "glm", method.args = list(family = "binomial"), ...) } ggplot(data, aes(x, y)) + geom_point() + binomial_smooth()