Last chance! 50% off unlimited learning
Sale ends in
pbivnorm2(x, y, rho)
pbivnorm
function in the # define input
x <- c(0 , 0 , .5 , 1 , 1 )
y <- c( 0 , -.5 , 1 , 3 , .5 )
rho <- c( .2 , .8 , -.4 , .6 , .5 )
# compare pbivnorm2 and pbivnorm functions
res <- pbivnorm2( x = x , y = y , rho = rho )
res2 <- pbivnorm( x , y , rho = rho )
max( abs(res-res2))
## [1] 0.0030626
round( cbind( x , y , rho , res, res2 ) , 4 )
## x y rho res res2
## [1,] 0.0 0.0 0.2 0.2821 0.2820
## [2,] 0.0 -0.5 0.8 0.2747 0.2778
## [3,] 0.5 1.0 -0.4 0.5514 0.5514
## [4,] 1.0 3.0 0.6 0.8412 0.8412
## [5,] 1.0 0.5 0.5 0.6304 0.6303
Run the code above in your browser using DataLab