predict.BranchGLM {BranchGLM} | R Documentation |
Gets predictions from a BranchGLM
object.
## S3 method for class 'BranchGLM'
predict(object, newdata = NULL, type = "response", ...)
object |
a |
newdata |
a dataframe, if not specified then the data the model was fit on is used. |
type |
one of "linpreds" or "response", if not specified then "response" is used. |
... |
further arguments passed to or from other methods. |
linpreds corresponds to the linear predictors and response is on the scale of the response variable. Offset variables are ignored for predictions on new data.
A numeric vector of predictions.
Data <- iris
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")
predict(Fit)
### Example with new data
predict(Fit, newdata = iris[1:20,])