Description
The CoxSurvival function takes as input the coefficient and linear
prediction tbl_teradata generated by the function CoxPH (td_coxph_mle
)
and outputs a tbl_teradata of survival probabilities.
Usage
td_cox_survival_mle ( object = NULL, cox.model.table = NULL, predict.table = NULL, predict.feature.names = NULL, predict.feature.columns = NULL, accumulate = NULL, cox.model.table.sequence.column = NULL, object.sequence.column = NULL, predict.table.sequence.column = NULL )
Arguments
object |
Required Argument. |
cox.model.table |
Required Argument. |
predict.table |
Required Argument. |
predict.feature.names |
Required Argument. |
predict.feature.columns |
Required Argument. |
accumulate |
Optional Argument. |
cox.model.table.sequence.column |
Optional Argument. |
object.sequence.column |
Optional Argument. |
predict.table.sequence.column |
Optional Argument. |
Value
Function returns an object of class "td_cox_survival_mle" which is a
named list containing objects of class "tbl_teradata".
Named list members can be referenced directly with the "$" operator
using following names:
survival.probability
-
output
Examples
# Get the current context/connection con <- td_get_context()$connection # Load example data. loadExampleData("coxsurvival_example", "lungcancer","lc_new_predictors") # Create object(s) of class "tbl_teradata". lungcancer <- tbl(con, "lungcancer") lc_new_predictors <- tbl(con, "lc_new_predictors") td_coxph_out <- td_coxph_mle(data = lungcancer, feature.columns = c("trt","celltype","karno","diagtime","age","prior"), time.interval.column = "time_int", event.column = "status", categorical.columns = c("trt","celltype","prior") ) # Linear model predictor tbl_teradata and coefficient tbl_teradata that are generated from # the td_coxph_mle() function are used to determine the survival probabilities of # the new patients. # Example 1 - Pass generated coefficient tbl_teradata and linear predictor tbl_teradata. td_cox_survival_out <- td_cox_survival_mle(object = td_coxph_out$coefficient.table, cox.model.table = td_coxph_out$linear.predictor.table, predict.table = lc_new_predictors, predict.feature.names = c("trt", "celltype", "karno", "diagtime", "age", "prior"), predict.feature.columns = c("trt", "celltype", "karno", "diagtime", "age", "prior"), accumulate = c("id", "name") ) # Example 2 - Pass output of td_coxph_mle() directly as object argument. td_cox_survival_out <- td_cox_survival_mle(object = td_coxph_out, cox.model.table = td_coxph_out$linear.predictor.table, predict.table = lc_new_predictors , predict.feature.names = c("trt", "celltype", "karno", "diagtime", "age", "prior"), predict.feature.columns = c("trt", "celltype", "karno", "diagtime", "age", "prior"), accumulate = c("id", "name") )