predict.BranchGLM: Predict Method for BranchGLM Objects

View source: R/BranchGLM.R

predict.BranchGLMR Documentation

Predict Method for BranchGLM Objects

Description

Gets predictions from a BranchGLM object.

Usage

## S3 method for class 'BranchGLM'
predict(object, newdata = NULL, type = "response", ...)

Arguments

object

a BranchGLM object.

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.

Details

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.

Value

A numeric vector of predictions.

Examples

Data <- iris
Fit <- BranchGLM(Sepal.Length ~ ., data = Data, family = "gaussian", link = "identity")
predict(Fit)
### Example with new data
predict(Fit, newdata = iris[1:20,])

BranchGLM documentation built on Aug. 31, 2023, 5:17 p.m.