Search
   >> Home >> Products >> Stata 13 >> Multilevel probit models

Multilevel probit models


Stata’s new meprobit command allows you to fit multilevel mixed-effects probit models. A multilevel mixed-effects probit model is an example of a multilevel mixed-effects generalized linear model (GLM). You can fit the latter in Stata using the new meglm command.

Let's fit a crossed-effects probit model. A crossed-effects model is a multilevel model in which the levels of random effects are not nested. We investigate the extent to which two salamander populations, whiteside and roughbutt, cross-breed. We label whiteside males wsm, whiteside females wsf, roughbutt males rbm, and roughbutt females rbf. Our dependent variable y is coded 1 if there was a successful mating and 0 otherwise. Let's fit our model:

. webuse salamander . meprobit y wsm##wsf || _all: R.male || female: note: crossed random effects model specified; option intmethod(laplace) implied Fitting fixed-effects model: Iteration 0: log likelihood = -223.01026 Iteration 1: log likelihood = -222.78736 Iteration 2: log likelihood = -222.78735 Refining starting values: Grid node 0: log likelihood = -216.49485 Fitting full model: Iteration 0: log likelihood = -216.49485 (not concave) Iteration 1: log likelihood = -214.34477 (not concave) Iteration 2: log likelihood = -212.3077 (not concave) Iteration 3: log likelihood = -212.10935 Iteration 4: log likelihood = -208.86375 Iteration 5: log likelihood = -208.16067 Iteration 6: log likelihood = -208.12877 (not concave) Iteration 7: log likelihood = -208.12581 Iteration 8: log likelihood = -208.11191 Iteration 9: log likelihood = -208.11182 Iteration 10: log likelihood = -208.11182 Mixed-effects probit regression Number of obs = 360
  No. of Observations per Group
Group Variable Groups Minimum Average Maximum
_all 1 360 360.0 360
female 60 6 6.0 6
Integration method: laplace Wald chi2(3) = 40.81 Log likelihood = -208.11182 Prob > chi2 = 0.0000
y Coef. Std. Err. z P>|z| [95% Conf. Interval]
 
1.wsm -.412228 .2699992 -1.53 0.127 -.9414167 .1169606
1.wsf -1.720389 .3256776 -5.28 0.000 -2.358705 -1.082073
 
wsm#wsf
1 1 2.121167 .362057 5.86 0.000 1.411549 2.830786
 
_cons .5951338 .2325035 2.56 0.010 .1394354 1.050832
_all>male
var(_cons) .3867524 .1790064 .15612 .9580924
female
var(_cons) .4464163 .1973862 .1876614 1.061952
LR test vs. probit regression: chi2(2) = 29.35 Prob > chi2 = 0.0000 Note: LR test is conservative and provided only for reference.

Our model has two random-effects equations, separated by ||. We use the _all notation that identifies all the observations as one big group. We use the R. notation to tell Stata to treat male as an indicator variable.

The output table includes the fixed-effect portion of our model and the estimated variance components. The estimates of the random intercepts suggest that the heterogeneity among the female salamanders is larger than the heterogeneity among the male salamanders.

If we wish, we can constrain the two random intercepts to be equal.

. constraint 1 _b[var(_cons[_all>male]):_cons] = _b[var(_cons[female]):_cons] . meprobit y wsm##wsf || _all: R.male || female:, constraint(1) nolog note: crossed random effects model specified; option intmethod(laplace) implied Mixed-effects probit regression Number of obs = 360
  No. of Observations per Group
Group Variable Groups Minimum Average Maximum
_all 1 360 360.0 360
female 60 6 6.0 6
Integration method: laplace Wald chi2(3) = 42.80 Log likelihood = -208.14476 Prob > chi2 = 0.0000 ( 1) [var(_cons[_all>male])]_cons - [var(_cons[female])]_cons = 0
y Coef. Std. Err. z P>|z| [95% Conf. Interval]
 
1.wsm -.4129665 .2715789 -1.52 0.128 -.9452514 .1193184
1.wsf -1.720531 .3091475 -5.57 0.000 -2.326449 -1.114613
 
wsm#wsf
1 1 2.119217 .3558558 5.96 0.000 1.421752 2.816681
 
_cons .5962772 .2232957 2.67 0.008 .1586255 1.033929
_all>male
var(_cons) .4155872 .1470147 .2077534 .8313353
female
var(_cons) .4155872 .1470147 .2077534 .8313353

You can also fit our model using a logit model (see melogit) or a complementary log-log model (see mecloglog).

Also watch A tour of multilevel GLMs.

The Stata Blog: Not Elsewhere Classified Find us on Facebook Follow us on Twitter LinkedIn Google+ Watch us on YouTube