Displaying 1 result from an estimated 1 matches for "logitlower".
2010 Sep 11
3
confidence bands for a quasipoisson glm
...ot;Number of used plant", las=1)
ilogit<-function(x) exp(x)/(1 + exp(x))
logit <-function(x) log(x/(1 - x))
newdat$logitpred <- predict(gm6, newdata=newdat, type="link")
newdat$sepred <- predict(gm6, newdata=newdat, type="link", se.fit=TRUE)$se.fit
newdat$logitlower <- newdat$logitpred-1.96 * newdat$sepred
newdat$logitupper <- newdat$logitpred+1.96 * newdat$sepred
newdat$upper <- ilogit(newdat$logitupper)
newdat$lower <- ilogit(newdat$logitlower)
lines(x, newdat$lower, lty=3)
lines(x, new...