Bookmark and Share

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-, delta method, and the derivative


From   Kristian Karlson <[email protected]>
To   [email protected]
Subject   Re: st: -nlcom-, delta method, and the derivative
Date   Sun, 23 Jan 2011 18:05:16 +0100

Bobby,
Thanks a bunch. That is a great help.
Kristian

Den 23-01-2011 17:55, Roberto G. Gutierrez, StataCorp skrev:
Not directly from -nlcom-, but you can get the equivalent from -testnl-, which
is called by -nlcom- anyway.

     . sysuse auto, clear
     . regress mpg foreign
     . nlcom (_b[foreign])2
     . testnl (_b[foreign])2  = 0

-testnl- returns the derivative matrix in r(G):

     . return list
     . mat list r(G)

the second element of which (the derivative of the expression wrt -foreign-,
the second coefficient of e(b)) will coincide with

     . di 2*_b[foreign]

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index