[Rd] package mvtnorm: sigma parameter in pmvnorm() (PR#2478)
jerome@hivnet.ubc.ca
jerome@hivnet.ubc.ca
Tue Jan 21 01:43:05 2003
Full_Name: Jerome Asselin
Version: 1.6.2
OS: RedHat Linux 7.2
Submission from: (NULL) (142.103.173.179)
pmvnorm() may fail for a univariate distribution when
its parameter "sigma" is defined as a matrix. It will
fail if sigma < 1.
library(mvtnorm)
#THIS WORKS
> pmvnorm(lower=-Inf,upper=2,mean=0,sigma=matrix(1.5))
[1] 0.9487648
attr(,"error")
[1] 0
attr(,"msg")
[1] "univariate: using pnorm"
#THIS FAILS
> pmvnorm(lower=-Inf,upper=2,mean=0,sigma=matrix(.5))
Error in checkmvArgs(lower = lower, upper = upper, mean = mean, corr = corr, :
diag(sigma) and lower are of different length
#THIS WORKS
> pmvnorm(lower=-Inf,upper=2,mean=0,sigma=.5)
[1] 0.9976611
attr(,"error")
[1] 0
attr(,"msg")
[1] "univariate: using pnorm"