that's the bvnpdf() code:
bvnpdf <- function(xy, mu, Siginv, detSig){
f<-numeric()
x <- xy[[1]]
if(xy[[1]]>xy[[2]] & (1==2)) {
f <- 0} else {
v <- rbind(xy[1], xy[2])
e <- t(v-mu) %*% Siginv %*% (v-mu)
f <- as.numeric(
Hello, I am trying to compute rectangle probability of bivariate
normal distribution with the following function:
bvnrectangle <- function(mu, Sig, xmin, xmax, ymin, ymax){
library(adapt)
Siginv <- solve(Sig)
detSig <- det(Sig)
areal <- adapt(ndim=2, lower=c(xmin,ymin), upper=c(xmax,ymax),
minpts=
2 matches
Mail list logo