Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

Re: st: Editing values in postestimation coefficient matrix

From   Scott Merryman <>
Subject   Re: st: Editing values in postestimation coefficient matrix
Date   Wed, 5 Sep 2012 12:10:49 -0500

See -help ereturn post-

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)


On Wed, Sep 5, 2012 at 11:53 AM, ETHAN SHARYGIN <> 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:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index