View source: R/glm_CMP_methods.R
predict.glm_CMP | R Documentation |
Obtains predictions from a fitted glm_CMP
object.
## S3 method for class 'glm_CMP'
predict(object, newdata = NULL, type = c("link", "response"), ...)
object |
a fitted object of class inheriting from |
newdata |
optionally, a data frame in which to look for variables with which to predict. If omitted, the fitted linear predictors are used. |
type |
the type of prediction required. The default is on the scale of
the linear predictors; the alternative |
... |
further arguments passed to or from other methods. |
A vector with the prediction means.
## Fit a model
Bids$size.sq <- Bids$size ^ 2
fit <- glm.CMP(formula.mu = numbids ~ leglrest + rearest + finrest +
whtknght + bidprem + insthold + size + size.sq + regulatn,
formula.nu = numbids ~ 1, data = Bids)
## As the newdata parameter is not used the fitted values are obtained
predict(fit, type = "response")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.