predict.CoxProportionalHazard.RdSimilar to other predict methods, this function predicts fitted values from a fitted "CoxProportionalHazard" object.
# S3 method for CoxProportionalHazard predict( model, data, key, features = NULL, response.type = NULL, significance.level = NULL )
| model |
|
|---|---|
| data |
|
| key |
|
| features |
|
| response.type |
Defaults to "risk". |
| significance.level |
|
S3 methods
Predicted values are returned as a DataFrame, structured as follows.
ID: with same name and type as data's ID column.
PREDICTION: type DOUBLE, representing predicted values.
SE: standard error.
CI_LOWER: lower bound of the confidence interval.
CI_UPPER: upper bound of the confidence interval.
DataFrame data2 for prediction:
> data2$Collect() ID X1 X2 1 1 0 0 2 2 2 0 3 3 1 0 4 4 1 0 5 5 1 1 6 6 0 1 7 7 0 1
Perform prediction based on a "LogarithmicRegression" Object cph:
> predict(cph, data2, key = "ID", significance.level = 0.05,
response.type = "risk")
ID PREDICTION SE CI_LOWER CI_UPPER
1 1 0.3835904 0.4125263 0.04660757 3.157032
2 2 1.8297584 1.3858338 0.41467272 8.073876
3 3 0.8377815 0.4008941 0.32795551 2.140162
4 4 0.8377815 0.4008941 0.32795551 2.140162
5 5 2.1314132 2.0762107 0.31587249 14.382140
6 6 0.9758985 0.5758764 0.30698117 3.102398
7 7 0.9758985 0.5758764 0.30698117 3.102398