View source: R/predict_event_time.R
predict_event_time | R Documentation |
calculate the predicted event time of an individual
predict_event_time(df, x, k = 3, rounding = "ceil")
df |
dataframe of non censored subjects in the training set |
x |
Risk score of the individual which will be predicted upon |
k |
integer of how many nearest event times are used to predict the event time (default is 3) |
rounding |
Options are 'ceil', 'floor' and 'no'. (default is 'ceil') |
This function predicts the event time of a subject based on the k closest risks subjects in the training dataset of non cencored individuals df. The risks in df are ranked and the predicted event time is the average of the k event times that coincide with the rank of the k closest risks. The predicted event time is rounded up to integers by default. A vectorized version predict_event_time_vec() for the parameter x exists.
predicted event time
Wang, Y., Chen, T., and Zeng, D. Support vector hazards machine: A counting process framework for learning risk scores for censored outcomes. Journal of Machine Learning Research, 17(167):1-37, 2016
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.