[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
jlinhart@stata.com (Jean Marie Linhart, StataCorp LP) |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: estimating a probit model on panel data with gllamm |

Date |
Mon, 13 Jun 2005 11:21:46 -0500 |

<Colin.Vance@dlr.de> asks: > I have panel data and have estimated the following model with gllamm: > > gllamm y x1 x2, i(persid) family(binom) link(probit) adapt trace > > The level one units are measurement occasions and the level two > units are persons, indicated by the variable persid. I have two > questions concerning this model: > > 1. Why don't I get identical results when I estimated the same model > with xtprobit using xtprobit y x1 x2, i(persid) > > Using the example of the logit, the Gllamm manual (page 34) implies > that these commands are identical. I was able to confirm this with > the logit, but it doesn't seem to work with the probit. The models being estimated are identical, although the algorithms estimating them are not. Results should be similar, though in cases where there is a high rho, the models are difficult, and results will vary. Colin might try using -quadchk- to validate the quadrature approximation in his xtprobit model, and he may try increasing the number of integration points to see if this gets better results. Colin can also send me his data privately, and I can see if I can figure out what is going on in this particular case. Here's an example I ran with simulated panel probit data: . which xtprobit /usr/local/stata9/ado/base/x/xtprobit.ado *! version 2.9.9 01apr2005 . clear . set mem 5m (5120k) . set seed 23451 . set more off . set obs 30 obs was 0, now 30 . gen i = _n . gen u = 0.5*invnorm(uniform()) . expand 30 (870 observations created) . sort i . by i: gen t = _n . gen x1 = 10*uniform() - 5.0 . gen x2 = 10*uniform() - 5.0 . gen x3 = 10*uniform() - 5.0 . gen unf = uniform() . gen pb = invnorm(unf) . gen ystar = x1 + 2*x2 + 3*x3 - 1 + u + pb . gen y = (ystar>=0) . . xtprobit y x1 x2 x3, i(i) Fitting comparison model: Iteration 0: log likelihood = -623.51242 Iteration 1: log likelihood = -256.61972 Iteration 2: log likelihood = -164.24563 Iteration 3: log likelihood = -116.57674 Iteration 4: log likelihood = -89.008857 Iteration 5: log likelihood = -74.160899 Iteration 6: log likelihood = -68.670775 Iteration 7: log likelihood = -67.784583 Iteration 8: log likelihood = -67.756233 Iteration 9: log likelihood = -67.7562 Fitting full model: rho = 0.0 log likelihood = -67.7562 rho = 0.1 log likelihood = -67.379661 rho = 0.2 log likelihood = -67.654032 Iteration 0: log likelihood = -67.379662 Iteration 1: log likelihood = -67.126396 Iteration 2: log likelihood = -67.084053 Iteration 3: log likelihood = -67.083862 Iteration 4: log likelihood = -67.083862 Random-effects probit regression Number of obs = 900 Group variable (i): i Number of groups = 30 Random effects u_i ~ Gaussian Obs per group: min = 30 avg = 30.0 max = 30 Wald chi2(3) = 43.42 Log likelihood = -67.083862 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | .900011 .1439441 6.25 0.000 .6178857 1.182136 x2 | 1.869689 .299313 6.25 0.000 1.283046 2.456332 x3 | 2.767153 .4271289 6.48 0.000 1.929996 3.604311 _cons | -.9116815 .2080215 -4.38 0.000 -1.319396 -.5039668 -------------+---------------------------------------------------------------- /lnsig2u | -1.40527 1.166452 -3.691474 .8809328 -------------+---------------------------------------------------------------- sigma_u | .4952784 .2888592 .1579089 1.553432 rho | .1969811 .1845088 .0243286 .7070155 ------------------------------------------------------------------------------ Likelihood-ratio test of rho=0: chibar2(01) = 1.34 Prob >= chibar2 = 0.123 . gllamm y x1 x2 x3, i(i) family(binomial) link(probit) adapt Running adaptive quadrature Iteration 0: log likelihood = -67.654023 Iteration 1: log likelihood = -67.090814 Iteration 2: log likelihood = -67.083602 Iteration 3: log likelihood = -67.083599 Adaptive quadrature has converged, running Newton-Raphson Iteration 0: log likelihood = -67.083599 Iteration 1: log likelihood = -67.083599 number of level 1 units = 900 number of level 2 units = 30 Condition Number = 16.283741 gllamm model log likelihood = -67.083599 ------------------------------------------------------------------------------ y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | .9004259 .1452136 6.20 0.000 .6158126 1.185039 x2 | 1.870643 .3026395 6.18 0.000 1.277481 2.463806 x3 | 2.768537 .4319998 6.41 0.000 1.921833 3.615241 _cons | -.912075 .2088829 -4.37 0.000 -1.321478 -.5026721 ------------------------------------------------------------------------------ Variances and covariances of random effects ------------------------------------------------------------------------------ ***level 2 (i) var(1): .24634291 (.29280636) ------------------------------------------------------------------------------ You can see there is good agreement between the -xtprobit- results, the -gllamm- results, and the parameters used to generate the data. --Jean Marie jlinhart@stata.com * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: initial value not feasible with -uhet- option in frontier command** - Next by Date:
**st: -diplot- available on SSC** - Previous by thread:
**st: estimating a probit model on panel data with gllamm** - Next by thread:
**Re: st: Reading the letters in a name up to a particularcharacter in Stata 8.2** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |