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

Re: st: I have a t-statistic and am looking for the corresponding p-value

From   Philip Ryan <>
Subject   Re: st: I have a t-statistic and am looking for the corresponding p-value
Date   Thu, 30 Aug 2007 21:49:09 +0930

use the -ttail()- function; see -help functions- (especially density functions).

display ttail(18, 2.1)


Quoting Michael Barnes <>:

> I have a t-statistic, and the number of observations, is it possible to have
> stata find 1-a/2 (p-value) for me?  Just in case that is unclear let me try
> to clarify...I have an expected value for income Yhat, and I want to know
> the probability that income is below the poverty level PL (a constant).  In
> order to find this I am going to form a confidence interval with PL being my
> lower confidence interval limit.  In other words, Yhat-[t(1-a/2;
> n-2)*s{Yhat}]=lower confidence interval limit, or
> Yhat-[t(1-a/2; n-2)*s{Yhat}]=PL.  I know Yhat, s{Yhat}, n-2, and PL, I can
> therefore solve for
> t(1-a/2; n-2):  t(1-a/2; n-2)=(Yhat-PL)/s{Yhat}.  Where 1-a/2 is my p-value,
> or probability of being past my lower confidence interval limit (in this
> case the poverty level).  Assume n=20 and I solved for the t-statistic and
> get 2.1...I then have 2.1=t(1-a/2; 18).  Is there any way of telling Stata
> that I want the p-value given a t-statistic of 2.1, and n-2=18?  In this
> case, the p-value would be: 0.025, or 2.5%.
> I would appreciate any insights!
> Thanks,
> Mike
> _________________________________________________________________
> Messenger Café — open for fun 24/7. Hot games, cool activities served daily.
> Visit now.
> *
> *   For searches and help try:
> *
> *
> *

Philip Ryan
Discipline of Public Health

Director, Data Management and Analysis Centre
Associate Dean (IT)
Faculty of Health Sciences

University of Adelaide
5005 South Australia
CRICOS Provider Number 00123M
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright.  If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.
*   For searches and help try:

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