**[ST] stintreg** -- Parametric models for interval-censored survival-time data

__Syntax__

**stintreg** [*indepvars*] [*if*] [*in*] [*weight*]**,** __int__**erval(***t_l t_u***)**
__dist__**ribution(***distname***)** [*options*]

*options* Description
-------------------------------------------------------------------------
Model
* __int__**erval(***t_l t_u***)** lower and upper endpoints for the censoring
interval
__nocons__**tant** suppress constant term
* __dist__**ribution(***distname***)** specify survival distribution
**time** use accelerated failure-time metric

Model 2
__st__**rata(***varname***)** strata ID variable
__off__**set(***varname***)** include *varname* in model with coefficient
constrained to 1
__anc__**illary(***varlist***)** use *varlist* to model the first ancillary
parameter
**anc2(***varlist***)** use *varlist* to model the second ancillary
parameter
__const__**raints(***constraints***)** apply specified linear constraints
__col__**linear** keep collinear variables
__eps__**ilon(***#***)** tolerance to treat observations as
uncensored; default is **epsilon(1e-6)**

SE/Robust
**vce(***vcetype***)** *vcetype* may be **oim**, __r__**obust**, __cl__**uster**
*clustvar*, **opg**, __boot__**strap**, or __jack__**knife**

Reporting
__l__**evel(***#***)** set confidence level; default is **level(95)**
**nohr** do not report hazard ratios
__tr__**atio** report time ratios
__nohead__**er** suppress header from coefficient table
__nocnsr__**eport** do not display constraints
*display_options* control columns and column formats, row
spacing, line width, display of omitted
variables and base and empty cells, and
factor-variable labeling

Maximization
*maximize_options* control the maximization process; seldom
used

__coefl__**egend** display legend instead of statistics
-------------------------------------------------------------------------
* **interval(***t_l t_u***)** and **distribution(***distname***)** are required.

*distname* Description
-------------------------------------------------------------------------
__e__**xponential** exponential survival distribution
__gom__**pertz** Gompertz survival distribution
__logl__**ogistic** loglogistic survival distribution
__ll__**ogistic** synonym for **loglogistic**
__w__**eibull** Weibull survival distribution
__logn__**ormal** lognormal survival distribution
__ln__**ormal** synonym for **lognormal**
__ggam__**ma** generalized gamma survival distribution
-------------------------------------------------------------------------

*varlist* may contain factor variables; see fvvarlist.
**bootstrap**, **by**, **fp**, **jackknife**, **nestreg**, **statsby**, **stepwise**, and **svy** are
allowed; see prefix.
Weights are not allowed with the **bootstrap** prefix.
**vce()** and **noheader** are not allowed with the **svy** prefix.
**fweight**s, **iweight**s, and **pweight**s may be specified.
**coeflegend** does not appear in the dialog box.
See **[ST] stintreg postestimation** for features available after estimation.

__Menu__

**Statistics > Survival analysis > Regression models >** **Interval-censored**
**parametric survival models**

__Description__

**stintreg** fits parametric models to survival-time data that can be
uncensored, right-censored, left-censored, or interval-censored. These
models are generalizations of the models fit by **streg** to support
interval-censored data. The supported survival models are exponential,
Weibull, Gompertz, lognormal, loglogistic, and generalized gamma.
Proportional-hazards (PH) and accelerated failure-time (AFT)
parameterizations are provided.

With interval-censored data, the survival-time variables are specified
with the **stintreg** command instead of using **stset**. Any **st** settings are
ignored by **stintreg**.

__Options__

+-------+
----+ Model +------------------------------------------------------------

**interval(***t_l t_u***)** specifies two time variables that contain the endpoints
of the censoring interval. *t_l* represents the lower endpoint, and
*t_u* represents the upper endpoint. **interval()** is required.

The interval time variables *t_l* and *t_u* should have the following
form:

Type of data *t_l* *t_u*
--------------------------------------------------
uncensored data *a* = [*a*,*a*] *a* *a*
interval-censored data (*a*,*b*] *a* *b*
left-censored data (0,*b*] **.** *b*
left-censored data (0,*b*] 0 *b*
right-censored data [*a*,+inf) *a* **.**
missing **.** **.**
missing 0 **.**
--------------------------------------------------
**noconstant**; see **[R] estimation options**.

**distribution(***distname***)** specifies the survival model to be fit.
**distribution()** is required.

**time** specifies that the model be fit in the accelerated failure-time
metric rather than in the log relative-hazard metric or proportional
hazards metric. This option is valid only for the exponential and
Weibull models, because these are the only models that have both a
proportional hazards and an accelerated failure-time
parameterization. Regardless of metric, the likelihood function is
the same, and models are equally appropriate viewed in either metric;
it is just a matter of changing the interpretation.

+---------+
----+ Model 2 +----------------------------------------------------------

**strata(***varname***)** specifies the stratification ID variable. Observations
with equal values of the variable are assumed to be in the same
stratum. Stratified estimates (with equal coefficients across strata
but intercepts and ancillary parameters unique to each stratum) are
then obtained. *varname* may be a factor variable; see fvvarlist.

**offset(***varname***)**; see **[R] estimation options**.

**ancillary(***varlist***)** specifies that the ancillary parameter for the
Weibull, lognormal, Gompertz, and loglogistic distributions and that
the first ancillary parameter (sigma) of the generalized log-gamma
distribution be estimated as a linear combination of *varlist*.

When an ancillary parameter is constrained to be strictly positive,
the logarithm of the ancillary parameter is modeled as a linear
combination of *varlist*

**anc2(***varlist***)** specifies that the second ancillary parameter (kappa) for
the generalized log-gamma distribution be estimated as a linear
combination of *varlist*.

**constraints(***constraints***)**, **collinear**; see **[R] estimation options**.

**epsilon(***#***)** specifies that observations with *t_u* - *t_l* < *#* be treated as
uncensored. The default is **epsilon(1e-6)**.

+-----------+
----+ SE/Robust +--------------------------------------------------------

**vce(***vcetype***)** specifies the type of standard error reported, which
includes types that are derived from asymptotic theory (**oim**, **opg**),
that are robust to some kinds of misspecification (**robust**), that
allow for intragroup correlation (**cluster** *clustvar*), and that use
bootstrap or jackknife methods (**bootstrap**, **jackknife**); see **[R]**
*vce_option*.

+-----------+
----+ Reporting +--------------------------------------------------------

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

**nohr**, which may be specified at estimation or upon redisplaying results,
specifies that coefficients rather than exponentiated coefficients be
displayed, that is, that coefficients rather than hazard ratios be
displayed. This option affects only how coefficients are displayed,
not how they are estimated.

This option is valid only for models with a natural proportional
hazards parameterization: exponential, Weibull, and Gompertz. These
three models, by default, report hazards ratios (exponentiated
coefficients).

**tratio** specifies that exponentiated coefficients, which are interpreted
as time ratios, be displayed. **tratio** is appropriate only for the
loglogistic, lognormal, and generalized gamma models, or for the
exponential and Weibull models when fit in the accelerated
failure-time metric.

**tratio** may be specified at estimation or upon replay.

**noheader** suppresses the output header, either at estimation or upon
replay.

**nocnsreport**; see **[R] estimation options**.

*display_options*: **noci**, __nopv__**alues**, __noomit__**ted**, **vsquish**, __noempty__**cells**,
__base__**levels**, __allbase__**levels**, __nofvlab__**el**, **fvwrap(***#***)**, **fvwrapon(***style***)**,
**cformat(***%fmt***)**, **pformat(%***fmt***)**, **sformat(%***fmt***)**, and **nolstretch**; see **[R]**
**estimation options**.

+--------------+
----+ Maximization +-----------------------------------------------------
*maximize_options*: __dif__**ficult**, __tech__**nique(***algorithm_spec***)**, __iter__**ate(***#***)**,
[__no__]__lo__**g**, __tr__**ace**, __grad__**ient**, **showstep**, __hess__**ian**, __showtol__**erance**,
__tol__**erance(***#***)**, __ltol__**erance(***#***)**, __nrtol__**erance(***#***)**, __nonrtol__**erance**, and
**from(***init_specs***)**; see **[R] maximize**. These options are seldom used.

Setting the optimization type to **technique(bhhh)** resets the default
*vcetype* to **vce(opg)**.

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

**coeflegend**; see **[R] estimation options**.

__Examples__

Setup
**. webuse aids**

Fit a Weibull survival model
**. stintreg i.stage, interval(ltime rtime) distribution(weibull)**

Replay results, but display coefficients rather than hazard ratios
**. stintreg, nohr**

Fit a Weibull survival model in the accelerated failure-time metric
**. stintreg i.stage, interval(ltime rtime) distribution(weibull) time**

Fit a Weibull survival model, using **dose** to model the ancillary parameter
**. stintreg i.stage, interval(ltime rtime) distribution(weibull)**
**ancillary(i.dose)**

Fit a stratified Weibull survival model
**. stintreg i.stage, interval(ltime rtime) distribution(weibull)**
**strata(dose)**

__Stored results__

**stintreg** stores the following in **e()**:

Scalars
**e(N)** number of observations
**e(N_unc)** number of uncensored observations
**e(N_lc)** number of left-censored observations
**e(N_rc)** number of right-censored observations
**e(N_int)** number of interval-censored observations
**e(k)** number of parameters
**e(k_eq)** number of equations in **e(b)**
**e(k_eq_model)** number of equations in overall model test
**e(k_aux)** number of auxiliary parameters
**e(k_dv)** number of dependent variables
**e(df_m)** model degrees of freedom
**e(ll)** log likelihood
**e(ll_0)** log likelihood, constant-only model
**e(N_clust)** number of clusters
**e(chi2)** chi-squared
**e(aux_p)** ancillary parameter (**weibull**)
**e(gamma)** ancillary parameter (**gompertz, loglogistic**)
**e(sigma)** ancillary parameter (**ggamma, lnormal**)
**e(kappa)** ancillary parameter (**ggamma**)
**e(epsilon)** tolerance for uncensored observations
**e(p)** p-value for model test
**e(rank)** rank of **e(V)**
**e(rank0)** rank of **e(V)**, constant-only model
**e(ic)** number of iterations
**e(rc)** return code
**e(converged)** **1** if converged, **0** otherwise

Macros
**e(cmd)** model or regression name
**e(cmd2)** **stintreg**
**e(cmdline)** command as typed
**e(depvar)** names of time interval variables specified in
**interval()**
**e(distribution)** distribution
**e(strata)** stratum variable
**e(title)** title in estimation output
**e(clustvar)** name of cluster variable
**e(wtype)** weight type
**e(wexp)** weight expression
**e(vce)** *vcetype* specified in **vce()**
**e(vcetype)** title used to label Std. Err.
**e(frm2)** **hazard** or **time**
**e(chi2type)** **Wald** or **LR**; type of model chi-squared test
**e(offset1)** offset for main equation
**e(opt)** type of optimization
**e(which)** **max** or **min**; whether optimizer is to perform
maximization or minimization
**e(ml_method)** type of **ml** method
**e(user)** name of likelihood-evaluator program
**e(technique)** maximization technique
**e(properties)** **b V**
**e(estat_cmd)** program used to implement **estat**
**e(predict)** program used to implement **predict**
**e(predict_sub)** **predict** subprogram
**e(marginsok)** predictions allowed by **margins**
**e(marginsnotok)** predictions disallowed by **margins**
**e(asbalanced)** factor variables **fvset** as **asbalanced**
**e(asobserved)** factor variables **fvset** as **asobserved**

Matrices
**e(b)** coefficient vector
**e(Cns)** constraints matrix
**e(ilog)** iteration log (up to 20 iterations)
**e(gradient)** gradient vector
**e(V)** variance-covariance matrix of the estimators
**e(V_modelbased)** model-based variance

Functions
**e(sample)** marks estimation sample