Description Usage Arguments Value Author(s) References See Also Examples
Random generation of survival data with a clustered and multi-state structure.
The simulation procedure is based on a copula model for each competing events block, allowing to specify the marginal distributions of time variables.
The effect of simulated frailties and covariates can be added in a proportional hazards way.
1 2 3 4 5 6 7 8 | simfms(nsim = NULL, tmat = NULL, clock = "forward",
frailty = list(dist="gamma", par= .5, type="shared"),
nclus = NULL, csize = NULL,
covs = NULL, beta = NULL,
marg = list(dist = "weibull", lambda = 1, rho = 1),
cens = list(dist = "weibull", lambda = 1, rho = 1, admin = 72),
copula = list(name = "clayton", par = 1),
format = "long")
|
nsim |
The number of subjects to simulate | ||||
tmat |
The transitions matrix | ||||
clock |
The approach to be used for tractation of baseline hazards and generation of times:
| ||||
frailty |
The frailty term specifications. A list with components:
| ||||
nclus |
The number of clusters to simulate | ||||
csize |
The size(s) of cluster | ||||
covs |
The covariates to simulate. A list with components
| ||||
beta |
The regression coefficients for covariates.
A list of the same length as | ||||
marg |
The marginal baseline hazards. A list with components
| ||||
cens |
The censoring time distributions. A list with components
| ||||
copula |
The copula model. A list with components
| ||||
format |
the data format, either |
A data.frame
containing the simulated data, with columns
Federico Rotolo <federico.rotolo@stat.unipd.it>
Rotolo, F, Legrand, Catherine, Van Keilegom, I (2012) Simulation of clustered multi-state survival data based on a copula model. Submitted
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ################################################################################
### - Cancer reduced multi-state structure - ###################################
################################################################################
trans.cancer.reduced()
simfms(nsim = NULL,
tmat = trans.cancer.reduced(),
clock = "forward",
frailty = list(dist="gamma", par= .5),
nclus = 5,
csize = 2,
covs = list(age=function(x) rnorm(x, mean=60, sd=7),
treat=function(x) rbinom(x, 1, .5)),
beta = list(age=rep(.02,5), treat=rep(2,5)),
marg = list(dist="weibull", lambda=1, rho=1),
cens = list(dist="weibull", lambda=1, rho=1, admin= 72),
copula= list(name="clayton", par= 1))
################################################################################
### - Cancer standard multi-state structure - ##################################
################################################################################
trans.cancer()
simfms(nsim = NULL,
tmat = trans.cancer(),
clock = "forward",
frailty = list(dist="gamma", par= .5),
nclus = 5,
csize = 2,
covs = list(age=function(x) rnorm(x, mean=60, sd=7),
treat=function(x) rbinom(x, 1, .5)),
beta = list(age=rep(.02, 8), treat=rep(2, 8)),
marg = list(dist="weibull", lambda=1, rho=1),
cens = list(dist="weibull", lambda=1, rho=1, admin= 72),
copula= list(name="clayton", par= 1))
################################################################################
### - Cancer extended multi-state structure - ##################################
################################################################################
trans.cancer.extended()
simfms(nsim = NULL,
tmat = trans.cancer.extended(),
clock = "forward",
frailty = list(dist="gamma", par= .5),
nclus = 5,
csize = 2,
covs = list(age=function(x) rnorm(x, mean=60, sd=7),
treat=function(x) rbinom(x, 1, .5)),
beta = list(age=rep(.02, 9), treat=rep(2, 9)),
marg = list(dist="weibull", lambda=1, rho=1),
cens = list(dist="weibull", lambda=1, rho=1, admin= 72),
copula= list(name="clayton", par= 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.