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   Thu, 3 May 2012 09:25:27 +0100

You could well be right. The question of what -x- is, that is how is
scaled, was scanted.

Nick

On Thu, May 3, 2012 at 7:36 AM, Christophe Kolodziejczyk
<[email protected]> wrote:
> A minor point, but shouldn't it be
>
> 2*normal(-x*sqrt(2))
>
> see http://en.wikipedia.org/wiki/Error_function
>
>
>
> 2012/5/2 Maarten Buis <[email protected]>
>>
>> --- 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>
>>
>> Hope this helps,
>> Maarten
>>
>> --------------------------
>> Maarten L. Buis
>> Institut fuer Soziologie
>> Universitaet Tuebingen
>> Wilhelmstrasse 36
>> 72074 Tuebingen
>> Germany
>>
>>
>> http://www.maartenbuis.nl
>> --------------------------
>> *
>> *   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/
>
>
>
>
> --
> Christophe Kolodziejczyk
> Research Fellow
>
> AKF, Anvendt KommunalForskning
> Danish Institute of Governmental Research
> Købmagergade 22
> DK-1150 København K
>
> *
> *   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/

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