Stata 15 help for cttost

[ST] cttost -- Convert count-time data to survival-time data

Syntax

cttost [, options]

options Description ------------------------------------------------------------------------- t0(t0var) name of entry-time variable wvar(wvar) name of frequency-weighted variable clear overwrite current data in memory

nopreserve do not save the original data; programmer's command ------------------------------------------------------------------------- You must ctset your data before using cttost; see [ST] ctset. nopreserve does not appear in the dialog box.

Menu

Statistics > Survival analysis > Setup and utilities > Convert count-time data to survival-time data

Description

cttost converts count-time data to their survival-time format so that they can be analyzed with Stata. Do not confuse count-time data with counting-process data, which can also be analyzed with the st commands; see [ST] ctset for a definition and examples of count data.

Options

t0(t0var) specifies the name of the new variable to create that records entry time. (For most ct data, no entry-time variable is necessary because everyone enters at time 0.)

Even if an entry-time variable is necessary, you need not specify this option. cttost will, by default, choose t0, time0, or etime according to which name does not already exist in the data.

wvar(wvar) specifies the name of the new variable to be created that records the frequency weights for the new pseudo-observations. Count-time data are actually converted to frequency-weighted st data, and a variable is needed to record the weights. This sounds more complicated than it is. Understand that cttost needs a new variable name, which will become a permanent part of the st data.

If you do not specify wvar(), cttost will, by default, choose w, pop, weight, or wgt according to which name does not already exist in the data.

clear specifies that it is okay to proceed with the conversion, even though the current dataset has not been saved on disk.

The following option is available with cttost but is not shown in the dialog box:

nopreserve speeds the conversion by not saving the original data that can be restored should things go wrong or should you press Break. nopreserve is intended for use by programmers who use cttost as a subroutine. Programmers can specify this option if they have already preserved the original data. nopreserve does not affect the conversion.

Example

Setup . webuse cttost

Display identity of key ct variables . ctset

Convert count-time data to survival-time data . cttost


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index