The PHSELECT Procedure
CODE Statement
CODE <options>;
The CODE statement writes SAS DATA step code for computing predicted values of the fitted model to a file, to a catalog entry, or to a CAS table. The predicted values include survival probabilities and cumulative hazards at specific time points. To score new data, you can then include the file or the catalog entry in a DATA step, or you can specify the CAS table in the runCodeTable action in the dataStep action set (for more information, see SAS Viya: System Programming Guide).
Table 16.3 summarizes the options available in the CODE statement.
Table 16.3: CODE Statement Options
Option | Description |
|---|---|
Adds comments to the generated code | |
Generates cumulative hazard values at specified time points | |
Names the file in which to save the generated code | |
Specifies the numeric format width for the regression coefficients | |
Specifies the number of spaces to indent the generated code | |
Specifies a number used to construct names and labels | |
Specifies the line size for the generated code | |
Suppresses the generation of survival probabilities | |
Compares formatted values, including blank padding | |
Names an output CAS table in which to save the generated code | |
Creates variables that contain the time points at which predictions are made | |
Specifies the time points at which survival probabilities or cumulative hazards are predicted |
The following CODE statement options are particularly important:
For more information about the syntax of the CODE statement, see the section CODE Statement in Chapter 3: Shared Concepts.