
Suppose you have panel data and want to fit a random-effects model to an interval-measured outcome such as income bracket or age group.
If ylower and yupper record the upper and lower endpoints of the outcome, we could type
. xtset id . xtintreg ylower yupper x1 x2 x3
to fit a model with random intercepts by id. The xtintreg command is not new, but the meintreg command is. You can fit the same model with meintreg by typing
. meintreg ylower yupper x1 x2 x3 || id:
The advantage of using meintreg is that it does not restrict us to random intercepts. What if the coefficient for x1 varies across the levels of id? We can fit a random-coefficients model by typing
. meintreg ylower yupper x1 x2 x3 || id: x1
You can see an example and learn more about the new meintreg command. That example fits a model with city-level random intercepts,
. meintreg exerlo exerup age work kids walk || cid:
The model could easily be extended to allow for random coefficients on age and work by typing
. meintreg exerlo exerup age work kids walk || cid: age work
You can also fit Bayesian panel-data (multilevel) interval regression using the bayes prefix.
Learn more about Stata's panel-data features.
Read more about multilevel interval regression in the Stata Multilevel Mixed-Effects Reference Manual; see [ME] meintreg.