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: Editing values in postestimation coefficient matrix


From   ETHAN SHARYGIN <[email protected]>
To   [email protected]
Subject   Re: st: Editing values in postestimation coefficient matrix
Date   Wed, 5 Sep 2012 13:37:23 -0400

Excellent, thanks for the reference. This is a very useful command,
and solves the problem neatly.

Ethan

On Wed, Sep 5, 2012 at 1:10 PM, Scott Merryman <[email protected]> wrote:
> See -help ereturn post-
>
> Example:
> sysuse auto
> qui reg mpg price weight gear
> mat list e(b)
> mat a = e(b)
> qui reg mpg price weight head
> mat list e(b)
> mat b = e(b)
> mat b[1,1] = a[1,1]
> ereturn post b
> mat list e(b)
>
> Scott
>
>
> On Wed, Sep 5, 2012 at 11:53 AM, ETHAN SHARYGIN <[email protected]> wrote:
>> Dear Statalisters,
>>
>> Has anyone discovered a way to alter the values in the coefficient
>> matrix after a regression? I realize they can be converted to a
>> regular matrix and manipulated-- but I need to use commands to work
>> with the postestimation matrix e(b) so having them stored as a regular
>> Stata matrix would not work.
>>
>> It seems that e(b) and other values in return/ereturn are stored
>> somewhere special where mere mortal users can't toy with them. I'm
>> hoping there are some superusers here who might know if it can be
>> done, and how.
>>
>> (In short, I need to run two similar regressions and then calculate
>> predictions using coefficients for a few of the variables from the
>> first regression and coefficients for the the remainder of the
>> variables from the second-- alternative approaches to achieve this end
>> are welcome).
>>
>> Thanks, and regards,
>> Ethan
> *
> *   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/
*
*   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