*! version 1.0.0 12dec2011
help igencoxalso see: igencox postestimation
stcox
streg

Title

igencox -- Generalized Cox model

Syntax

igencox [varlist] [if] [in] [,
options]

Model
transform(trans [#]) transformation function; default is transform(boxcox 1)

baseq(newvarname) save jump sizes of the Lambda function in newvarname

savesigma(filename [, replace]) save Sigma matrix to filename

SE/Robust
vce(bootstrap, bootstrap_options)
use a bootstrap to estimate the variance-covariance matrix

Reporting
level(#) set confidence level; default is level(95)

noshow do not show st setting information

display_options control

EM
iterate(#) perform maximum # of iterations; defalut is iterate(1000)

tolerance(#) specify tolerance for the coefficient vector; default is tolerance(1e-6)

nolog supress the iteration log

from(init_specs) specify initial values for the coefficients

Advanced
savespace conserve memory during estimation

You must stset your data before using stcox; see
[ST] stset.

varlist may contain factor variables; see fvvarlist.

Description

igencox fits, via the EM algorithm, transformation models for failure
time data (Zeng and Lin 2006, 2007). The transformation models considered are

Lambda(t|Z) = G

where G() is a known transformation function and Lambda(t) is an
unknown increasing function with Lambda(0)=0. The available
transformations include the class of Box-Cox transformations,
BoxCox(rho):

G(x) = {(1+x)^rho - 1}/rho, rho>=0

and the class of logarithmic transformations, Logarithmic(r):

G(x) = /r, r>=0

Special cases of these transformation models correspond to proportional
hazards models (Cox 1972) and proportional odds models (Bennett 1983).
Specifically, BoxCox(1) and Logarithmic(0) reduce to the proportional hazards
model, and BoxCox(0) and Logarithmic(1) reduce to the proportional odds model.

The igencox command allows you to fit more flexible survival models with
non-proportional hazards. Logarithmic transformation models assume that
covariate effects always decrease over time for any r whereas Box-Cox
models allow covariate effects to increase over time when rho>1.

Options

Model

transform(trans [#]) specifies the transformation function G() of
the cumulative hazard function Lambda(t|Z). trans can be
boxcox (default) or logarithmic. The optional # specifies
the value of the transformation parameter rho for the Box-Cox
transformation and r for the logarithmic transformation. By default,
# is set to 1.

transform(boxcox 1) or transform(logarithmic 0) corresponds to a
proportional hazards model.
transform(boxcox 0) or transform(logarithmic 1) corresponds
to a proportional odds model.

baseq(newvarname) saves the jump sizes of the Lambda(t) function in
the new variable newvarname. This option is required for later
prediction of the survivor or cumulative hazard functions using predict.

savesigma(filename [, replace]) saves the
(N_f+q)x(N_f+q) matrix Sigma to filename in the current directory,
where N_f is the number of failed observations and q is the number of
coefficients. This matrix is required by predict for calculating the
standard errors of the survivor function. replace specifies that the file
may be replaced if it already exists.

SE/Robust

vce(bootstrap, bootstrap_options) uses a
bootstrap to compute the variance-covariance matrix. bootstrap_options
allow you to control the bootstrap process. The most commonly used
bootstrap_options is reps(#), which controls the number of
replications performed. The default is reps(50).

Reporting

level(#); see [R] estimation options.

noshow prevents igencox from showing the key st variables. This
option is seldom used because most people type stset, show or
stset, noshow to set whether they want to see these variables mentioned
at the top of the output of every st command; see [ST] stset.

display_options:
noomitted,
vsquish,
noemptycells,
baselevels,
allbaselevels,
cformat(%fmt),
pformat(%fmt),
sformat(%fmt), and
nolstretch;
see [R] estimation options.

coeflegend; see
[R] estimation options.

EM

iterate(#) specifies the maximum number of iterations. The default is
iterate(1000).

tolerance(#) specifies the tolerance for the coefficient vector. The
delault is tolerance(1e-6).

nolog supresses the iteration log.

from(matname) specifies initial values for the coefficients.
from(b0) causes igencox to begin the optimization algorithm with the
values in b0. b0 must be a row vector, and the number of columns
must be equal to the number of parameters in the model.

Advanced

savespace conserves memory during estimation and turns off the calculaton
of the covariance matrix. If the covariance matrix is desired, it should be
obtained by specifying vce(bootstrap).

Examples

Example of a proportional hazards model

Setup

. use va, clear

Show st settings

. stset

Fit Cox proportional hazards model

. igencox status type1 type2 type3

or, equivalently,

. igencox status type1 type2 type3, transform(boxcox 1)

Replay results with 90% confidence intervals

. igencox, level(90)

Example of a proportional odds model

Setup

. sysuse cancer, clear

Map values for drug into 0 for placebo and 1 for nonplacebo

. replace drug = drug == 2 | drug == 3

Declare data to be survival-time data

. stset studytime, failure(died)

Fit a proportional odds model

. igencox drug age, transform(log)

or, equivalently,

. igencox drug age, transform(logarithmic 1)

Saving the jump sizes of Lambda and the Sigma matrix

Setup

. use va, clear

Fit Cox proportional hazards model and save jump sizes and Sigma

. igencox status type1 type2 type3, baseq(bq) savesigma(sigma)

Compute estimates of the survivor function and its standard errors

Saved results

igencox saves the following in e():

Scalars

e(N) number of observations

e(N_sub) number of subjects

e(N_fail) number of failures

e(risk) total time at risk

e(ties) 1 if there are ties in sample, 0 otherwise

e(k_eq_model) number of equations in model Wald test

e(d_fm) model degrees of freedom

e(ll) log likelihood

e(chi2) chi-squared statistic

e(p) significance

e(rank) rank of e(V)

e(rho) transformation parameter

e(iter) number of iterations

e(crit) convergence criterion

e(tol) tolerance for the coefficient vector

e(converged) 1 if converged, 0 otherwise

Macros

e(cmdline) command as typed

e(cmd) igencox

e(depvar) _t

e(covariates) list of covariates

e(t0) _t0

e(transformation) transformation used

e(chi2type) type of model chi-squared test

e(predict) program used to implement predict

e(baseq) name of variable specified in baseq()

e(sigma) filename specified in savesigma()

e(properties) b V

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the coefficient estimates

Functions

e(sample) marks estimation sample

Acknowledgments

This work was supported by the NIH Phase I SBIR contract “Software for
Modern Extensions of the Cox Model” (HHSN261201000090C) to StataCorp LP.

References

Bennett, S. 1983. Analysis of survival data by the proportional odds model.
Statist. Med., 2, 273-277.

Cox, D. R. 1972. Regression models and life-tables (with discussion).
J. R. Statist. Soc. B, 34, 187-220.

Zeng, D. and Lin, D. Y. 2006. Efficient estimation of semiparametric
transformation models for counting processes. Biometrika, 93, 627-640.

Zeng, D. and Lin, D. Y. 2007. Maximum likelihood estimation in
semiparametric regression models with censored data (with discussion).
J. R. Statist. Soc. B, 69, 507-564.

Authors

Rafal Raciborski, StataCorp, College Station, TX.
rraciborski@stata.com.

Yulia Marchenko, StataCorp, College Station, TX.
ymarchenko@stata.com.