I am trying to derive error bars for my data, which is proportional(Dead/Alive) and analysed with a binomial GLM. So far I have tried using the predict() function in R but in the treatment groups where there is either no deaths or 100% deaths the error bars are very large (essentially covering 0%-100%). Is there something wrong with my code? Or is there an easier way of calculating CIs or standard error bars?
A<-c(10,10,10,10,10,10,19,19,19,19,19,19)
B<-c("0","1","2","0","1","2","0","1","2","0","1","2")
C<-c("-ve","-ve","-ve","+ve","+ve","+ve","-ve","-ve","-ve","+ve","+ve","+ve")
Dead<-c(1,1,27,0,6,18,2,10,23,0,14,21)
Alive<-c(29,32,2,22,19,4,28,22,3,20,11,0)
Total<-Dead+Alive
gaf<-data.frame(A,B,C,Dead,Alive,Total)
mod2<-glm(cbind(Dead,Alive)~A*B*C, family=binomial)
p<-predict(mod2,newdata=gaf,se.fit=TRUE)
up<-with(p,fit+se.fit)
low<-with(p,fit-se.fit)
invLink<-family(mod2)$linkinv
av2<-with(p,invLink(fit))
upr<-invLink(up)
lwr<-invLink(low)