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]

Re: st: 3-level model syntax calling HLM from Stata

From   Nick Cox <>
Subject   Re: st: 3-level model syntax calling HLM from Stata
Date   Mon, 13 Aug 2012 17:21:43 +0100

This is a program -hlm- from SSC. (You are asked to indicate _where_
you got user-written software.) I don't think it is often used, and
(more importantly) Sean Reardon seems to have dropped off Statalist
about the time this program was posted to SSC.

If you don't get a good answer from the list, my advice is to write to
the author privately.


On Mon, Aug 13, 2012 at 5:07 PM, Katherine King
<> wrote:

> 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
> includes
> 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
>  r(102);
>  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?
*   For searches and help try:

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