

www.gllamm.org  
Data forGeneralized Latent Variable ModelingSkrondal, A. and RabeHesketh, S. (2004). Generalized Latent Variable Modeling: Multilevel, Longitudinal and Structural Equation Models. Chapman & Hall/CRC. 



Section 9.2Dataxerop.dat (ASCII, no variable names)Variables (names as in book): id resp cons age xero cosine sine female height stunted time age1 season time2 Some Stata commands* read the data: infile id resp cons age xero cosine sine female /* */ height stunted time age1 season time2 using xerop.dat, clear * GEE: xtgee resp age xero female cosine sine height stunted, i(id) /* */ corr(exch) l(logit) f(binom) robust eform * Random intercept model: gllamm resp age xero female cosine sine height stunted, i(id) /* */ l(logit) f(binom) trace adapt gllamm, eform * dofile available: ichs.do See here for more commands and output AcknowledgementWe thank Al Sommer, Keith West, Joanne Katz, Scott Zeger and Patrick Heagerty for allowing us to make the data available.ReferencesZeger, S. L. and Karim, M. R. (1991). Generalized linear models with random effects: A Gibbs sampling approach. Journal of the American Statistical Association 86, 7986. Diggle, P. J., Heagerty, P. J., Liang, K.Y. and Zeger, S. L. (2002). Analysis of Longitudinal Data. Oxford: Oxford University Press. 

back to outline  


Section 9.3Datami.dat (ASCII, tab delimited, variable names)Variables:
Some Stata commands* read data: insheet using mi.dat, clear * prepare data for analysis using gllamm: rename q y1 rename h y2 rename l y3 rename c y4 gen wt2 = count gen patt=_n reshape long y, i(patt) j(var) tab var, gen(d) * dofile available: : myoc.doClick here for a talk including gllamm commands for these data.
Source and ReferenceRindskopf, D. and Rindskopf, W. (1986). The value of latent class analysis in medical diagnosis. Statistics in Medicine 5, 2127. 

back to outline  


Section 9.4Datamislevy.dat (ASCII, tab delimited, variable names)Variables (as in Table 9.4): y1 y2 y3 y4 cwm cwf cbm cbf Some Stata commands* read data: insheet using mislevy, clear * dofile available: mislevy.doSee here for more commands and output Source and ReferenceMislevy, R. J. (1985). Estimation of latent group effects. Journal of the American Statistical Association 80, 993997. 

back to outline  


Section 9.5Datagum.dat (ASCII, tab delimited, variable names)Variables (as in Table 9.8): Study d1 n1 d0 n0 Some Stata commands* read data: insheet using gum.dat, clear * dofile available: gum.do See here for more commands and output Source and ReferenceSilagy, C. (2003). Nicotine replacement therapy for smoking cessation (Cochrane review). The Cochrane Library, Issue 4. Chichester: Wiley. 

back to outline  


