------------------------------------------------------------------------------- help forcme-------------------------------------------------------------------------------

Generalized linear covariate measurement error models

cmedepvar[indepvars](label:varlist)[weight] [ifexp] [inrange] [,mevar(#)family(familyname)denom(varname)link(linkname)noconstantoffset(varname)tcovmod(varlist)simplenip(#)noadaptrobustcluster(varname)commandsindirecttotaleformlevel(#)nologtracefrom(matrix)The outcome model is specified by

depvarand [indepvars],family(familyname),link(linkname), etc.The classical measurement model for the true covariate is specified by

(label:varlist), wherelabelis the name of the true covariate (cannot be the same as an existing variable in the data set) andvarlistare the fallible (continuous) measurements of the true covariate. At least two variables are required unless themevar(#)option is used.The true covariate model is a linear regression with explanatory variables (observed covariates) [

indepvars] unless thetcovmod(varlist)option is used to specify different explanatory variables.

familynameis one of

gaussian|binomial|poisson|gamma

linknameis one of

identity||logrecip|logit|probit|cll|ologit|oprobit|ocll|

fweights andpweights are allowed; see help weights.

cmeshares the features of all estimation commands; see help estcom.

Description

cmeis a wrapper for gllamm to estimate generalized linear models with covariate measurement error by maximum likelihood using adaptive quadrature.cmeinterprets a simple syntax, prepares the data forgllamm, callsgllammand produces tailor-made output. Thecommandsoption causescmeto print out all data manipulation commands and thegllammcommand.gllammitself 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 ofdepvar;family(gaussian)is the default.

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

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

noconstantspecifies 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.

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

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

noadaptuse ordinary quadrature instead of the default adaptive quadrature.

robustspecifies that the Huber/White/sandwich estimator of variance is to be used. If you specifypweights orcluster(varname),robustis implied.

cluster(varname)specifies that the observations are independent across groups (clusters), but not necessarily within groups.varnamespecifies 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. Specifyingcluster()impliesrobust.

commandsdisplays the commands necessary to prepare the data and estimate the model ingllamminstead 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!

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

totaldisplays 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.

eformdisplays 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.

nologsuppresses the iteration log.

tracerequests that the estimated coefficient vector be printed at each iteration. In addition, all the output produced bygllammwith thetraceoption is also produced.

from(matrix)specifies a matrix of starting values.

skipcombined with thefrom(matrix)option, allows the matrix of starting values to contain extra parameters.

RemarksThe allowed link functions are

Link function

cmeoption ---------------------------------------- identitylink(identity)loglink(log)reciprocallink(recip)logitlink(logit)probitlink(probit)complementary log-loglink(cll)ordinal logitlink(ologit)ordinal probitlink(oprobit)ord. compl. log-loglink(ocll)

The allowed distribution families are

Family

cmeoption ---------------------------------------- Gaussian(normal)family(gaussian)Bernoulli/binomialfamily(binomial)Poissonfamily(poisson)Gammafamily(gamma)

If you specify

family()but notlink(), you obtain the canonical link for the family:

family()defaultlink()--------------------------------------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)

Webpagehttp://www.gllamm.org

AuthorSophia 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.

(available from sophiarh@berkeley.edu)ReferencesRabe-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 seeManual:

[U] 23 Estimation and post-estimation commands,[U] 29 Overview of Stata estimation commands,Online: help for gllamm, gllapred, gllasim; estcom, postest; cloglog,