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/