*! version 1.0.0 22sep2014
help stqkm

Title

stqkm -- Indirect estimates of survival quantiles from Kaplan-Meier curves

Syntax

stqkm varname [if] [in]
[, stqkm_options]

stqkm_options

Estimation
quantiles(numlist) specifies the quantiles; default is quantiles(.5)

reps(#) perform # bootstrap replications; default is reps(20)

seed(#) set random-number seed to #

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

nodots suppress replication dots

xi is allowed with stqkm; see prefix.

stqkm allow post-estimation commands such as testparm, test, lincom, predictnl and predict; see test, lincom, predictnl and predict.

Description

stqkm indirectly estimates quantiles of the survival time from Kaplan-Meier curves, possibly by levels of a categorical variable. Confidence intervals for the quantile estimates are obtained using the bootstrap method.

Options for stqkm

Estimation

quantiles(numlist) specifies the quantiles as numbers between 0 and 1; numbers larger than 1 are interpreted as percentages. The default value is 0.5, which corresponds to the median.

reps(#) specifies the number of bootstrap replications for estimating variance-covariance matrix and standard errors of the estimated coefficients.

seed(#) sets the initial value of the random-number seed used by the bootstrap. If seed(#) is specified the bootstrapped estimates are reproducible (see set seed).

Reporting

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

nodots suppresses display of the replication dots. By default, one dot character is displayed for each successful replication. A red 'x' is displayed if stqkm returns an error or if one of the estimated quantiles is missing.

Example

Load dataset on kidney data (McGilchrist and Aisbett, Biometrics, 1991)

webuse catheter, clear

Declare data to be survival-time data

stset time, failure(infect)

Estimate median survival by gender

xi: stqkm i.female

Estimate the 25th, 50th (i.e. median) and 75th percentiles by gender

xi: stqkm i.female, q(0.25 0.50 0.75) reps(100)

Estimate the 50th percentile among female subjects

lincom [q50]_cons + [q50]_Ifemale_1

Test equality of the difference in 25th and 50th percentiles between male and female subjects

test [q25]_Ifemale_1 = [q50]_Ifemale_1

Reference

Hosmer, D. W., Lemeshow, S., & May, S. (2008). Applied survival analysis: Regression modeling of time-to-event data. Hoboken, N.J: Wiley-Interscience.

Authors

Nicola Orsini

Unit of Nutritional Epidemiology

Unit of Biostatistics

Institute of Environmental Medicine, Karolinska Institutet

Stockholm, Sweden

Andrea Discacciati

Unit of Nutritional Epidemiology

Unit of Biostatistics

Institute of Environmental Medicine, Karolinska Institutet

Stockholm, Sweden

Saved results

stqkm saves the following in e():

Scalars

e(N) number of observations

e(reps) number of bootstrap replications

e(n_q) number of estimated quantiles

Macros

e(cmd) stqkm

e(cmdline) command as typed

e(predict) program used to implement predict

e(vcetype) title used to label Std. Err.

e(vce) bootstrap

e(properties) b V

e(depvar) name of dependent variable

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

Functions

e(sample) marks estimation sample