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: access coefficients from another regression
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: access coefficients from another regression
Date
Tue, 30 Oct 2012 12:56:11 +0000
You need to save the estimate from the first model before you fit the second.
For example, a convenient method is to copy estimates to a matrix:
. mat b = e(b)
. mat li b
On Tue, Oct 30, 2012 at 12:43 PM, Christina <[email protected]> wrote:
> my model consist of two equations x1 und x2 which I estimate seperatly using non linear least squares in Stata 12. α and β denote the estimated coefficients, y and z the variables.
>
> First I estimate x1 using:
> nl (x1= {α1}*y1+ {α2}*y2 + {α3}*y3)
>
> Then I estimate x2 using:
> nl (x2= {β1}*z1+ {β2*z2 + {β3}*z3)
>
> After the estimation I want to calculate a new coefficient γ using the coefficient α1 from the first equation and β1 from the second equation using the nlcom command, for example:
>
> nlcom (γ= α1/β1)
>
> My question is now, how can I access the coefficient α1 from the first equation x1? How would the code for the nlcom command look like?
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/