ddhazardPredict function for the result of ddhazard
# S3 method for fahrmeier_94
predict(object, new_data, type = c("response", "term"),
tstart = "start", tstop = "stop", use_parallel = F, sds = F,
max_threads = getOption("ddhazard_max_threads"), ...)Result of a ddhazard call
New data to base predictions on
Either "response" for predicted probability of death or "term" for predicted terms in the linear predictor
same as tstart for the stop argument
TRUE if computation for type = "response" should be computed in parallel with the parallel package
Maximum number of threads to use. -1 if it should be determined by a call to detectCores
Not used
The result of 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
fixed_terms Vector of the fixed effect terms for each observation
The result of 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
istop Vector with the index of the last bin the elements in fits is in