Skip to contents

Method for returning predictions of a fitted suffpcr object

Usage

# S3 method for suffpcr
predict(
  object,
  newdata = NULL,
  type = c("link", "response"),
  i = NULL,
  d = NULL,
  ...
)

Arguments

object

a suffpcr object, created by suffpcr()

newdata

optionally, a matrix of 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 "response" is on the scale of the response variable. Thus for a default binomial model the default predictions are of log-odds (probabilities on logit scale) and type = "response" gives the predicted probabilities.

i

optional vector of lambda indices to retrieve

d

optional vector of d indices to retrieve

...

ignored

Value

a matrix (or vector) of predicted values. Each column corresponds to one lambda x d estimate