**From:** Charles Maner (*ckjmaner@yahoo.com*)

**Date:** Thu 17 Jun 2004 - 07:14:16 EST

**Next message:**Prof Brian Ripley: "Re: [R] Aggregating on Water Year Rather Than Calendar Year"**Previous message:**Clint Bowman: "Re: [R] Aggregating on Water Year Rather Than Calendar Year"**Next in thread:**Prof Brian Ripley: "Re: [R] erf function documentation"**Reply:**Prof Brian Ripley: "Re: [R] erf function documentation"**Reply:**Duncan Murdoch: "Re: [R] erf function documentation"

Message-id: <20040616211416.19252.qmail@web40308.mail.yahoo.com>

Hi all. I may be wrong, (and often am), but in trying

to determine how to calculate the erf function, the

documentation for 'pnorm' states:

## if you want the so-called 'error function'

erf <- function(x) 2 * pnorm(x * sqrt(2)) - 1

## and the so-called 'complementary error function'

erfc <- function(x) 2 * pnorm(x * sqrt(2),

lower=FALSE)

Should, instead, it read:

## if you want the so-called 'error function'

erf <- function(x) 2 * pnorm(x / sqrt(2)) - 1

## and the so-called 'complementary error function'

erfc <- function(x) 2 * pnorm(x / sqrt(2),

lower=FALSE)

I've looked at a couple references and they all show

that 'x' should be divided by, not multiplied by,

'sqrt(2)'.

Again, I may be incorrect. If so, kindly let me know.

But, if I am correct, perhaps the documentation could

be corrected in a subsequent R release.

Thanks,

Charles

______________________________________________

R-help@stat.math.ethz.ch mailing list

https://www.stat.math.ethz.ch/mailman/listinfo/r-help

PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

**Next message:**Prof Brian Ripley: "Re: [R] Aggregating on Water Year Rather Than Calendar Year"**Previous message:**Clint Bowman: "Re: [R] Aggregating on Water Year Rather Than Calendar Year"**Next in thread:**Prof Brian Ripley: "Re: [R] erf function documentation"**Reply:**Prof Brian Ripley: "Re: [R] erf function documentation"**Reply:**Duncan Murdoch: "Re: [R] erf function documentation"

*
This archive was generated by hypermail 2.1.3
: Wed 30 Jun 2004 - 23:05:08 EST
*