Wolfgang Ludwig-Mayerhofer's Introduction to TDA

Command files for TDA

A typical TDA command file for event history analysis consists of the following:

  1. Reference to a data file and definition of variables (Data file and variables),
  2. indication of the basic event history data (i.e. starting and ending times and state of origin and of destination (Event history key variables), and finally
  3. the definition of the type of model to be estimated and the covariates to be used (if any) (Nonparametric analyses and (Semi-)parametric analyses).

These three tasks are addressed in three different sections of a command file; typically, these sections consist of one tda command with several (sub)commands. The commands usually have the form command(    );. Each command has to be terminated with a semicolon, while the subcommands, separated by commas, are given within the parentheses, as shown in more detail below.

Here's some additional hints/suggestions:


1 Lower Case / Upper Case

TDA commands are case sensitive. All the commands have to be written in lower case letters; however, variable names have to begin with an upper case letter.


2 Comments

Often, you may find it helpful to insert comments in your command files. The most important aim of comments is to help you understand what the different commands are supposed to do. At the time you are writing command files this may be obvious, but after a couple of days, weeks or even years, this may have changed.

Comments can be put anywhere in a command file. They have to begin with a #. Thus, a comment may look like this:

# Recoding occupation into class scheme

Note, however, that each line of a comment has to begin with #, such as

# Recoding occupation according to latest version of
# Goldthorpe-Erikson class scheme

At the same time, the # sign permits to place comments even immediately after a command line, such as in

ts = V1, # starting time = 0


3 Create Comments in Output

A comment helps you to understand your command file, but you may wish to have comments in your output as well. This can be achieved with the printcommand:

print ("This section uses new version of class scheme, with class III A and III b collapsed");

Note that this additional output has to be put in parentheses. In addition, it should be placed between quotes; otherwise blank spaces between words will be deleted. As print is a command, it cannot be placed within other commands, and it has to be terminated by a semicolon.

Last update: 13 May 2002