Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: nlcom produces different standard errors
From
Stas Kolenikov <[email protected]>
To
[email protected]
Subject
Re: st: nlcom produces different standard errors
Date
Sun, 5 Dec 2010 17:22:03 -0600
The latter part does not account for sampling variability in
-thisisit- scalar. If you made it a -local- instead of a -scalar-, it
would be substituted symbolically, and -nlcom- would know that it
needs to use it as a part of s.e. calculation. Your last -nlcom- is
essentially
lincom (normalden(-.914485))*_b[x]
On Sun, Dec 5, 2010 at 4:10 PM, Tunga Kantarcı <[email protected]> wrote:
> 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
> ------------------------------------------------------------------------------
--
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
* 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/