27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

790 KM<br />

Example<br />

DO IF SEX = 1.<br />

+ COMPUTE SEXRACE = RACE.<br />

ELSE.<br />

+ COMPUTE SEXRACE = RACE + SEX.<br />

END IF.<br />

KM LENGTH BY SEXRACE<br />

/STATUS=EMPLOY EVENT (1) LOST (2).<br />

• The two control variables, SEX and RACE, each with two values, 1 and 2, are combined<br />

into one factor variable, SEXRACE, with four values, 1 to 4.<br />

• KM specifies LENGTH as the survival variable and SEXRACE as the factor variable.<br />

• One KM table is produced for each factor level.<br />

STATUS Subcommand<br />

To determine whether the terminal event has occurred for a particular observation, KM checks<br />

the value of a status variable. STATUS lists the status variable and the code(s) for the occurrence<br />

of the event. The code(s) for cases lost to follow-up can also be specified.<br />

• Only one status variable can be specified. If multiple STATUS subcommands are specified,<br />

KM uses the last specification and displays a warning.<br />

• The keyword EVENT is optional, but the value list in parentheses must be specified. Use<br />

EVENT for clarity’s sake, especially when LOST is specified.<br />

• The value list must be enclosed in parentheses. All cases with non-negative times that do<br />

not have a code within the range specified after EVENT are classified as censored cases—<br />

that is, cases for which the event has not yet occurred.<br />

• The keyword LOST and the following value list are optional. LOST cannot be omitted if<br />

the value list for lost cases is specified.<br />

• When LOST is specified, all cases with non-negative times that have a code within the<br />

specified value range are classified as lost to follow-up. Cases lost to follow-up are treated<br />

as censored in the analysis, and the statistics do not change, but the two types of censored<br />

cases are listed separately in the KM table.<br />

• The value lists on EVENT or LOST can be one value, a list of values separated by blanks<br />

or commas, a range of values using the keyword THRU, or a combination.<br />

• The status variable can be either numeric or string. If a string variable is specified, the<br />

EVENT or LOST values must be enclosed in apostrophes, and the keyword THRU cannot<br />

be used.<br />

Example<br />

KM LENGTH BY SEXRACE<br />

/STATUS=EMPLOY EVENT (1) LOST (3,5 THRU 8).<br />

• STATUS specifies that EMPLOY is the status variable.<br />

• A value of 1 for EMPLOY means that the event (employment) occurred for the case.<br />

• Values of 3 and 5 through 8 for EMPLOY mean that contact was lost with the case. The<br />

different values code different causes for the loss of contact.<br />

• The summary table in the output includes columns for number lost and percentage lost,<br />

as well as for number censored and percentage censored.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!