-------------------------------------------------------------------------------
help for cme
-------------------------------------------------------------------------------

Generalized linear covariate measurement error models

cme depvar [indepvars] (label:varlist) [weight] [if exp] [in range] [, mevar(#) family(familyname) denom(varname) link(linkname) noconstant offset(varname) tcovmod(varlist) simple nip(#) noadapt robust cluster(varname) commands indirect total eform level(#) nolog trace from(matrix)

The outcome model is specified by depvar and [indepvars], family(familyname), link(linkname), etc.

The classical measurement model for the true covariate is specified by (label:varlist), where label is the name of the true covariate (cannot be the same as an existing variable in the data set) and varlist are the fallible (continuous) measurements of the true covariate. At least two variables are required unless the mevar(#) option is used.

The true covariate model is a linear regression with explanatory variables (observed covariates) [indepvars] unless the tcovmod(varlist) option is used to specify different explanatory variables.

familyname is one of

gaussian | binomial | poisson | gamma

linkname is one of

identity | log | recip | logit | probit | cll | ologit | oprobit | ocll |

fweights and pweights are allowed; see help weights.

cme shares the features of all estimation commands; see help estcom.

Description

cme is a wrapper for gllamm to estimate generalized linear models with covariate measurement error by maximum likelihood using adaptive quadrature. cme interprets a simple syntax, prepares the data for gllamm, calls gllamm and produces tailor-made output. The commands option causes cme to print out all data manipulation commands and the gllamm command. gllamm itself should be used to extend the model and for prediction and simulation using gllapred or {help gllasim). The covariate measurement error model comprises three submodels: the outcome model, the measurement model and the true covariate model.

The outcome model is a generalized linear model including both observed covariates and the true, unobserved or latent covariate.

The measurement model assumes that the continuous repeated measurements of the true covariate are independently normally distributed with mean equal to the true covariate and constant variance (classical measurement model).

The true covariate model is a linear regression of the true covariate on the observed covariates. Use tcovmod(varlit) to use a different set of observed covariates in the true covariate model than in the outcome model.

See Rabe-Hesketh, Skrondal, and Pickles (2003). The Stata Journal 3, 386-411 for full details.

Options

mevar(#) specifies the measurement error variance. This option is required if there are no replicate measurements.

family(familyname) specifies the distribution of depvar; family(gaussian) is the default.

denom(varname) specifies the binomial denominator for the binomial link when depvar is the number of successes out of a fixed number of trials.

link(linkname) specifies the link function; the default is the canonical link for the family() specified.

noconstant specifies that the linear predictor has no intercept term, thus forcing it through the origin on the scale defined by the link function.

offset(varname) specifies an offset to be added to the linear predictor: g(E(y)) = xB + varname.

tcovmod(varlist) specifies the observed covariates to be used in the true covariate model; a constant will automatically be estimated.

simple specifies that there are no observed covariates in the true covariate model.

nip(#) the number of quadrature points to be used.

noadapt use ordinary quadrature instead of the default adaptive quadrature.

robust specifies that the Huber/White/sandwich estimator of variance is to be used. If you specify pweights or cluster(varname), robust is implied.

cluster(varname) specifies that the observations are independent across groups (clusters), but not necessarily within groups. varname specifies to which group each observation belongs; e.g., cluster(personid) in data with repeated observations on individuals. cluster() affects the estimated standard errors and variance-covariance matrix of the estimators (VCE), but not the estimated coefficients. Specifying cluster() implies robust.

commands displays the commands necessary to prepare the data and estimate the model in gllamm instead of estimating the model. These commands can be copied into a do-file and should work without further editing. Note that the data will be changed by the do-file!

indirect displays the indirect effects of observed covariates on the outcome via the true covariate - this is shown for all covariates in the true covariate model.

total displays the total effects (indirect effects plus direct effects) of observed covariates on the outcome via the true covariate - this is shown for all covariates in the true covariate model. For observed covariates that have no direct effects, the total effects equal the indirect effects.

eform displays the exponentiated coefficients and corresponding standard errors and confidence intervals. For binomial models with the logit link, exponentiation results in odds ratios; for Poisson models with the log link, exponentiated coefficients are rate ratios.

level(#) specifies the confidence level, in percent, for confidence intervals (default 95); see help level.

nolog suppresses the iteration log.

trace requests that the estimated coefficient vector be printed at each iteration. In addition, all the output produced by gllamm with the trace option is also produced.

from(matrix) specifies a matrix of starting values.

skip combined with the from(matrix) option, allows the matrix of starting values to contain extra parameters.

Remarks

The allowed link functions are

Link function cme option ---------------------------------------- identity link(identity) log link(log) reciprocal link(recip) logit link(logit) probit link(probit) complementary log-log link(cll) ordinal logit link(ologit) ordinal probit link(oprobit) ord. compl. log-log link(ocll)

The allowed distribution families are

Family cme option ---------------------------------------- Gaussian(normal) family(gaussian) Bernoulli/binomial family(binomial) Poisson family(poisson) Gamma family(gamma)

If you specify family() but not link(), you obtain the canonical link for the family:

family() default link() -------------------------------------- family(gaussian) link(identity) family(binomial) link(logit) family(poisson) link(log) family(gamma) link(recip)

Examples

. * simulate data . set obs 100 . gen true = invnorm(uniform()) . gen fall1 = true + 0.3*invnorm(uniform()) . gen fall2 = true + 0.3*invnorm(uniform()) . gen fall3 = true + 0.3*invnorm(uniform()) . gen ynorm = 2 + 3*true + invnorm(uniform()) . gen yord = cond(ynorm<-2,1,cond(ynorm<0,2,cond(ynorm<3,3,4)))

. * estimate models . cme ynorm (true: fall1 fall2 fall3) . cme ynorm (true: fall1 fall2 fall3), mevar(.077) . cme yord (true: fall1 fall2 fall3), f(binom) l(oprobit)

Webpage

http://www.gllamm.org

Author

Sophia Rabe-Hesketh (sophiarh@berkeley.edu) as part of joint work with Anders Skrondal and Andrew Pickles. We are very grateful to Stata Corporation for helping us to speed up gllamm.

References (available from sophiarh@berkeley.edu)

Rabe-Hesketh, S., Skrondal, A. and Pickles, A. (2003). Maximum likelihood estimation of generalized linear models with covariate measurement error. The Stata Journal 3, 386-411.

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

Rabe-Hesketh, S., Pickles, A. and Skrondal, S. (2001). Correcting for covariate measurement error in logistic regression using nonparametric maximum likelihood estimation. Statistical Modelling 3, 215-232.

Rabe-Hesketh, S., Skrondal, A. and Pickles, A. (2004). Generalized multilevel structural equation modeling. Psychometrika, in press.

Rabe-Hesketh, S., Pickles, A. and Skrondal, S. (2001). GLLAMM Manual. Technical Report 2001/01, Department of Biostatistics and Computing, Institute of Psychiatry, King's College, London, see http://www.gllamm.org

Also see

Manual: [U] 23 Estimation and post-estimation commands, [U] 29 Overview of Stata estimation commands,

Online: help for gllamm, gllapred, gllasim; estcom, postest; cloglog,