ddhazard
ddhazard
"predict"(object, new_data, type = c("response", "term"), tstart = "start", tstop = "stop", use_parallel = F, sds = F, max_threads = getOption("ddhazard_max_threads"), ...)
ddhazard
call"response"
for predicted probability of death or "term"
for predicted terms in the linear predictortstart
for the stop argumentTRUE
if computation for type = "response"
should be computed in parallel with the parallel
packagedetectCores
type = "term"
is a list with the following elements
terms |
Is a 3D array. The first dimension is the number of bins, the second dimension is rows in new_data and the last dimension is the state space terms |
sds |
Similar to terms for the point wise confidence intervals using the smoothed co-variance matrices |
type = "response"
is a list with the elements below. The function check if there are columns in new_data
which's names match tstart
and tstop
. If not, then each row in new data will get a predicted probability of dying in every bin.
fits |
Fitted probability of dying |
istart |
Vector with the index of the first bin the elements in fits is in |