View source: R/FullyParametricCopulas.R
TCsim | R Documentation |
Generates the follow-up time and censoring indicator according to the specified model.
TCsim(
tau = 0,
Copula = "frank",
Dist.T = "lnorm",
Dist.C = "lnorm",
par.T = c(0, 1),
par.C = c(0, 1),
n = 10000
)
tau |
Value of Kendall's tau for (T,C). The default value is 0. |
Copula |
The copula family. This argument can take values from |
Dist.T |
Distribution of the survival time T. This argument can take one of the values from |
Dist.C |
Distribution of the censoring time C. This argument can take one of the values from |
par.T |
Parameter values for the distribution of T. |
par.C |
Parameter values for the distribution of C. |
n |
Sample size. |
A list containing the generated follow-up times and censoring indicators.
tau = 0.5
Copula = "gaussian"
Dist.T = "lnorm"
Dist.C = "lnorm"
par.T = c(1,1)
par.C = c(2,2)
n=1000
simdata <- TCsim(tau,Copula,Dist.T,Dist.C,par.T,par.C,n)
Y = simdata[[1]]
Delta = simdata[[2]]
hist(Y)
mean(Delta)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.