Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: erfc function


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: erfc function
Date   Wed, 2 May 2012 10:23:11 +0100

Good point. erfc(x) is better calculated that way.

Nick

On Wed, May 2, 2012 at 7:49 AM, Maarten Buis <[email protected]> wrote:
> --- On Wed, May 2, 2012 at 12:51 AM, Heyman, James E. wrote:
>>> I feel like an idiot for asking but can somebody please tell me where the erfc (complementary error function) is in Stata?
>
> --- On Wed, May 2, 2012 at 2:07 AM, Nick Cox wrote:
>> Look at e.g.
>>
>> . twoway function 2 * (1  - normal(x)) , ra(-10 10)
>
> Alternatively:
>
> twoway function 2 * normal(-x) , ra(-10 10)
>
> With this version you are a bit less likely to be bitten by precision
> problems, see:
>
> William Gould (2006) Mata Matters: Precision, The Stata Journal, 6(4): 550-560.
> <http://www.stata-journal.com/article.html?article=pr0025>

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index