Stata 15 help for mestreg_postestimation

[ME] mestreg postestimation -- Postestimation tools for mestreg

Postestimation commands

The following postestimation commands are of special interest after mestreg:

Command Description ------------------------------------------------------------------------- stcurve plot the survivor, hazard, and cumulative hazard functions estat group summarize the composition of the nested groups estat sd display variance components as standard deviations and correlations -------------------------------------------------------------------------

The following standard postestimation commands are also available:

Command Description ------------------------------------------------------------------------- contrast contrasts and ANOVA-style joint tests of estimates estat ic Akaike's and Schwarz's Bayesian information criteria (AIC and BIC) estat summarize summary statistics for the estimation sample estat vce variance-covariance matrix of the estimators (VCE) estat (svy) postestimation statistics for survey data estimates cataloging estimation results * hausman Hausman's specification test lincom point estimates, standard errors, testing, and inference for linear combinations of coefficients * lrtest likelihood-ratio test margins marginal means, predictive margins, marginal effects, and average marginal effects marginsplot graph the results from margins (profile plots, interaction plots, etc.) nlcom point estimates, standard errors, testing, and inference for nonlinear combinations of coefficients predict predictions, residuals, influence statistics, and other diagnostic measures predictnl point estimates, standard errors, testing, and inference for generalized predictions pwcompare pairwise comparisons of estimates test Wald tests of simple and composite linear hypotheses testnl Wald tests of nonlinear hypotheses ------------------------------------------------------------------------- * hausman and lrtest are not appropriate with svy estimation results.

Syntax for predict

Syntax for obtaining predictions of the outcome and other statistics

predict [type] newvarsspec [if] [in] [, statistic options]

Syntax for obtaining estimated random effects and their standard errors

predict [type] newvarsspec [if] [in], reffects [re_options]

Syntax for obtaining ML scores

predict [type] newvarsspec [if] [in], scores

newvarsspec is stub* or newvarlist.

statistic Description ------------------------------------------------------------------------- Main mean mean survival time; the default median median survival time hazard hazard eta fitted linear predictor xb linear predictor for the fixed portion of the model only stdp standard error of the fixed-portion linear prediction surv predicted survivor function density predicted density function distribution predicted distribution function ------------------------------------------------------------------------- These statistics are available both in and out of sample; type predict ... if e(sample) ... if wanted only for the estimation sample.

options Description ------------------------------------------------------------------------- Main conditional(ctype) compute statistic conditional on estimated random effects; default is conditional(ebmeans) marginal compute statistic marginally with respect to the random effects nooffset make calculation ignoring offset or exposure

Integration int_options integration options ------------------------------------------------------------------------- median may not be combined with marginal.

ctype Description ------------------------------------------------------------------------- ebmeans empirical Bayes means of random effects; the default ebmodes empirical Bayes modes of random effects fixedonly prediction for the fixed portion of the model only -------------------------------------------------------------------------

re_options Description ------------------------------------------------------------------------- Main ebmeans use empirical Bayes means of random effects; the default ebmodes use empirical Bayes modes of random effects reses(stub*|newvarlist) calculate standard errors of empirical Bayes estimates

Integration int_options integration options -------------------------------------------------------------------------

int_options Description ------------------------------------------------------------------------- intpoints(#) use # quadrature points to compute marginal predictions and empirical Bayes means iterate(#) set maximum number of iterations in computing statistics involving empirical Bayes estimators tolerance(#) set convergence tolerance for computing statistics involving empirical Bayes estimators -------------------------------------------------------------------------

Menu for predict

Statistics > Postestimation

Description for predict

predict creates a new variable containing predictions such as median and mean survival times, hazards, survivor functions, linear predictions, and standard errors.

Options for predict

+------+ ----+ Main +-------------------------------------------------------------

mean, the default, calculates the mean survival time.

median calculates the median survival time.

hazard calculates the hazard. When marginal is specified, marginal hazard is calculated as a ratio of the marginal density to the marginal survivor function.

surv calculates the predicted survivor function.

eta, xb, stdp, density, distribution, scores, conditional(), marginal, and nooffset; see [ME] meglm postestimation. marginal may not be specified with median.

reffects, ebmeans, ebmodes, and reses(); see [ME] meglm postestimation.

+-------------+ ----+ Integration +------------------------------------------------------

intpoints(), iterate(), and tolerance(); see [ME] meglm postestimation.

Syntax for margins

margins [marginlist] [, options]

margins [marginlist] , predict(statistic ...) [predict(statistic ...) ...] [options]

statistic Description ------------------------------------------------------------------------- mean mean survival time; the default median median survival time xb linear predictor for the fixed portion of the model only hazard not allowed with margins eta not allowed with margins stdp not allowed with margins surv not allowed with margins density not allowed with margins distribution not allowed with margins reffects not allowed with margins scores not allowed with margins ------------------------------------------------------------------------- Options conditional(ebmeans) and conditional(ebmodes) are not allowed with margins. Option marginal is assumed where applicable if conditional(fixedonly) is not specified.

Statistics not allowed with margins are functions of stochastic quantities other than e(b).

For the full syntax, see [R] margins.

Menu for margins

Statistics > Postestimation

Description for margins

margins estimates margins of response for mean and median survival times and linear predictions.

Examples

Setup . webuse catheter

Two-level random-intercept Weibull survival model . mestreg age female || patient:, distribution(weibull)

Predict the marginal mean survival time . predict m_marg, mean marginal

Predict the conditional mean survival time using empirical Bayes means estimates for the random effects . predict m_cond1, mean conditional

Predict the conditional mean survival time using empirical Bayes modes estimates for the random effects . predict m_cond2, mean conditional(ebmodes)

Use margins to calculate the marginal predicted means for females at different ages . margins, predict(mean marginal) at(female=0 age=(20(5)70))

Plot the results . marginsplot


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index