"Iwersen, Sönke"
2002-Nov-12 15:15 UTC
[R] Probabilities for bivariate normal distribution with adapt
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 ?? Thanks in advance S?nke Iwersen -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Thomas Lumley
2002-Nov-12 19:10 UTC
[R] Probabilities for bivariate normal distribution with adapt
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(). -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._