
Simulate Patients from Posterior Predictive Distribution
Source:R/simulate.R
simulate.JointModelSamples.RdSimulate Patients from Posterior Predictive Distribution
Arguments
- object
A JointModelSamples object
- nsim
Ignored.
- seed
Ignored.
- newdata
A data frame containing data in the same format as the
object@data@survival@data. Importantly, it should contain the same covariates and factor levels as the variables used in the survival formulaobject@data@survival@formulaand the same columns used forstudy,id, andarm.- times
Vector of times to simulate SLD for all patients.
- jitter_var
Vector of variances to add noise to the observed SLD
times. The first value is for any times less than 0 and the second for any times after 0. All positive (negative) times will remain positive (negative). Jitter values are generated from a normal distribution with mean 0 and the given variances.- time_max
(
number)
the maximum time to simulate to.- time_step
(
number)
the time interval between evaluating the log-hazard function.- lambda_censor
(
number)
the censoring rate, as the parameter of an exponential distribution.- scaled_variance
Should variance be scaled by the expected value. Must be set the same as was used for model fitting.
- ...
Unused.