Usage
getpower.method1(nSim, N, duration = 24, med.TTE.Control = 24, rho = 1, med.TimeToCensor = 14, beta, exp.prop, type, scenario, prop.fullexp = 0, maxrelexptime = 1, min.futime = 0, min.postexp.futime = 0, output.fn, simu.plot = FALSE)
Arguments
nSim
Number of simulations.
N
Number of subjects to be screened.
duration
Length of the study in months; the default value is 24 (months).
med.TTE.Control
Median time to event for control group; the default value is 24 (months).
rho
Shape parameter of the Weibull distribution. Default is 1, which will generate survival times by using the exponential distribution.
med.TimeToCensor
Median time to censoring for all subjects. The default value is 14 (months).
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.
exp.prop
A numeric value between 0 and 1 (not include 0 and 1) that represents the proportion of subjects that are assigned with an exposure.
type
A text string indicating the what type of dataset is of interest. Either one of "fixed" or "td" should be inputted.
scenario
Any text string inputted by the user as an option to name a scenario that is being simulated. The use can simply put " " if he/she decide to not name the scenario.
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.
output.fn
A .csv filename to write in the output. If the filename does not exist, the function will create a new .csv file for the output.
simu.plot
A logical value indicating whether or not to output an incidence plot. The default value is FALSE.