search for: pi0hat

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

Did you mean: ichat
2012 Oct 20
1
Logistic regression/Cut point? predict ??
...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. * accuracy<-length(which(pred==z))/length(z) accuracy rocpreds<-prediction(pred,z) auc&l...