[R] infinity in integrate function in R
thomas at biostat.washington.edu
Tue Nov 7 22:29:01 CET 2000
On Tue, 7 Nov 2000 eloi_kpamegan at hgsi.com wrote:
> The integrate function in R is not taking Inf (infinity). How do you use
> infinity in R. I was doing: integrate(dnorm, Inf, 1.96) and I was getting
> Error: NA/NaN/Inf in foreign function call (arg 2). Obviously this should
> be equal to pnorm(1.96)= 0.9750021. How do you get around the infinity
> problem in R?
The integrate function doesn't know how to integrate over infinite
regions. This is a different (and more difficult) problem than integrating
over finite regions.
Assistant Professor, Biostatistics
University of Washington, Seattle
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help