Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: "extracting" the p-value from a t-test

From   Andrei Malinovschi <>
Subject   st: "extracting" the p-value from a t-test
Date   Thu, 24 Nov 2005 04:54:34 -0800 (PST)

Dear statalisters,
I have quite a beginner's question, but due to the
fact that I could not find the (whole) answer I
decided to bother you with this.
I have to do lots of  t-tests in a dataset and I am
only interested in the p-value for each two-sided
t-test and not the whole listing that results from
running ttest.
My first guess was that it might be some system
variable (like _b or _se in the case of regressions) /
global macro where the p-value is stored, but after
reading the old messages from Statalist I've seen that
it is not so, but on the other hand STATA provides us
with the tools to calculate the p-value. I am
wondering if someone can give me a concrete example
how to do this for a very simple dataset:
ttest var1, by(var2)
var1   var2
32     1
324    1
523    2
525    2
Thank you in advance for your answer!
Best regards,

Yahoo! Mail - PC Magazine Editors' Choice 2005
*   For searches and help try:

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