Usage
tdSim.clst(N, duration = 24, lambda, rho = 1, beta, rateC, df, prop.fullexp = 0, maxrelexptime = 1, min.futime = 0, min.postexp.futime = 0)
Arguments
N
Number of subjects needs to be screened
duration
Length of the study in Months. The default value is 24 (months)
lambda
Scale parameter of the Weibull distribution, which is calculated as log(2) / median time to event for control group
rho
Shape parameter of the Weibull distribution, which is defaulted as 1, as we generate survival times by using the exponential distribution
beta
A numeric value that represents the exposure effect, which is the
regression coefficient (log hazard ratio) that represent the magnitude of
the relationship between the exposure covariate and the risk of an event
rateC
Rate of the exponential distribution to generate censoring times, which is calculated as log(2) / median time to censoring
df
A user-specified n (n 3) by 3 clustering data frame with columns corresponding to cat_id (category id, which is the physician site id. It can be either text strings or integers), cat_prop (category proportion, which is the proportion of subjects in corresponding a category id), and cat_exprate (category exposure rate, which is the exposure proportion corresponding to a category id). n rows corresponds to n different physician sites
prop.fullexp
A numeric value in interval [0, 1) that represents the proportion of exposed subjects that are fully exposed from the beginning to the end of the study. The default value is 0, which means all exposed subjects have an exposure status transition at some point during the study
maxrelexptime
A numeric value in interval (0, 1] that represents the maximum relative exposure time. Suppose this value is p, the exposure time for each subject is then uniformly distributed from 0 to p*subject's time in the study. The default value is 1, which means all exposed subjects have an exposure status transition at any point during the time in study.
min.futime
A numeric value that represents minimum follow-up time (in months). The default value is 0, which means no minimum follow-up time is considered. If it has a positive value, this argument will help exclude subjects that only spend a short amount of time in the study
min.postexp.futime
A numeric value that represents minimum post-exposure follow-up time (in months). The default value is 0, which means no minimum post-exposure follow-up time is considered. If it has a positive value, this argument will help exclude subjects that only spend a short amount of time in the study after their exposure