It's my first time on stackoverflow, so please be patient with me! I'm using R-package "pracma" to calculate a triple integral. This is my code:
mu1=0
mu2=0
mu3=0
mu4=0
sigma1=1
sigma2=1
sigma3=1
sigma4=1
f3=function(x,y,z){dnorm(z,mean = mu2,sd=sigma2)*dnorm(y,mean =
mu3,sd=sigma3)*(1-pnorm(z,mean= mu1,sd=sigma1))*dnorm(x,mean =
mu4,sd=sigma4)}
ymin=function(x){x}
zmin=function(x,y){y}
integral3(f3,xmin = -100,xmax = 100,ymin,ymax=100,zmin,zmax = 100)
But, actually, I obtain the error below:
Error in if (adjerr[1] > localtol) { :
missing value where TRUE/FALSE needed
Can someone give me a cue to solve this problem? Thank in advance