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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Does anyone knows how to display t-statistics value?


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Does anyone knows how to display t-statistics value?
Date   Thu, 21 Feb 2013 09:32:57 +0000

Both of these methods entail initialising a structure, writing a loop
and arranging for output each time around the loop. Often that is what
you need to do, but not here.

Consider

sysuse auto, clear

statsby b=_b[weight] se=_se[weight] n=e(N) t=_b[weight]/_se[weight],
by(rep78):  regress mpg weight

list

     +-----------------------------------------------+
     | rep78           b         se    n           t |
     |-----------------------------------------------|
  1. |     1   -.0081081          0    2           . |
  2. |     2   -.0080464   .0010219    8   -7.873744 |
  3. |     3   -.0044096   .0006225   30   -7.084073 |
  4. |     4   -.0049572   .0005596   18   -8.858188 |
  5. |     5     -.01816   .0036908   11   -4.920399 |
     +-----------------------------------------------+


On Thu, Feb 21, 2013 at 5:55 AM, Li Chuntao (Tony) <leechtcn@gmail.com> wrote:
> use post command, first define a post file, and then after each
> regression, post the t-statistics out
>
> or simply define a matrix, after each regression, set the ith term to
> be the t statistics
>
> On Thu, Feb 21, 2013 at 4:01 AM, Xixi Lin <winnielxx@gmail.com> wrote:
>> Hi,
>>
>> I am running many univariate regressions, I want to know the t
>> statistics for the independent variable, and I want to write a loop to
>> do the regression, but I don't know how to display t statistics.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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