如何在绘图上叠加逻辑曲线。
Temp<-c(27.2,28.3,29.9)
Temp
male<-c(0,8,8)
male
female<-c(10,4,2)
female
table=read.table("E:\\Book1.txt",header=T)
attach(table)
table
Y=cbind(male,female)
Y
mylogit <- glm(Y ~ Temp, family = "binomial",table)
summary(mylogit)
我需要为男性和女性叠加一条逻辑曲线
curve(predict(mylogit,data.frame(male=x),type="resp"),add=TRUE)
title(main="Males Temperature with Fitted GLM Logistic Regression Line")
任何帮助?