
Simulate Patients from Posterior Predictive Distribution
Source:R/simulate.R
simulate.JointModelSamples.RdSimulate Patients from Posterior Predictive Distribution
Arguments
- object
(
JointModelSamples) the object containing the posterior samples.- nsim
ignored.
- seed
ignored.
- newdata
(
data.frame) A data frame containing data in the same format as theobject@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
(
numeric) times to simulate SLD for all patients.- jitter_var
(
numeric) variances to add noise to the observed SLDtimes. 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
(
flag) Should variance be scaled by the expected value. Must be set the same as was used for model fitting.- ...
unused Unused.