Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: some unexplained issues with coefficient comparisons


From   Giovanni Bruno <[email protected]>
To   [email protected]
Subject   Re: st: some unexplained issues with coefficient comparisons
Date   Mon, 3 Jul 2006 00:52:38 +0200

Narasimhan

Kit's code can be extended to support -estimates store-
and -suest-. Following is an example (which won't support
-estimates replay-, though).

Giovanni

------------------------------ 
sysuse auto,clear
reg price mpg headroom
mat vce = e(V) * 20
mat b = e(b)

capt program drop eret3
program eret3, eclass
syntax , B(string) V(string)
tempvar touse
gen `touse'=e(sample)
local pred `e(predict)'
ereturn post `b' `v', esample(`touse')
ereturn local cmd "eret3"
ereturn local predict "`pred'"
ereturn display
end

eret3, b(b) v(vce)
mat list e(V)

------------------------------

> Thanks for this. This works. But this does not seem to replace the
> existing stored estimates when I run the regression and use "est store
> ....", because I need to use suest later to compare. I tried using
> estimates store at the end of this code but it is valid only for the
> last estimates. is there any way to make this estimate replace the
> last estimates ?
> 
> Thanks again for all your help and cooperation.
> 
> On 6/30/06, Kit Baum <[email protected]> wrote:
> > Narasimhan Sowmyanarayanan said
> >
> > 1. Is there a more efficient method that I can implement
> > 2. Am I doing somethig wrong with my eret2 command.
> >
> > I will be grateful if someone can resolve this problem. Mark: I
> > appreciate your help and reply so far.
> >
> >
> > ---------------
> > sysuse auto,clear
> > reg price mpg headroom
> > mat vce = e(V) * 20
> > mat b = e(b)
> >
> > capt program drop eret3
> > program eret3, eclass
> > syntax , B(string) V(string)
> > ereturn post `b' `v'
> > ereturn display
> > end
> >
> > eret3, b(b) v(vce)
> > mat list e(V)
> > -----------------
> >
> >
> >
> > Kit Baum, Boston College Economics
> > http://ideas.repec.org/e/pba1.html
> >
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/support/faqs/res/findit.html
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
> >
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


-- 
Giovanni S.F. Bruno
http://ideas.repec.org/e/pbr136.html
Istituto di Economia Politica, Universit� Bocconi
Via U. Gobbi, 5, 20136 Milano
Italy
tel. + 02 5836 5411
fax. + 02 5836 5438
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index