A syntax error occurs if you specify a censoring value of zero in the Survival Analysis task in SAS® On Demand for Academics


Incorrect LIFETEST procedure syntax is generated if you enter the number zero for the censoring value in the Nonparametric Survival Analysis task in SAS® OnDemand for Academics 3.82 and SAS® OnDemand for Academics 3.83. This problem occurs when you use the SAS® Studio interface.

This issue occurs when you complete steps similar to the following:

1. In the navigation pane, click the Tasks and Utilities section. Select the Nonparametric Survival Analysis task under Survival Analysis.

SAS Studio Tasks

2. On the DATA tab, select the data and add the appropriate columns in the Survival Time roles. Enter the number 0 as the censoring value.

Nonparametric Survival Analysis Settings

3. The following code is displayed on the Code tab:

Incorrect LIFETEST code

4. The generated code incorrectly omits the censoring value in the TIME statement. If you run the code, the following errors occur in the log:

ERROR 79-322: Expecting a (.
ERROR 76-322: Syntax error, statement will be ignored.

Workaround

To circumvent this issue, complete the following steps:

1. Click Edit to edit the SAS code.

Edit SAS code

2. Add 0 in parentheses after the Status variable in the TIME statement:

Correct LIFETEST code