Statalist


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

RE: st: accessing delta-method-derived standard errors


From   "Feiveson, Alan H. (JSC-SK311)" <[email protected]>
To   <[email protected]>
Subject   RE: st: accessing delta-method-derived standard errors
Date   Thu, 12 Jun 2008 08:16:24 -0500

Hi Scott - 

As you and Paul and Marten have suggested, it looks like -nlcom- is the
easiest way to do what I want, however thanks for the tip about _diparm
- never heard of it before - but I like it! 

I think I'll pass on rewriting -xtlogit- , but thanks for pointing out
where it can be "fixed".

Al

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Scott
Merryman
Sent: Wednesday, June 11, 2008 11:51 AM
To: [email protected]
Subject: Re: st: accessing delta-method-derived standard errors

I believe that should be  -nlcom (exp(.5*[#2]_cons))-


Another way would be
-_diparm lnsig2u, level(`level') label("sigma_u")  function(exp(.5*@))
 derivative(.5*exp(.5*@))-

where the r(se) will contain the standard error.

Or (using at your own risk),
add the lines

-scalar sigma_se = r(se)- at about line #715 after the -_diparm lnsig2u,
level(`level') label("sigma_u")- line

and

-est scalar sigma_u_se = sigma_se- at about line #674 before the
-
global XTL_madapt - line.

Now:

. sysuse auto,clear
(1978 Automobile Data)

. xtlogit fore mpg, i(rep) nolog

Random-effects logistic regression              Number of obs      =
69
Group variable: rep78                           Number of groups   =
5

Random effects u_i ~ Gaussian                   Obs per group: min =
2
                                                               avg =
13.8
                                                               max =
30

                                                Wald chi2(1)       =
4.62
Log likelihood  = -31.540725                    Prob > chi2        =
0.0316

------------------------------------------------------------------------
------
     foreign |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+----------------------------------------------------------
-------------+------
         mpg |   .1462312   .0680197     2.15   0.032     .0129151
.2795474
       _cons |  -4.397192   1.712402    -2.57   0.010    -7.753439
-1.040945
-------------+----------------------------------------------------------
-------------+------
    /lnsig2u |   .8701574   1.149525                     -1.382869
3.123184
-------------+----------------------------------------------------------
-------------+------
     sigma_u |   1.545085   .8880564                       .500857
4.766404
         rho |   .4205076   .2801172                      .0708492
.8735078
------------------------------------------------------------------------
------
Likelihood-ratio test of rho=0: chibar2(01) =     7.16 Prob >= chibar2 =
0.004

. disp e(sigma_u_se)
.88805638

Scott


On Wed, Jun 11, 2008 at 11:24 AM, E. Paul Wileyto
<[email protected]> wrote:
> Check out the help on -nlcom-
>
> You would get the exponentiated version of the SE by using :
>
> -nlcom (exp([#2]_cons))
>
> That will transform the constant asscoiated with the second ML
equation.
>
> To grab that value for other things, type -return list-
>
> and you should see the matrices and scalars generated by nlcom
>
> Paul
>
>
*
*   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