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
- CoxCoeffModel: lungcancer_coef, output by CoxPH Example
- PredictorValues: result of querying lc_new_predictors, the PredictorValues table in CoxHazardRatio Example: No Reference Values
SQL Call
SELECT * FROM CoxHazardRatio ( ON lungcancer_coef AS CoxCoeffModel DIMENSION ON (SELECT id, name, karno * (1.1) as karno, diagtime * (1) AS diagtime, age * (0.9) AS age FROM lc_new_predictors) AS PredictorValues PARTITION BY 1 USING PredictFeatureNames ('karno','diagtime','age') PredictFeatureUnitsColumns ('karno','diagtime','age') Accumulate ('id','name') ) AS dt;
Output
Numerical attributes are scaled by the unit values for comparison.
id name karno_units diagtime_units age_units hazardratio -- ------ ----------- -------------- --------- -------------------- 4 steffi 66 5 56.7 0.07001386005957994 3 stella 77 3 64.8 0.045469398856572085 1 john 33 4 56.7 0.20675151616448595 2 james 88 12 36.9 0.04043571764526463
Download a zip file of all examples and a SQL script file that creates their input tables.