Computes predicted biomarker trajectories, velocities, and accelerations for subjects based on the fitted joint ODE model. Predictions incorporate both fixed effects and subject-specific random effects.
Usage
# S3 method for class 'JointODE'
predict(
object,
newdata = NULL,
times = NULL,
parallel = FALSE,
n_cores = 0,
...
)Arguments
- object
An object of class
JointODE- newdata
Optional data frame with new subjects. If NULL, uses the training data from the model fit.
- times
Optional time points for prediction. Can be:
A numeric vector for the same times across all subjects
A named list with subject-specific time vectors
NULL to use observation times from the data (default)
- parallel
Logical flag for parallel computation (default: FALSE)
- n_cores
Number of cores for parallel processing. If 0, automatically detects available cores (default: 0)
- ...
Additional arguments (currently unused)
Value
A data.frame with columns:
idSubject identifier
timeTime points for predictions
cumhazPredicted cumulative hazard at each time point
survivalPredicted survival probability, computed as \(S(t) = \exp(-\text{cumhaz})\)
log_hazardLog instantaneous hazard at each time point
biomarkerPredicted biomarker values
velocityPredicted velocity (first derivative)
accelerationPredicted acceleration (second derivative)