Predictions for Negative Binomial and Beta-Binomial regression models
Produces predictions and optionally estimates standard errors of those predictions from a fitted negative binomial or beta-binomial regression model.
## S3 method for class 'overglm' predict(object, ..., newdata, se.fit = FALSE, type = c("link", "response"))
object |
an object of class overglm which is obtained from the fit of a negative binomial or beta-binomial regression model. |
... |
further arguments passed to or from other methods. |
newdata |
an (optional) |
se.fit |
an (optional) logical switch indicating if standard errors are required. By default, |
type |
an (optional) character string giving the type of prediction required. The default, "link", is on the scale of the linear predictors, and the alternative, "response", is on the scale of the response variable. |
A matrix with so many rows as newdata
and one column with the predictions. If se.fit=
TRUE then a second column with estimates standard errors is included.
fit1 <- overglm(tumors ~ group, family="nb3(log)", data=mammary) newdata <- data.frame(group=as.factor(c("control","retinoid"))) predict(fit1,newdata=newdata,type="response",se.fit=TRUE) fit2 <- overglm(cbind(cells,200-cells) ~ tnf + ifn + tnf*ifn, family="bb(logit)", data=cellular) newdata <- data.frame(tnf=c(0,100),ifn=c(100,0)) predict(fit2,newdata=newdata,type="response",se.fit=TRUE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.