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

st: RE: RE: Create P value for Z score


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: Create P value for Z score
Date   Sun, 11 Dec 2005 17:42:40 -0000

In fact, you have a choice between norm(-z) or 1 - norm(z). 

In principle, on a machine with infinite precision,
these should always give the same answer. 

In practice they usually do, to the precision that
you care about. But far out in the tails the extra 
subtraction is a complication you would better avoid. 

Any program would be sometimes better off, and never 
worse off, using norm(-z). 

Nick 
[email protected] 

FEIVESON, ALAN
 
> If Z is a Stata variable and you want a two-sided p-value 
> (what is reported
> in standard Stata output) then use 
> 
> gen pv=2*(1-norm(abs(Z))) 

[email protected]
 
> I have a variable which is the Z score of Beta coeffcient 
> (Standard normal
> distribution). I also want to create a new variable which is 
> the p value of
> the Z score. Does anybody have the command or programs to share?

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