Paulo Sergio Schlogl
Paulo Sergio Schlogl

Reputation: 504

There are any equivalent "scipy.norm.norm.sf" function in R

I need to find any R function similar to scipy.stats.norm.sf or math.erfc? Any help would be great. I am trying google, but not find any good answer yet. Thank you for your time. Paulo

Upvotes: 0

Views: 565

Answers (2)

Alex
Alex

Reputation: 717

The standard equivalent of scipy.stats.norm.sf(x) will be

pnorm(x, lower.tail = FALSE)

The standard equivalent of math.erfc(x) will be

pnorm(x * sqrt(2), lower.tail = FALSE) * 2

Upvotes: 1

AndS.
AndS.

Reputation: 8120

You'll need to make sure they are 1:1 what you are looking for, but I recommend pracma::erfc() and stats::rnorm().

Upvotes: 1

Related Questions