Section 9.6Datawemp.dat (ASCII, no variable names)Variables (as in book): case y HUnemp Time Child1 Child5 Age (y is response variable: wife's employment status) Some Stata commands* read data: infile case y hunemp time child1 child5 age using wemp.dat, clear AcknowledgementWe thank Dave Stott for providing us with these data.ReferenceDavies, R. B., Elias, P. and Penn, R. (1992). The relationship between a husband's unemployment and his wife's participation in the labour force. Oxford Bulletin of Economics and Statistics 54, 145171. 

back to outline  


Section 9.7Datasnow.dat (ASCII, no variable names)Variables:
Some Stata commands* read data: infile v6 v5 v4 v3 v2 v1 wt2 using snow.dat, clear Sources and ReferencesAgresti, A. (1994). Simple capturerecapture models permitting unequal catchability and variable sampling effort. Biometrics 50, 494500. Coull, B. A. and Agresti, A. (1999). The use of mixed logit models to reflect heterogeneity in capturerecapture studies. Biometrics 55, 294301. 

back to outline  


Section 11.2Datadmft.dat (ASCII, no variable names)Variables:
Some Stata commands* read data: infile dmft1 dmft2 male ethnic school using dmft.dat, clear * prepare data: rename dmft2 y tab school, gen(s) rename s1 educ rename s2 all rename s4 enrich rename s5 rinse rename s6 hygiene tab ethnic, gen(eth) rename eth2 white rename eth3 black * Poisson model poisson y educ enrich rinse hygiene all male white black * Normal intercept model gen id=_n gllamm y educ enrich rinse hygiene all male white black, i(id) /* */ f(poiss) l(log) adapt * ZIP model zip y educ enrich rinse hygiene all male white black, inflate(_cons) AcknowledgementWe would like to thank the Royal Statistical Society for making these data used in Bohning et al. (1999) available at Royal Statistical Society Datasets WebsiteReferenceBöhning, D., Ekkehart, D., Schlattmann, P., Mendonça, L. and Kircher, U. (1999). The zeroinflated Poisson model and the decayed, missing and filled teeth index in dental epidemiology. Journal of the Royal Statistical Society, Series A 162, 195209. 

back to outline  


Section 11.3Dataepilep.dat (ASCII, tab delimited, variable names)Variables (as in book): subj y treat visit v4 lage lbas lbas_trt cons id (y is response variable) Some Stata commands* read data insheet using epilep.dat, clearSee here for a talk including gllamm commands for these data. See also: see RabeHesketh, S., Skrondal, A. and Pickles, A. (2002). Reliable estimation of generalized linear mixed models using adaptive quadrature. The Stata Journal 2, 121. ReferencesThall, P. F. and Vail, S. C. (1990). Some covariance models for longitudinal count data with overdispersion. Biometrics 46, 657671. 

back to outline  


Section 11.4Datalips.txt (ASCII, comma delimited, no variable names)Variables:
Some Stata commands* read data insheet o e smr x r1r56 n using lips.txt, clear * prepare data gen area = _n gen lne = ln(e) replace x = (x8.39)/10 * independence model (normal random effects ) gllamm o x, i(area) offset(lne) f(poiss) nip(15) adapt ReferenceClayton, D. G. and Kaldor, J. (1987). Empirical Bayes estimates of agestandardized relative risks for use in disease mapping. Biometrics 43, 671681. 

back to outline  


Section 12.4Dataangina.dat (ASCII, tab delimited, variable names)Variables:
Some Stata commands* read data insheet using angina.dat, clear SourceDanahy, D. T., Burwell, D. T., Aranov, W. S. and Prakash, R. (1976). Sustained hemodynamic and antianginal effect of high dose oral isosorbide dinitrate. Circulation 55, 381387. ReferencePickles, A. and Crouchley, R. (1995). A comparison of frailty models for multivariate survival data. Statistics in Medicine 14, 14471461. 

back to outline  


Section 13.4Databes.dat (ASCII, tab delimited, variable names)For each voting occasion there are three rows of data, one for each of the three parties. Variables:
Some Stata commands* read data insheet using bes.dat, clear * dofile available: bes.do AcknowledgementWe would like to thank Anthony Heath for allowing us to make the data available.SourceBritish Election Panel 19871992 from the UK Data Archive.ReferenceSkrondal, A. and RabeHesketh, S. (2003). Multilevel logistic regression for polytomous data and rankings. Psychometrika 68, 267287. 

back to outline  


Section 13.5Datamateria.dat (ASCII, no variable names)Variables (same as first four columns of Table 13.5): item1 item2 item3 item4 wt2 Some Stata commands* read data infile item1 item2 item3 item4 wt2 using materia.dat, clearSee gllamm manual (Section 9.4) for gllamm commands.
ReferenceCroon, M. A. (1989). Latent class models for the analysis of rankings. In: G. De Soete and K. C. Klauer (Editors), New Developments in Psychological Choice Modeling. Amsterdam: Elsevier, pp 99121. 

back to outline  


Section 13.6Datacoff.dat (ASCII, tab delimited, variable names)Variables:
Dataset for predictions in Table 13.12coffpred.dat (ASCII, tab delimited, variable names)Variables (same as coff.dat): ind alt id set brand1 brand2 cap1 cap2 price1 price2 filter therm ch Some Stata commands* read data insheet using coff.dat, clear * dofile available: coff.doNOTE THAT THERE ARE ERRORS IN TABLE 13.10; see remarks AcknowledgementWe would like to thank Michel Wedel for making the data available.ReferenceHaaijer, M. E., Wedel. M., Vriens, M. and Wansbeek, T. J. (1998). Utility covariances and context effects in conjoint MNP models. Marketing Science 17, 236252. 

back to outline  


Section 14.2Datadiet.dat (ASCII, tab delimited, variable names)Variables (99 is missing):
Some Stata commands* read data insheet using diet.dat, clear * recode 99 to missing mvdecode _all, mv(99)See this paper on gllamm and cme syntax:RabeHesketh, S. and Skrondal, A. and Pickles, A. (2003). Maximum likelihood estimation of generalized linear models with covariate measurement error. The Stata Journal 3, 385410. AcknowledgementWe would like to thank David Clayton for making the data available.ReferencesClayton, D. G. (1992). Models for the analysis of cohort and casecontrol studies with inaccurately measured exposures. In: J. H. Dwyer and M. Feinlieb and P. Lippert and H. Hoffmeister (Eds), Statistical Models for Longitudinal Studies on Health. New York: Oxford University Press. RabeHesketh, S., Pickles, and Skrondal, A. (2003). Correcting for covariate measurement error in logistic regression using nonparametric maximum likelihood estimation. Statistical Modelling 3, 215232. 

back to outline  


Section 14.3Datacervix.dat (ASCII, no variable names)Variables:
Some Stata commands* read data infile D X W using cervix.dat, clear * dofile available: cervix.do See here for more commands and output Reference and SourceCarroll, R. J., Gail, M. H. and Lubin, J. H. (1993). Casecontrol studies with errors in covariates. Journal of the American Statistical Association 88, 185199. 

back to outline  


Section 14.4Datawjobs.dat (ASCII, no variable names)Variables (names as in book):
Some Stata commands* read data infile depress risk Tx basedep age motivate educ /* */ assert single econ nonwhite x10 c1 c2 using wjobs.dat, clear * dofile available: cace.do See here for more commands and output AcknowledgementWe would like to thank Amiram Vinokur and Bengt Muthén for making the data available.ReferencesVinokur, A. D., Price, R. H. and Schul, Y. (1995). Impact of JOBS intervention on unemployed workers varying in risk for depression. American Journal of Community Psychology 19, 543562. Little, R. J. A. and Yau, L. H. Y. (1998). Statistical techniques for analyzing data from prevention trials. Psychological Methods 3, 147159. 

back to outline  


Section 14.5Datakenkel.dat (ASCII, tab delimited, variable names)Variables (names as in book): drinks advice black hlthins regmed heart hieduc Some Stata commands* read data insheet using kenkel.dat, clear * dofile available: kenkel.do See here for more commands and output AcknowledgementWe would like to thank the Journal of Applied Econometrics for making these data used in Kenkel and Terza (2001) available at Journal of Applied Econometrics Data Archive.ReferenceKenkel, D. S. and Terza, J. V. (2001). The effect of physician advice on alcohol consumption: Count regression with an endogenous treatment effect. Journal of Applied Econometrics 16, 165184. 

back to outline  


Section 14.6Dataprothro.dat (ASCII, tab delimited, variable names)prothros.dat (ASCII, tab delimited, variable names) Variables in prothro.dat (marker data):
Variables in prothros.dat (survival data):
Some Stata commands* read survival data: insheet using prothros.dat, clear * read marker data: insheet using prothro.dat, clear * dofile available: prothrobin.do See here for explanations of commands and output AcknowledgementWe thank Per Kragh Andersen for providing us with these data.ReferenceAndersen, P. K., Borgan, Ø., Gill, R. D. and Keiding, N. (1993). Statistical Models Based on Counting Processes. New York: Springer.  
back to outline  
