LIB_AFTllogis {survivalSL} | R Documentation |
Library of the Super Learner for an Accelerated Failure Time (AFT) Model with a Log Logistic Distribution
Description
Fit an AFT parametric model with a log logistic distribution.
Usage
LIB_AFTllogis(times, failures, group=NULL, cov.quanti=NULL, cov.quali=NULL, data)
Arguments
times |
The name of the variable related the numeric vector with the follow-up times. |
failures |
The name of the variable related the numeric vector with the event indicators (0=right censored, 1=event). |
group |
The name of the variable related to the exposure/treatment. This variable shall have only two modalities encoded 0 for the untreated/unexposed patients and 1 for the treated/exposed ones. The default value is NULL: no specific exposure/treatment is considered. When a specific exposure/treatment is considered, it will be forced in the algorithm or related interactions will be tested when possible. |
cov.quanti |
The name(s) of the variable(s) related to the possible quantitative covariates. These variables must be numeric. |
cov.quali |
The name(s) of the variable(s) related to the possible qualitative covariates. These variables must be numeric with two levels: 0 and 1. A complete disjunctive form must be used for covariates with more levels. |
data |
A data frame for training the model in which to look for the variables related to the status of the follow-up time ( |
Details
The model is obtained by using the dist="llogis"
in the flexsurvreg
package.
Value
model |
The estimated model. |
group |
The name of the variable related to the exposure/treatment. |
cov.quanti |
The name(s) of the variable(s) related to the possible quantitative covariates. |
cov.quali |
The name(s) of the variable(s) related to the possible qualitative covariates. |
data |
The data frame used for learning. The first column is entitled |
times |
A vector of numeric values with the times of the |
hazard |
A vector of numeric values with the values of the cumulative baseline hazard function at the prediction |
predictions |
A matrix with the predictions of survivals of each subject (lines) for each observed time (columns). |
References
Jackson, C. (2016). flexsurv: A Platform for Parametric Survival Modeling in R. Journal of Statistical Software, 70(8), 1-33. doi:10.18637/jss.v070.i08
Examples
data(dataDIVAT2)
# The estimation of the model from the first 200 lignes
model <- LIB_AFTllogis(times="times", failures="failures", data=dataDIVAT2[1:200,],
cov.quanti=c("age"), cov.quali=c("hla", "retransplant", "ecd"))
# The predicted survival of the first subject of the training sample
plot(y=model$predictions[1,], x=model$times, xlab="Time (years)",
ylab="Predicted survival", col=1, type="l", lty=1, lwd=2, ylim=c(0,1))