Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: 3-level model syntax calling HLM from Stata

From   Katherine King <>
Subject   st: 3-level model syntax calling HLM from Stata
Date   Mon, 13 Aug 2012 12:07:31 -0400

I am running Sean Reardon's -hlm module within Stata (version 10).  I
have been successfully using this setup for months on this machine
with 2-level models.

However, now I want to run 3-level models with individuals in tracts
in regions.  My question is about the syntax for 3-level models when
calling from Stata.  Reardon's documentation covers 2-level models but
a command for 3-level models.

First, I successfully created the mdm and other files:

hlm mkmdm using filename, id2(tract) id3(region) l1(`l1var')
l2(`l2var') l3(`l3var') miss(analysis) nodta replace

Then I attempted to run a 3-level model:

hlm hlm3 depvar int(int rand) wgt1(weight1) rand, cmd(depvar) run noeq
robust replace

Response from Stata:

 Too few variables specified

 I also tried (this is wrong):

hlm hlm3 depvar int(int rand (int rand)) wgt1(weight1) rand,
cmd(depvar) run noeq robust replace

In a previous post to this list, someone had asked this question but
the matter was not resolved as the person was referred to xtmixed.  In
my experience, xtmixed is too slow, and the results are different
enough to cause problems.

Could someone please share the correct syntax for a basic 3-level
model using Stata to call HLM?

 Thank you,

*   For searches and help try:

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