predict.gldrm: Predict method for a gldrm object

View source: R/predict-gldrm.R

predict.gldrmR Documentation

Predict method for a gldrm object

Description

Obtains predicted probabilities, predicted class, or linear predictors.

Usage

## S3 method for class 'gldrm'
predict(
  object,
  newdata = NULL,
  type = c("link", "response", "terms", "fTilt"),
  se.fit = FALSE,
  offset = NULL,
  ...
)

Arguments

object

S3 object of class "gldrm", returned from the gldrm function.

newdata

Optional data frame. If NULL, fitted values will be obtained for the training data.

type

The type of prediction required. Type "link" returns the linear predictor. Type "response" returns the fitted mean. Type "terms" returns a matrix giving the fitted values of each term in the model formula on the linear predictor scale. Type "fTilt" returns a matrix containing the fitted nonparametric distribution for each observation. Each row of the matrix corresponds to an observation in newdata, and each column corresponds to a unique response value in the training data.

se.fit

Logical. If TRUE, standard errors are also returned. Does not apply for type = "fTilt".

offset

Optional offset vector. Only used if newdata is not NULL.

...

Not used. Additional predict arguments.

Value

The object returned depends on type.


gldrm documentation built on May 29, 2024, 4:28 a.m.

Related to predict.gldrm in gldrm...