predict.pam_xgb: Predict hazard, cumulative hazard or survival probability

Description Usage Arguments Value

View source: R/predict.R

Description

Predict hazard, cumulative hazard or survival probability

Usage

1
2
3
4
5
6
7
8
## S3 method for class 'pam_xgb'
predict(
  object,
  newdata,
  type = c("hazard", "cumu_hazard", "surv_prob"),
  set_margin = FALSE,
  ...
)

Arguments

object

An object of class pam_xgb

newdata

A data set containing the same covariates as used for model fitting. If of class data.frame, the function will try to transform to the xgb.DMatrix format.

type

The type of prediction desired. Either hazard (type = "hazard"), cumulative hazard (type = "cumu_hazard") or survival probability (type = "surv_prob").

times

A vector of times for which predictions should be generated

Value

A matrix of predictions containing one row per observation (row in newdata) and 1 column per specified time in the times argument.


adibender/pem.xgb documentation built on Sept. 10, 2021, 7:24 p.m.