An S4 class containing the function required to simulate conditional survival times
typeA character string describing the distribution used for example "Weibull"
generateParameterFunctionA function with a single parameter Nsim which returns a matrix with Nsim rows and columns Id(=1:Nsim) and the specific parameters needed by conditionalFunction below. In the Weibull case these are the specific rate and shape parameters used for each simulation
conditionalFunctionA function with the following arguments t.conditional, params, HR. t.conditional is a vector of current survival times, params is a row of the matrix returned by generateParameterFunction and HR is a vector of 1s for subjects in control arm and the hazard ratio for subjects in the active arm (if HR argument to simulate is NULL then this is a vector of 1s). The function then returns a vector of event times.
parametersA list of parameters used for the simulation. For the Weibull this is rate, shape and sigma (the uncertainty matrix of the parameters - specifically the covariance matrix from survreg)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.