# NOT RUN {
#When the covariance matrix is diagonal dnorm.pois is equal to the product of dnorm and dpois
mu<-c(0,0)
cov.mat<-matrix(c(1,0.0,0.0,1),ncol=2,nrow=2)
dnorm.pois(0,5,mu=mu,Sigma=cov.mat,rate=3,E=2)
dnorm(0,0,1)*dpois(5,6)
#Otherwise not equal
mu<-c(0,0)
cov.mat<-matrix(c(1,-0.8,-0.8,1),ncol=2,nrow=2)
dnorm.pois(0,5,mu=mu,Sigma=cov.mat,rate=3,E=2)
# }
Run the code above in your browser using DataLab