[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

# RE: st: Variance of Nonlinear combination of estimators and variables

 From Maarten buis To stata list Subject RE: st: Variance of Nonlinear combination of estimators and variables Date Sun, 27 Sep 2009 15:48:56 +0000 (GMT)

```--- Vatsalya Srivastava wrote:
> I have a regression equation
> y = bo + b1.x1 + b2.x2 + b3.x2^2 [simple OLS regression]
>
> I need to estimate the standard error of [b2 + b3.x2].
>
> The closest I have come is the nlcom command, which I suppose
> estimates the variance of non linear combinations of estimators only.

What you want is not a single value with a single standard error, but
multiple values, one for each value of x2, with multiple standard errors.
The relevant command in that case is -predictnl-, see -help predictnl-
and the example below:

*------------ begin example ------------------
sysuse nlsw88, clear
gen ttl_exp2 = ttl_exp^2
gen ln_wage = ln(wage)

reg ln_wage union grade ttl_exp ttl_exp2

predictnl effect =                       ///
_b[ttl_exp] + 2*_b[ttl_exp2]*ttl_exp, ///
ci(lb ub)

sort ttl_exp
twoway rarea lb ub ttl_exp ||            ///
line effect ttl_exp,              ///
clstyle(solid) legend(off)        ///
ytitle(effect of ttl_exp)         ///
yline(0)
*----------- end example -------------------
(For more on examples I sent to the Statalist see:
http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------

*
*   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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index