Statalist


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

st: RE: storing t value from a t-test


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: storing t value from a t-test
Date   Sun, 4 May 2008 16:51:52 +0200

**********
webuse fuel        
ttest mpg1==mpg2  
*see the whole array of possibilities
ret li
*storing
local a=r(p_l)
local b=r(t)
*displaying!
di as text "I am your p-value: " in red `a'
di as text "I am your t-value: " in red `b'
**********

Martin Weiss
_________________________________________________________________

Diplom-Kaufmann Martin Weiss
Mohlstrasse 36
Room 415
72074 Tuebingen
Germany

Fon: 0049-7071-2978184

Home: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1130

Publications: http://www.wiwi.uni-tuebingen.de/cms/index.php?id=1131

SSRN: http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=669945

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Armelini, Guillermo
Sent: Sunday, May 04, 2008 4:35 PM
To: [email protected]
Subject: st: storing t value from a t-test

Hi everybody,
 
Does anyone who knows how can i store the T value of the T Test in a local macro?
 
Two-sample t test with equal variances
------------------------------------------------------------------------------
   Group |     Obs        Mean    Std. Err.   Std. Dev.   [95% Conf. Interval]
---------+--------------------------------------------------------------------
       1 |      77    3.402597    .0872214    .7653644    3.228881    3.576314
       2 |      13    3.615385    .2129904    .7679476    3.151318    4.079451
---------+--------------------------------------------------------------------
combined |      90    3.433333    .0806497      .76511    3.273084    3.593583
---------+--------------------------------------------------------------------
    diff |           -.2127872    .2296004               -.6690697    .2434953
------------------------------------------------------------------------------
    diff = mean(1) - mean(2)                                      t =  -0.9268
Ho: diff = 0                                     degrees of freedom =       88
    Ha: diff < 0                 Ha: diff != 0                 Ha: diff > 0
 Pr(T < t) = 0.1783         Pr(|T| > |t|) = 0.3566          Pr(T > t) = 0.8217
 
I would like to store t ( in this case -0.9268) and the p-value (in this case 0.1783)
 
thank you


This message has been scanned for viruses by TRENDMICRO,
an IESE technology affiliate company  and global leader in antivirus and content security software.

*
*   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/



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