The name is absent



22


Stata Technical Bulletin


STB-22


The dotted curves are the means which differ for males and females as well as cases and controls. The fitted curves are
drawn only for those with sex==O. The raw Poisson data is not shown.

Bugs

Note that sp_adj will fail to produce an error message if the same variable is listed twice in adjust. The result however
will be incorrect.

Figures

x

Natural Cubic Spline

Figure 1: Recovered sine wave


Figure 2: Poisson model


ssa6 Utilities for survival analysis with time-varying regressors

Dr. Philippe Bocquier, CERPOD, EMAIL [email protected]

Only one observation (record, line) per individual is needed for most survival analyses. However, when using time-varying
covariates, one needs several observations per individual. The data set typically contains separate observations for each state the
individual experiences from birth (or from the start of the period at risk) until the time of the event or of censorship. The time
of interest for calculations is the time at the end of each state—that is, the time at the end of the period represented by each
observation in the data set.

This insert presents four utilities that assist in preparing data for survival analysis when there are time-varying regressors.
censor generates a censoring variable; firstocc identifies the first occurrence of an event; slice creates additional observations
to trace fixed-time transitions; and tmerge match merges two files of ordered information on individuals. Each of these utilities
is explained and demonstrated in the sections below.

Creating a censoring variable

One difficulty in file preparation is creating a censoring variable that corresponds to the particular event one wants to study.
censor is a utility to create two variables, the waiting time until the event (or censorship), and a dummy that tells whether the
event is a failure or a censorship. Its syntax is

censor ident-var time.var [ order_var ] = exp [ if exp [ in range
n
generat e(new~vαr) [ before (exp) ]

censor creates two new variables, specified by the generate O option. The first new variable is the censoring variable, a 0/1
variable that is set to one in the period at the end of which the individual changed state. The change in state is defined by the ‘=
exp’. The censoring variable, eew~var, is set to missing in periods after the individual changed state. The second new variable,
enew~aar, is the time at censoring. This variable is also set to missing after the event occurred.



More intriguing information

1. THE USE OF EXTRANEOUS INFORMATION IN THE DEVELOPMENT OF A POLICY SIMULATION MODEL
2. The name is absent
3. Multimedia as a Cognitive Tool
4. THE MEXICAN HOG INDUSTRY: MOVING BEYOND 2003
5. Party Groups and Policy Positions in the European Parliament
6. The name is absent
7. The name is absent
8. SOME ISSUES CONCERNING SPECIFICATION AND INTERPRETATION OF OUTDOOR RECREATION DEMAND MODELS
9. APPLYING BIOSOLIDS: ISSUES FOR VIRGINIA AGRICULTURE
10. Discourse Patterns in First Language Use at Hcme and Second Language Learning at School: an Ethnographic Approach
11. A model-free approach to delta hedging
12. The name is absent
13. EXECUTIVE SUMMARIES
14. Nonparametric cointegration analysis
15. Public-private sector pay differentials in a devolved Scotland
16. The name is absent
17. AN EXPLORATION OF THE NEED FOR AND COST OF SELECTED TRADE FACILITATION MEASURES IN ASIA AND THE PACIFIC IN THE CONTEXT OF THE WTO NEGOTIATIONS
18. The English Examining Boards: Their route from independence to government outsourcing agencies
19. The name is absent
20. The name is absent