MJM_predict {MJMbamlss} | R Documentation |
Prediction of MJM model
Description
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.
Usage
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,
...
)
Arguments
object |
bamlss-model object to be predicted. |
newdata |
Dataset for which to create predictions. Not needed for conditional survival probabilities. |
type |
Character string indicating which type of predictions to compute.
|
dt |
The time window after the last observed measurement for which predictions should be computed. |
id |
Integer or character, that specifies the individual for which the plot should be created. |
FUN |
A function that should be applied on the samples of predictors or
parameters, depending on argument |
subdivisions |
Number of Gaussian quadrature points for survival integral calculation. |
cores |
Specifies the number of cores that should be used for
prediction. Note that this functionality is based on the
|
chunks |
Should computations be split into |
verbose |
Print information during runtime of the algorithm. |
... |
Currently not used. |