[R] Probabilities for bivariate normal distribution with adapt

Thomas Lumley tlumley at u.washington.edu
Tue Nov 12 20:10:38 CET 2002

On Tue, 12 Nov 2002, [iso-8859-1] "Iwersen, Sönke" wrote:

> Dear R-List:
> I`m trying to calculate the probabilities for a bivariate normal
> distribution while using the mvtnorm-package(dmvnorm) and the
> adapt-package for multidimensional integration.
> The problem is that I can`t specify the upper bound in the adapt-package
> the way I need it because I don`t need a rectangular area. I want to
> calculate the probability starting at the origin under the line y=x.
> In MATHEMATICA it`s possible to use
> NIntegrate[pdf, {x, 0, 5}, {y, 0, x}]  with pdf as bivariate
> normal distribution but it`s very slow.
> Can anybody help me to do it in R ??

If you rotate the axes by 45 degrees it becomes a rectangle. Even better,
it is a half-plane and you can just use pnorm().


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