View source: R/sim_outcome_joint_model.R
| sim_outcome_joint_model | R Documentation |
Simulate a survival and longitudinal outcome for a joint model
sim_outcome_joint_model( data, formula, reg_coefs, resid_sd, beta_Bh0 = NULL, ranef_vcov, type, timevar = "time", basehaz_type = "splines", shape_wb = 1.2, mean_cens = 30, .tries = 5, .up = 500L, up_step = 500L, knots = NULL, knot_range = NULL, seed = NULL, no_obs_after_event = TRUE, no_subset = FALSE, progress_bar = FALSE, ... )
data |
a |
formula |
a list of model formulas for the survival and longitudinal outcomes |
reg_coefs |
a list of regression coefficients with elements "surv" and
"long". Each of the list elements is a (named) vector.
If named, the names will be matched with the names of the
design matrix that is created from |
resid_sd |
vector of residual standard deviations for longitudinal outcomes |
beta_Bh0 |
vector of coefficients for a spline specification of the baseline hazard |
ranef_vcov |
a random effects variance-covariance matrix or a named list of such matrices when there are more than two levels (and names being equal to the grouping variables) |
type |
vector of type specifications for longitudinal outcomes |
timevar |
character string giving the variable name of the time variable for the longitudinal outcome. Should be different from the name of the survival time variable. |
basehaz_type |
character string specifying the type of baseline hazard:
|
shape_wb |
shape parameter of the weibull distribution |
mean_cens |
mean censoring time |
.tries |
integer; how often is the upper limit increased when looking for the root |
.up |
upper limit for the integration over the hazard |
up_step |
step with which |
knots |
knots for baseline hazard spline |
knot_range |
range of the knots for a spline baseline hazard; if knots are not available |
seed |
the seed value |
no_obs_after_event |
logical; should observations of the longitudinal outcome with times after the corresponding event/ censoring time be removed? |
no_subset |
logical; used for "debugging" |
progress_bar |
logical: should a progress bar be displayed |
... |
arguments passed to other functions |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.