[R] infinity in integrate function in R

Chong Gu chong at stat.purdue.edu
Tue Nov 7 23:40:15 CET 2000


   From: eloi_kpamegan at hgsi.com
   X-Mailer: Lotus Notes Release 5.0.2c  February 2, 2000
   Date: Tue, 7 Nov 2000 16:02:43 -0500
   X-MIMETrack: Serialize by Router on Mozart/Hgsi(Release 5.0.5 |September 22, 2000) at 11/07/2000
    04:02:39 PM
   MIME-Version: 1.0
   Content-type: text/plain; charset=us-ascii
   Sender: owner-r-help at stat.math.ethz.ch
   Precedence: bulk

   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?

   -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
   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
   _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


Transform to a finite interval and multiply your integrand by the
Jacobian of the transform.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 mailing list