#r##logistic regression mode##ggplot#
eq=function(x){exp(beta0 + beta1*x )/(1+ exp(beta0 + beta1*x))}
eq2=function(x){exp(beta2 + beta3*x )/(1+ exp(beta2 + beta3*x))}
main1 = expression(pi[1] ==frac( e^{5.4092953+(-0.1062705)*x[1]} , 1+ e^{5.4092953+(-0.1062705)*x[1]}))
main2 = expression(pi[2] ==frac( e^{5.8121+(-0.1150)*x[1]} , 1+ e^{5.8121+(-0.1150)*x[1]}))
title = expression(paste('Two Logistic Regression Models Given ',logit(hat(x))))
ggplot(data.frame(x=c(-15,15)),aes(x=x))+
stat_function(fun=eq,colour='blue')+stat_function(fun=eq2,colour='red')+
geom_text(aes(x=-1,y=0.99,label=as.character(main1)),parse = TRUE,col='blue')+
geom_text(aes(x=8,y=0.997,label=as.character(main2)),parse = TRUE,col='red')+
ggtitle(title)+theme(plot.title = element_text(hjust=0.5))
#curve#
curve(expr = exp(beta0 + beta1*x )/(1+ exp(beta0 + beta1*x)),
xlim= c( -15 , 15) , col = "black" ,
main = expression(pi ==frac( e^{5.4092953+(-0.1062705)*x[1]} ,
1+ e^{5.4092953+(-0.1062705)*x[1]}))
, xlab =expression(x[1]), ylab =expression(pi ) )
eq=function(x){exp(beta0 + beta1*x )/(1+ exp(beta0 + beta1*x))}
eq2=function(x){exp(beta2 + beta3*x )/(1+ exp(beta2 + beta3*x))}
main1 = expression(pi[1] ==frac( e^{5.4092953+(-0.1062705)*x[1]} , 1+ e^{5.4092953+(-0.1062705)*x[1]}))
main2 = expression(pi[2] ==frac( e^{5.8121+(-0.1150)*x[1]} , 1+ e^{5.8121+(-0.1150)*x[1]}))
title = expression(paste('Two Logistic Regression Models Given ',logit(hat(x))))
ggplot(data.frame(x=c(-15,15)),aes(x=x))+
stat_function(fun=eq,colour='blue')+stat_function(fun=eq2,colour='red')+
geom_text(aes(x=-1,y=0.99,label=as.character(main1)),parse = TRUE,col='blue')+
geom_text(aes(x=8,y=0.997,label=as.character(main2)),parse = TRUE,col='red')+
ggtitle(title)+theme(plot.title = element_text(hjust=0.5))
#curve#
curve(expr = exp(beta0 + beta1*x )/(1+ exp(beta0 + beta1*x)),
xlim= c( -15 , 15) , col = "black" ,
main = expression(pi ==frac( e^{5.4092953+(-0.1062705)*x[1]} ,
1+ e^{5.4092953+(-0.1062705)*x[1]}))
, xlab =expression(x[1]), ylab =expression(pi ) )
【2012宾利EXP 9 F SUV概念车】宾利EXP 9F Concept是在宾利6.0公升双涡轮增压W12引擎为动力基础配置的,同时宾利还将推出4.0L,双涡轮增压的V8配合混合动力系统的另外一款动力配置。纯电动模式下可行驶25-30公里,据国外媒体猜测这款发动机的最大扭矩将有可能超过1000N·m。[雷神][C3PO][织] https://t.cn/E2RsO6h
医格多元修护眼部精华乳15ml 29
可以改善黑眼圈眼纹 不要让眼角纹出卖了你的年龄!!!!
复制这条信息,(iA6E0EXLZ0D),打开【手桃】即可哦
【28】珀莱雅水动力爽肤水
某东大促58,某唯66!!!现在只要28,还加赠一瓶保湿喷雾超级滑蒜 啊!!
复制这条信息,(hzIc0EXp8lX),打开【手桃】即可哦
可以改善黑眼圈眼纹 不要让眼角纹出卖了你的年龄!!!!
复制这条信息,(iA6E0EXLZ0D),打开【手桃】即可哦
【28】珀莱雅水动力爽肤水
某东大促58,某唯66!!!现在只要28,还加赠一瓶保湿喷雾超级滑蒜 啊!!
复制这条信息,(hzIc0EXp8lX),打开【手桃】即可哦
✋热门推荐