Learn R Programming

survcompare (version 0.1.2)

survcox_predict: Computes event probabilities from a trained cox model

Description

Computes event probabilities from a trained cox model

Usage

survcox_predict(trained_model, newdata, fixed_time, interpolation = "constant")

Value

returns matrix(nrow = length(newdata), ncol = length(fixed_time))

Arguments

trained_model

pre-trained cox model of coxph class

newdata

data to compute event probabilities for

fixed_time

at which event probabilities are computed

interpolation

"constant" by default, can also be "linear", for between times interpolation for hazard rates