View source: R/SimDat_BiVarIntCensd.R
| SimDat_BiVarIntCensd | R Documentation |
This function generates the bivariate event time data from Clayton copula model, where the marginal distributions of each outcome follows an exponential distribution. The observations windows are generated from uniform distribution.
SimDat_BiVarIntCensd( size, case = 2, lambda1, lambda2, K.tau, T1.start, T1.end, T2.start, T2.end, seed = 123 )
size |
Sample size, i.e., the number of subjects |
case |
Either one of |
lambda1 |
Hazard (rate parameter) of the exponential distribution for outcome 1 |
lambda2 |
Similar to lambda1, but just for outcome 2 |
K.tau |
Kendall's τ for Clayton copula. It determines the correlation between two outcomes in the joint distribution |
T1.start |
The observation time (left boundary) can be no earlier than this value for outcome 1 |
T1.end |
The observation time (right boundary) can be no late than this value for outcome 1 |
T2.start |
Similar to T1.start, for outcome 2 |
T2.end |
Similar to T1.end, for outcome 2 |
seed |
Random seed |
Changing lambda1 and lambda2 can lead to different proportions of left-, interval, and right-censoring. Another way is to adjust T.start/T.end. Increasing T.start can increase the proportion of left-censoring (which will lead to less interval censoring); while decreasing T.end can increase the proportion of right-censoring (and lower that of interval censoring)
A list of two elements: T1 and T2. Both including tu_, tv_, and Ind_. [tu, tv] is the observation interval with tu can be as small as 0 (most likely indicating a left-censoring) and tv can be Inf indicating a right-censoring. Ind is the indicator of censoring type.
SampleDat_case1 = SimDat_BiVarIntCensd(size = 400, case = 1, lambda1 = 0.45, lambda2 = 0.55, K.tau = 0.5,
T1.start= 0.1, T1.end = 4, T2.start = 0.1, T2.end = 4)
SampleDat_case2 = SimDat_BiVarIntCensd(size = 400, case = 2, lambda1 = 0.45, lambda2 = 0.55, K.tau = 0,
T1.start= 0.1, T1.end = 4, T2.start = 0.1, T2.end = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.