Note: Writing a predict function is a bit tricky. For longitudinal prediction, if subject specific predictions are wanted, then the PCRE terms must be attached to newdata and already evaluated. If the model uses standardized survival matrices, the different linear predictors should be predicted using different data sets.
MJM_predict(
object,
newdata,
type = c("link", "parameter", "probabilities", "cumhaz"),
dt,
id,
FUN = function(x) {
mean(x, na.rm = TRUE)
},
subdivisions = 7,
cores = NULL,
chunks = 1,
verbose = FALSE,
...
)bamlss-model object to be predicted.
Dataset for which to create predictions. Not needed for conditional survival probabilities.
Character string indicating which type of predictions to compute.
link returns estimates for all predictors with the respective link
functions applied, "parameter" returns the estimates for all
pedictors, "probabilities" returns the survival probabilities
conditional on the survival up to the last longitudinal measurement, and
"cumhaz" return the cumulative hazard up to the survival time or for
a time window after the last longitudinal measurement. If type is
set to "loglik", the log-likelihood of the joint model is returned.
Note that types "probabilities" and "cumhaz" are not yet
implemented.
The time window after the last observed measurement for which predictions should be computed.
Integer or character, that specifies the individual for which the plot should be created.
A function that should be applied on the samples of predictors or
parameters, depending on argument type.
Number of Gaussian quadrature points for survival integral calculation.
Specifies the number of cores that should be used for
prediction. Note that this functionality is based on the
parallel package.
Should computations be split into chunks? Prediction is
then processed sequentially.
Print information during runtime of the algorithm.
Currently not used.