# st: nlcom question

 From "Prof. Dr. Aysit Tansel" To statalist@hsphsun2.harvard.edu Subject st: nlcom question Date Fri, 11 Jul 2008 15:55:18 +0300

Dear Statalist,
I am running the following regression after which I am trying to compute the nonlinear combinations of the coefficients as defined in "alpha", "beta" and "gamma".
in the "nlcom" command as given below. As you would notice, the"alpha" computed in the first "nlcom" appears in the computations of "beta and "gamma" in the subsequent "nlcom" commands. while this set of commands gives me the correct values for "alpha" and the "standard error of alpha", there is a problem with the subsequent computations. namely, the computed values of "beta" and "gamma" are correct, but their standard errors are incorrect since these computations treat
"alpha" as a scalar in these computations.
My first question is how to overcome this and the second question is how to output the values of "alpha" "beta" and "gamma" and their standard errors and/ or their t-ratios in the outreg file after the usual regression statistics....
Will be grateful for your help....

regress Y X1 X2 X3
_estimates hold model7500, copy
nlcom alpha:_b[X1]/(1+_b[X1], post
scalar balpha=_b[alpha]
scalar sealpha=_se[alpha]
*scalar palpha=_p[alpha]
_estimates unhold model7500
nlcom (beta: _b[X3]*(1-balpha)) (gamma: _b[X2]*(1-balpha)), post
scalar bbeta=_b[beta]
scalar sebeta=_se[beta]
scalar bgamma=_b[gamma]
scalar segamma=_se[gamma]
regress Y X1 X2 X3
outreg using myfile.out, coefastr se 10pct replace /*
*/ "alpha", balpha, "se of alpha", sealpha, "beta", bbeta, "se of beta", sebeta, /*
*/ "gamma", bgamma, "se of gamma", segamma) adec(2)

```begin:vcard
fn:Aysit Tansel
n:Tansel;Aysit
org:Middle East Technical University;Economics