A standard value or unit value is a value against which an application makes comparisons. Unit values apply only to numerical variables. This example increases the variable karno by 10%, decreases the variable age by 10%, leaves the variable diagtime unchanged, and calculates the hazard ratios.
Input
- cox_coef_model: lungcancer_coef, output by CoxPH Example
- predicts: result of querying lc_new_predictors, the predicts table in CoxHazardRatio Example 1: No Reference Values
SQL Call
SELECT * FROM CoxHazardRatio ( ON lungcancer_coef AS cox_coef_model DIMENSION ON (SELECT id, name, karno * (1.1) as karno, diagtime * (1) AS diagtime, age * (0.9) AS age FROM lc_new_predictors) AS predicts PARTITION BY 1 USING PredictFeatureNames ('karno','diagtime','age') PredictFeatureUnitsColumns ('karno','diagtime','age') ACCUMULATE ('id','name') ) AS dt ORDER BY 1, 2, 3, 4, 5, 6;
Output
Numerical attributes are scaled by the unit values for comparison.
id | name | karno_units | diagtime_units | age_units | hazardratio |
---|---|---|---|---|---|
1 | John | 33.0 | 4 | 56.7 | 0.206751516164483 |
2 | James | 88.0 | 12 | 36.9 | 0.0404357176452642 |
3 | Stella | 77.0 | 3 | 64.8 | 0.0454693988565714 |
4 | Steffi | 66.0 | 5 | 56.7 | 0.070013860059579 |