*! version 2.0.0 ?????2012

Title

stmixed postestimation -- Post-estimation tools for stmixed

Description

The following standard post-estimation commands are available:

command description

predict predictions, residuals etc

Syntax for predict

Syntax for obtaining predictions

predict newvar [if] [in] [, statistic options]

statistic

Survival
eta linear predictor

hazard hazard

survival survival S(t)

chazard cumulative hazard

cif cumulative incidence function

rmst restricted mean survival time (integral of survival)

timelost time lost due to event (integral of cif)

options

fixedonly specifies predictions based on the fixed portion of the model.

marginal compute prediction marginally with respect to the latent variables

at(varname # [varname # ...]) predict at values of specified covariates

ci calculate confidence intervals

timevar(varname) time variable used for predictions (defaults: _t0 for longitudinal sub-model, _t for survival sub-model)

level(#) sets confidence level (default 95)

Statistics are available both in and out of sample; type
predict ... if e(sample) ... if wanted only for the
estimation sample.

Options for predict

Note that if a relative survival model has been fitted by use of the bhazard() option then survival refers to
relative survival and hazard refers to excess hazard.

Survival

eta calculates the expected value of the linear predictor

hazard calculates the predicted hazard.

survival calculates each observation's predicted survival probability.

chazard calculates the predicted cumulative hazard.

cif calculates the predicted cumulative incidence function.

rmst calculates the restricted mean survival time.

timelost calculates the time lost due to the event occuring, i.e. the integral of the cumulative incidence
function.

Subsidiary

fixedonly specifies predictions based on the fixed portion of the model.

marginal compute prediction marginally with respect to the latent variables

at(varname # [ varname # ...]) requests that the covariates specified by
the listed varname(s) be set to the listed # values. For example,
at(x1 1 x3 50) would evaluate predictions at x1 = 1 and
x3 = 50. This is a useful way to obtain
out of sample predictions.

ci calculate a confidence interval for the requested statistic and
stores the confidence limits in newvar_lci and
newvar_uci.

timevar(varname) defines the variable used as time in the predictions.
This is useful for large datasets where for plotting purposes predictions are only needed for 200 observations for example.
Note that some caution should be taken when using this option as predictions may be
made at whatever covariate values are in the first 200 rows of data.
This can be avoided by using the at() option to
define the covariate patterns for which you require the predictions.

level(#) sets the confidence level; default is level(95)
or as set by set level.

Example

This is a simulated example dataset representing a multi-centre trial scenario, with 100 centres and each centre recuiting 60 patients, resulting in
6000 observations. Two covariates were collected, a binary covariate x1 (coded 0/1), and a continuous covariate, x2, within the range [0,1].

Load dataset:

. use http://fmwww.bc.edu/repec/bocode/s/stmixed_example1

stset the data:

. stset stime, f(event=1)

We fit a mixed effect survival model, with a random intercept and Weibull distribution, adjusting for fixed effects of x1 and x2.

. stmixed x1 x2 || centre: , dist(weibull)

Predict survival based on the fixed effects only.

. predict s1, survival