Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Statscraft 0.15.0, release v0.15.0

TIME PROGRAM

Start the transformations that define time-dependent covariates for the next COXREG.

Syntax

TIME PROGRAM.
The transformations that follow (COMPUTE, IF, RECODE, DO IF, LOOP and the like), up to the
next command of another kind, such as a label or format command, are kept for the next COXREG
instead of changing the data. COXREG runs them for every case at each event time of its
stratum up to the case's own time, with the variable T_ holding that time, so a covariate they
compute can change with time. The data may not have a variable T_, and T_ itself is not a
covariate. A missing value from the program where the case is otherwise valid is an error, and
so is a program that adds or drops cases, leaves a LOOP or DO IF open, or holds PRINT, WRITE or
XSAVE; a COXREG that stops for a fault in the program drops it, one that stops for another
error keeps it. Any other command that reads the data drops the program, as do CLEAR TIME
PROGRAM and CLEAR TRANSFORMATIONS. A case the program gives a missing value while it is
missing on a variable the program names is left out.
Not supported yet in a program: LAG, $CASENUM and values carried from case to case.

Example

TIME PROGRAM.
COMPUTE spend_t = spend * LN(T_ + 1).

statscraft help TIME PROGRAM prints the same text in the terminal. All commands