search for: pi1hat

Displaying 1 result from an estimated 1 matches for "pi1hat".

Did you mean: pi0hat
2012 Oct 20
1
Logistic regression/Cut point? predict ??
...tau) # error is added here model<-glm(z ~ xerr, family=binomial(logit)) int<-coef(model)[1] slope<-coef(model)[2] pred<-predict(model) #this gives me the a+bx data for new error? I know I can add type= response to get the probab. but only e^x not *e^x/(1+e^x) * pi1hat<-length(z[which(z==1)]/length(z)) My cut point is calculated is the proportion of 0s to 1. pi0hat<-length(z[which(z==0)]/length(z)) cutmid <- log(pi0hat/pi1hat) pred<-ifelse(pred>cutmid,1,0) * I am not sure if I need to compare these two. I think this is an error. *...