Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Random effects probit


From   "Wiji Arulampalam" <[email protected]>
To   <[email protected]>, <[email protected]>
Subject   Re: st: Random effects probit
Date   Tue, 17 Sep 2002 09:15:48 +0100

Thank you very much for the useful reply. I actually do not understand why stata does not take the starting values from an ordinary probit?
Best
wiji



=================================
Professor Wiji Arulampalam,
Department of Economics,
University of Warwick,
Coventry,
CV4 7AL,
UK.
Tel: +44 (24) 7652 3471
Sec. Tel: +44 (24) 7652 3202
Fax: +44 (24) 7652 3032
email:  [email protected]
http://www.warwick.ac.uk/Economics/arulampalam/
RES2003: http://www.warwick.ac.uk/res2003/

>>> [email protected] 09/16/02 11:39PM >>>
--Wiji Arulampalam <[email protected]> wrote:                    

> I have just run a random effects probit using the same data on Limdep
> as well as stata7 and get very different results. I should be most
> grateful if someone could tell me whether I am doing something wrong
> please. Limdep gives a reasonable rho but stata does not!

After exchanging emails with Wiji privately, I think the problem can be solved
by choosing appropriate starting values for -xtprobit-.

The Limdep results Wiji sent to me:

--> probit;lhs=sue; rhs=one,lague;pds=ni;hpt=12;maxit=200 $
[...]
+---------+--------------+----------------+--------+---------+----------+
|Variable | Coefficient  | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X|
+---------+--------------+----------------+--------+---------+----------+
 Constant -2.658526026      .25480532      -10.434   .0000
 LAGUE     .9639215666      .24003142        4.016   .0001  .29448362E-01
 Rho       .5395074303      .10243535        5.267   .0000

In Stata, we can use the estimated coefficients from -probit- and make a guess
for the value of "rho" as the starting values:

. probit sue lague

. mat b = e(b)

. local rho = .7

. local lnsig2u = ln(`rho'/(1-`rho'))

. mat b = b, `lnsig2u'

. xtprobit sue lague, i(ind1) quad(12) from(b, copy)

Iteration 0:   log likelihood =  -396.6959
Iteration 1:   log likelihood = -322.90498
Iteration 2:   log likelihood = -321.81662
Iteration 3:   log likelihood = -321.48201
Iteration 4:   log likelihood = -321.47527
Iteration 5:   log likelihood = -321.47523
Iteration 6:   log likelihood = -321.47523

Random-effects probit                           Number of obs      =      2411
Group variable (i) : ind1                       Number of groups   =       500

Random effects u_i ~ Gaussian                   Obs per group: min =         1
                                                               avg =       4.8
                                                               max =         7

                                                Wald chi2(1)       =     13.70
Log likelihood  = -321.47523                    Prob > chi2        =    0.0002

------------------------------------------------------------------------------
         sue |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       lague |   .9639215   .2603925     3.70   0.000     .4535616    1.474281
       _cons |  -2.658526   .3061776    -8.68   0.000    -3.258623   -2.058429
-------------+----------------------------------------------------------------
    /lnsig2u |     .15836   .5165766                     -.8541115    1.170831
-------------+----------------------------------------------------------------
     sigma_u |   1.082399    .279571                      .6524272    1.795737
         rho |   .5395075   .1283378                      .2985711    .7632953
------------------------------------------------------------------------------


-xtprobit- goes to the same maximum as Limdep (having the same log-likelihood
and the estimated coefficients) with 12 quadrature points.  However, when we
change the number of quadrature points from 12 to 20, some of the estimated
standard errors become missing again.

. xtprobit sue lague, i(ind1) quad(20) from(b, copy)

Iteration 0:   log likelihood = -398.78414
Iteration 1:   log likelihood = -353.83521
Iteration 2:   log likelihood =  -332.0604
Iteration 3:   log likelihood = -327.03289
Iteration 4:   log likelihood = -326.89695
Iteration 5:   log likelihood = -326.89692

Random-effects probit                           Number of obs      =      2411
Group variable (i) : ind1                       Number of groups   =       500

Random effects u_i ~ Gaussian                   Obs per group: min =         1
                                                               avg =       4.8
                                                               max =         7

                                                Wald chi2(1)       =    113.50
Log likelihood  = -326.89692                    Prob > chi2        =    0.0000

------------------------------------------------------------------------------
         sue |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       lague |   1.768019   .1659566    10.65   0.000      1.44275    2.093288
       _cons |  -1.999568   .0575664   -34.73   0.000    -2.112397    -1.88674
-------------+----------------------------------------------------------------
    /lnsig2u |  -2.786059          .                             .           .
-------------+----------------------------------------------------------------
     sigma_u |   .2483219          .                             .           .
         rho |   .0580822          .                             .           .
------------------------------------------------------------------------------


we use -quadchk- to check the stability of the quadrature technique after the
previous -xtprobit- with 12 quadrature points.

. quadchk, noout

Refitting model quad() =  8
Refitting model quad() = 16

                         Quadrature check

               Fitted       Comparison     Comparison
             quadrature     quadrature     quadrature
             12 points      8 points       16 points
-----------------------------------------------------
Log          -321.47523     -321.59583     -321.54191
likelihood                  -.12059364      -.0666759   Difference
                             .00037513      .00020741   Relative difference
-----------------------------------------------------
sue:          .96392153      .97959511       .9789156
   lague                     .01567358      .01499407   Difference
                             .01626022      .01555528   Relative difference
-----------------------------------------------------
sue:         -2.6585261     -2.6060869     -2.6226448
   _cons                     .05243927      .03588129   Difference
                            -.01972494     -.01349669   Relative difference
-----------------------------------------------------
lnsig2u:      .15835995      .04112992      .09345529
   _cons                    -.11723003     -.06490467   Difference
                            -.74027574      -.4098553   Relative difference
-----------------------------------------------------


The output shows that changing the number of quadrature points significantly
affects the results, especially for the estimated ln(sigma_u^2).  When the
results change with the number of quadrature points, it indicates that it is
not possible to reliably approximate the integral.  So the results should be
treated as if they came from an unconverged estimation process.

If we try with different numbers of quadrature points, the results will vary.
The Limdep results Wiji sent also show:

--> probit;lhs=sue; rhs=one,lague;pds=ni;hpt=12;maxit=200 $
[...]
+---------+--------------+----------------+--------+---------+----------+
|Variable | Coefficient  | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X|
+---------+--------------+----------------+--------+---------+----------+
 Constant -2.658526026      .25480532      -10.434   .0000
 LAGUE     .9639215666      .24003142        4.016   .0001  .29448362E-01
 Rho       .5395074303      .10243535        5.267   .0000

--> probit;lhs=sue; rhs=one,lague;pds=ni;hpt=20;maxit=200 $
[...]
+---------+--------------+----------------+--------+---------+----------+
|Variable | Coefficient  | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X|
+---------+--------------+----------------+--------+---------+----------+
 Constant -2.624126188      .24731920      -10.610   .0000
 LAGUE     .9784651287      .24861435        3.936   .0001  .29448362E-01
 Rho       .5237007959      .10460116        5.007   .0000

When "hpt" (number of Hermite quadrature points) is changed from 12 to 20, the
estimated "rho" varies about 3%.


Weihua Guan <[email protected]>
Stata Corp.

*
*   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/
*
*   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/



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