[R] Bug of pmvnorm?

P Ehlers ehlers at math.ucalgary.ca
Sat May 27 13:21:54 CEST 2006


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 at 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



More information about the R-help mailing list