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: access coefficients from another regression


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: access coefficients from another regression
Date   Thu, 1 Nov 2012 12:47:16 +0000

Should be: Austin gave much better advice than I did.


On Thu, Nov 1, 2012 at 9:09 AM, Nick Cox <[email protected]> wrote:
> -nlcom- doesn't know where that matrix comes from, so no information
> can possibly be inherited about associated uncertainty.
>
> Austin much gave better advice than I did, so follow where he is pointing.
>
> On Thu, Nov 1, 2012 at 9:00 AM,  <[email protected]> wrote:
>> Thanks a lot for the help.
>>
>> I tried the procedure with some arbitray data. The last part of the regression output looks like follows:
>>
>> -----------------------------------------------------------------------
>>    x  |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval ------+----------------------------------------------------------------
>>  Mck  |  -.2622068   .0173646   -15.10   0.000    -.2962768   -.2281368
>>  Acy  |  -10.01862   1.684471    -5.95   0.000     -13.3236   -6.713626
>>  Acw2 |  -53.35768   4.470133   -11.94   0.000    -62.12823   -44.58712
>>
>> . mat b = e(b)
>> . mat li b
>>
>>
>> b[1,3]
>>            Mck:        Acy:       Acw2:
>>          _cons       _cons       _cons
>> y1  -.26220681  -10.018615  -53.357676
>>
>>
>> Than I would like to calculte γ= Mck / Acy
>>
>>  . nlcom ( γ:  b[1,1]/b[1,2])
>>
>>           γ:  b[1,1]/b[1,2]
>>
>> -----------------------------------------------------------------------
>>    x1  |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
>> -------------+--------------------------------------------------------        γ |    .026172          .        .       .            .           .
>> -----------------------------------------------------------------------
>>
>> Now my question is: Why is there no Std. Err. given? What did I do wrong? How can I get these values?
>>
>> Thanks a lot for your help.
>>
>> Christina
>>
>>
>>
>>> 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,  <[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/


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