*! version 1.0.10 23apr2007
help ci_marg_mu

Title

ci_marg_mu -- Simulation-based confidence intervals for
predicted marginal probabilities, etc., using gllapred

Syntax

ci_marg_mu lower upper [if] [in] [, options]

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

reps(#) set number of simulations (must be multiple of 200); default is 1000

dots display a dot for each simulation

where lower and upper are the names of new variables in which
th lower and upper confidence limits will be stored.

Description

ci_marg_mu produces simulation-based confidence intervals for
predictions using gllapred varname, mu marg after estimation
using gllamm. It repeatedly draws a sample of model parameter values from
the estimated asymptotic sampling distribution (i.e., a multivariate
normal distribution with mean given by the etimates in e(b) and covariance
matrix in e(V)) and obtains predictions using these simulated parameters.
It returns the appropriate percentiles in lower and upper. For
example, with the level(95) and reps(1000) options, the
25th largest prediction is returned in lower and the 976th largest
prediction is returned in upper.

Options

level(#) specifies the confidence level, as a percentage, for confidence
intervals. The default is level(95) or as set by set level.

reps(#) specifies the number of simulations to be used. This must be a
multiple of 200. The default is 1000.

dots specifies that a dot should be displayed after each simulation to
help guage how long the program will run.

Examples

Setup

. webuse bangladesh

Random-intercept model, analogous to xtlogit

. gllamm c_use urban age child*, i(district)

Predict marginal probability for observations where urban = 1

. gllapred prob if urban==1, marg mu

Obtain 95% confidence limits for probability

. ci_marg_mu lower95 upper95 if urban==1, level(95) reps(1000) dots

Random-intercept and random coefficient model, correlated random
effects, analogous to xtmelogit

. generate cons=1

. eq inter: cons

. eq slope: urban

. gllamm c_use urban age child*, i(district) nrf(2) eqs(inter slope)
link(logit) family(binom) adapt ip(m) nip(11)

Predict marginal probability for observations where urban = 1

. gllapred prob_rc if urban==1, marg mu

Obtain 95% approximate confidence limits for prediction

. ci_marg_mu lower_rc upper_rc if urban==1, level(95) reps(1000) dots

Setup

. webuse lowbirth

. generate id = _n

Ordinary logistic regression, analogous to logit

. gllamm low age lwt race2 race3 smoke ptd ht ui,
i(id) link(logit) family(binom) init

Predicted probabilities, analogous to predict, pr after logit

. gllapred prob, marg mu

Obtain approximate 95% confidence limits for probability

. ci_marg_mu l u

Webpage

http://www.gllamm.org

Autor

Sophia Rabe-Hesketh

References

Rabe-Hesketh, S., Skrondal, A. and Pickles, A. (2002). Reliable estimation of generalized linear mixed models
using adaptive quadrature. The Stata Journal 2 (1), 1-21.

Rabe-Hesketh, S., Skrondal, A. and Pickles, A. (2004). GLLAMM Manual. U.C. Berkeley Division of Biostatistics
Working Paper Series. Working Paper 160.

Rabe-Hesketh, S., Skrondal, A. and Pickles, A. (2005). Maximum likelihood estimation of limited and discrete
dependent variable models with nested random effects. Journal of Econometrics 128 (2), 301-323.

Rabe-Hesketh, S., Skrondal, A. (2008). Multilevel and Longidutinal Modeling Using Stata (Second Edition).
College Station, TX: Stata Press.

Saved results

There are no saved results

Also see

Online: gllamm, gllapred