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, statalist.org is already up and running.


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

st: AW: Store T-Statistic from Model?


From   "Martin Weiss" <martin.weiss1@gmx.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: AW: Store T-Statistic from Model?
Date   Fri, 4 Jun 2010 17:09:56 +0200

<> 

This is an inefficient way to store scalars, but you can do it:

*************
sysuse auto, clear
reg price weight length
gen tstatforweight=_b[weight]/_se[weight]
*************

A -local- would be better.

Note Maarten`s SJ article
http://www.stata-journal.com/article.html?article=st0137



HTH
Martin

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von JABBER2142
Gesendet: Freitag, 4. Juni 2010 17:01
An: statalist@hsphsun2.harvard.edu
Betreff: st: Store T-Statistic from Model?

Hey,

Is it possible to store the T-statistics from a regression output into
a variable?  E.g. In a completely hypothetical example, if I conducted
a basic regression like "regress wage education" and the Stata output
said the T-statistic was 30, could I store this somewhere?  It is
possible to store the coefficient of said regression (gen coef =
_b[education]) or various stats about the entire model ( gen r2 =
e(r2) ) but I can't figure out where (or if?) the T-statistic is
stored.

Thanks much,
Stumped.
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index