Re: [R] Bug of pmvnorm?

From: P Ehlers <ehlers_at_math.ucalgary.ca>
Date: Sat 27 May 2006 - 21:21:54 EST

Looks like a bug (in mvt()?). Note that

  pmvnorm(lower = c(-Inf, -Inf), upper = c(Inf, 10))

works as expected, as does replacing any of the 4 Infs with a finite value.

Function sadmvn() in pkg:mnormt does give 1 with Inf lower/uppers.

Peter Ehlers

Daniel Yang wrote:

> Dear R-help,
>
> Is the following a bug of pmvnorm?
>
> R<-matrix(c(1,.5,.5,1),2,2)
> pmvnorm(lower=c(-Inf,-Inf),upper=c(Inf,Inf),corr=R)
>
> It returns,
>
> [1] 0
> attr(,"error")
> [1] 0
> attr(,"msg")
> [1] "Normal Completion"
>
> But I think it should return 1.
>
> Yung-jui
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat May 27 21:34:30 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 01 Jun 2006 - 02:10:28 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.