Herb,
e(rmse) is a numeric scalar and can be accessed using sMata's st_numscalar:
. sysuse auto, clear
. reg mpg weight
. mata: st_numscalar( "e(rmse)")
3.438889631
This works the other way to, from Mata to Stata:
. mata: st_numscalar("s",2)
. display s
2
Cheers,
Germ�n
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Herb Smith
Sent: Tuesday, January 16, 2007 12:13 PM
To: [email protected]
Subject: Re: st: Matrix manipulation of regression results
Thanks. But now I am flummoxed on how to return a scalar, in particular
e(rmse)
: rmse = st_matrix("e(rmse)") is not returning an error, but then
: rmse
is not returning a value...
Thanks in advance,
--Herb
Professor of Sociology and
Director, Population Studies Center
230 McNeil Building
3718 Locust Walk CR
University of Pennsylvania
Philadelphia, PA 19104-6298
[email protected]
215.898.7768 (office)
215.898.2124 (fax)
On Tue, 2 Jan 2007, Maarten buis wrote:
> --- Herb Smith wrote:
> > Mis-step 1: Although I have already written one program using
> > -mata-, in which I went from "normal" Stata data to -mata- matrxies,
> > I have not been able to figure out how you turn a result matrix such
> > as e(V) into something that you can manipulate within the -mata-
> > language.
>
> mata
> x = st_matrix("e(V)")
>
> Hope this helps,
> Maarten
>
>
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
>
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room Z434
>
> +31 20 5986715
>
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
>
> Send instant messages to your online friends http://uk.messenger.yahoo.com
> *
> * 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/
*
* 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/