fitDropout {EventPredInCure} | R Documentation |
Fit time-to-dropout model
Description
Fits a specified time-to-dropout model to the dropout data.
Usage
fitDropout(
df,
dropout_model = "exponential",
piecewiseDropoutTime = 0,
by_treatment = FALSE,
criterion = "both"
)
Arguments
df |
The subject-level dropout data, including |
dropout_model |
The dropout model used to analyze the dropout data which can be set to one of the following options: "exponential", "Weibull", "log-logistic", "log-normal", or "piecewise exponential". By default, it is set to "exponential". |
piecewiseDropoutTime |
A vector that specifies the time intervals for the piecewise exponential dropout distribution. Must start with 0, e.g., c(0, 60) breaks the time axis into 2 event intervals: [0, 60) and [60, Inf). By default, it is set to 0. |
by_treatment |
A Boolean variable to control whether or not to
fit the time-to-dropout data by treatment group. By default,
it is set to |
criterion |
A character variable to denote the criterion in model
selection to shown in the figure, which can be set to one of the following
options: "aic","bic" or "both". By default,it is set to |
Value
A list of results from the model fit including key information
such as the dropout model, model
, the estimated model parameters,
theta
, the covariance matrix, vtheta
, as well as the
Bayesian Information Criterion, bic
, and Akaike Information Criterion, aic
.
If the piecewise exponential model is used, the location
of knots used in the model, piecewiseDropoutTime
, will
be included in the list of results.
When fitting the dropout model by treatment, the outcome is presented as a list of lists, where each list element corresponds to a specific treatment group.
The fitted time-to-dropout survival curve is also returned.
References
Royston, Patrick, and Mahesh KB Parmar. "Flexible parametric proportional‐hazards and proportional‐odds models for censored survival data, with application to prognostic modelling and estimation of treatment effects." Statistics in medicine 21.15 (2002): 2175-2197.
Examples
dropout_fit <- fitDropout(df = interimData2,
dropout_model = "exponential")