predict.SL.coxph: Prediction method for cox proportional hazard regression

Description Usage Arguments Value Examples

View source: R/SL.coxph.R

Description

Prediction method for cox proportional hazard regression

Usage

1
2
## S3 method for class 'SL.coxph'
predict(object, newdata, ...)

Arguments

object

An object of class SL.coxph

newdata

A data.frame to generate predictions for

...

Other arguments (unused)

Value

A numeric vector of predictions

Examples

1
2
3
4
5
6
7
# load cost data
data(cost_data)
# fit cox ph model
fit_coxph <- SL.coxph(Y = cost_data$totalcost, X = cost_data[, c("female", "race")],
                              newX = cost_data[, c("female", "race")])
# get back predictions
pred_coxph <- predict(fit_coxph$fit, newdata = cost_data[,c("female", "race")])

wuziyueemory/twostageSL documentation built on Oct. 19, 2020, 3:45 p.m.