| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: xtlogit problem
Michele Guerin <mguerin at ovc dot uoguelph dot ca> wrote:
> I am having a problem with convergence of xtlogit models in Stata SE
> version 9.2, however, when I run the same models in Stata
> Intercooled version 9.1, the models run well. I have version 9.2
> updated to 14 Apr 2006.
Without more information on what exactly what commands you are using
and the data you are using, it is impossible to provide assistance here.
If Michele would like to provide me with details (exact commands used
and a small dataset on which the problem is reproducible), I'd be
happy to look into this. You can send this directly to me, if you'd like.
Here's what I get when I run -xtlogit- with simulated data with known
parameters:
. set seed 989123
. clear
. set obs 50
obs was 0, now 50
. generate float u= invnorm(uniform())*1.0
. generate id_2 = _n
. expand 40
(1950 observations created)
. bysort id_2: gen id_1 = _n
. generate float z1= invnorm(uniform())
. generate float x1= invnorm(uniform())
. generate y = 3 + 1*x1 + 1*z1 + u
. generate p = exp(y)/(1+exp(y))
. generate y_obs = uniform()<=p
. iis id_2
. sort id_2 y_obs x1 z1
. xtlogit y_obs x1 z1, re
Fitting comparison model:
Iteration 0: log likelihood = -709.59488
Iteration 1: log likelihood = -589.24316
Iteration 2: log likelihood = -567.75321
Iteration 3: log likelihood = -566.94188
Iteration 4: log likelihood = -566.93863
Fitting full model:
tau = 0.0 log likelihood = -566.93863
tau = 0.1 log likelihood = -549.04788
tau = 0.2 log likelihood = -540.2026
tau = 0.3 log likelihood = -535.92162
tau = 0.4 log likelihood = -534.23943
tau = 0.5 log likelihood = -534.41561
Iteration 0: log likelihood = -534.25983
Iteration 1: log likelihood = -531.56928
Iteration 2: log likelihood = -531.55193
Iteration 3: log likelihood = -531.55192
Random-effects logistic regression Number of obs = 2000
Group variable (i): id_2 Number of groups = 50
Random effects u_i ~ Gaussian Obs per group: min = 40
avg = 40.0
max = 40
Wald chi2(2) = 197.91
Log likelihood = -531.55192 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
y_obs | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | 1.170791 .1005805 11.64 0.000 .9736567 1.367925
z1 | 1.007116 .0947804 10.63 0.000 .8213501 1.192882
_cons | 3.079618 .1912536 16.10 0.000 2.704768 3.454468
-------------+----------------------------------------------------------------
/lnsig2u | -.1136151 .3084652 -.7181957 .4909655
-------------+----------------------------------------------------------------
sigma_u | .9447759 .1457152 .698306 1.278238
rho | .2134149 .0517817 .1290884 .3318384
------------------------------------------------------------------------------
Likelihood-ratio test of rho=0: chibar2(01) = 70.77 Prob >= chibar2 = 0.000
--Jean Marie
[email protected]
P.S. I will be out of the office Friday May 12 and Monday May 15, so
I may not be able to look at this again until Tuesday, May 16.
*
* 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/