Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: nlcom produces different standard errors

 From Tunga Kantarcı To statalist@hsphsun2.harvard.edu Subject st: nlcom produces different standard errors Date Sun, 5 Dec 2010 23:10:04 +0100

```Hello,

In the code below the two nlcom commands produce different standard
errors. I pasted the output below. Why is this happening? I expected
exactly the same standard error produced from the two nlcom commands.

probit y x
nlcom normalden(_b[_cons]+_b[x]*0.4)*_b[x]
scalar thisisit = _b[_cons]+_b[x]*0.4
nlcom normalden(thisisit)*_b[x]

. probit y x

Iteration 0:   log likelihood = -1083.6381
Iteration 1:   log likelihood = -1024.6386
Iteration 2:   log likelihood = -1024.5509
Iteration 3:   log likelihood = -1024.5509

Probit regression                                 Number of obs   =       2708
LR chi2(1)      =     118.17
Prob > chi2     =     0.0000
Log likelihood = -1024.5509                       Pseudo R2       =     0.0545

------------------------------------------------------------------------------
y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
x |   3.180135   .3136994    10.14   0.000     2.565296    3.794975
_cons |  -2.186539   .1132633   -19.30   0.000    -2.408531   -1.964547
------------------------------------------------------------------------------

. nlcom normalden(_b[_cons]+_b[x]*0.4)*_b[x]

_nl_1:  normalden(_b[_cons]+_b[x]*0.4)*_b[x]

------------------------------------------------------------------------------
y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
_nl_1 |   .8351398   .0978799     8.53   0.000     .6432987    1.026981
------------------------------------------------------------------------------

. scalar thisisit = _b[_cons]+_b[x]*0.4

. nlcom normalden(thisisit)*_b[x]

_nl_1:  normalden(thisisit)*_b[x]

------------------------------------------------------------------------------
y |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
_nl_1 |   .8351398    .082381    10.14   0.000     .6736759    .9966036
------------------------------------------------------------------------------
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```