integrand=function(xx,y=1,MU=MU,Sigma=Sigma)
{
dnorm(xx,mean=MU[1],sd=sqrt(Sigma[1,1]))*pmvnorm(lower=c(-Inf,-Inf),upper=c(xx,y),mean=MU,sigma=Sigma)
}
The integrand must be a function that returns a vector the length of
its first argument (integrate will pass it a short vector
R users,I encountered some error message when trying a univariate integration
involving a bivariate normal CDF with mean MU and variance matrix Sigma. Below
are my code:MU=c(1,3)
Sigma=matrix(c(1,0.5,0.5,1.5),2,2)
integrand=function(xx,y=1,MU=MU,Sigma=Sigma)
{
2 matches
Mail list logo