untreated | R Documentation |
Calculates the counterfactual untreated event time, possibly using the recensoring method, assuming a given parameter value and returns a Surv() object
untreated(psi, time, delta, censor_time, rx, arm, autoswitch)
psi |
the parameter that measures how more rapidly the lifetime is expended under treatment |
time |
the observed failure or censoring time. |
delta |
the status of the time: 1 = observed, 0 = censored. |
censor_time |
the theoretical censoring time, either observed or set after time. Set to Inf to ignore recensoring. |
rx |
the proportion of time spent on treatment |
arm |
the randomised arm. Either a numerical indicator, with 0 as the placebo, or a factor with the lowest level as placebo. |
autoswitch |
a logical to autodetect cases of no switching. If TRUE, then if all observations in an arm have perfect compliance then recensoring is not applied in that arm. If FALSE the recensoring is applied regardless of perfect compliance. |
A Surv() object
Simon Bond
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.