About a multivariate normal distribution integration with upper limit are variables
Show older comments
Dear all:
I got the program from Alan Genz file and I used the qsimvn one. The upper limit in this program was a constant but I want to integral some values with variables. The variables y1, y2 and y3 are chi-square. I want to integral the MVN first then times the chi-square pdf and integral all the y variables. The symbol a is the lower limit matrix and b is the upper limit matrix which the y1, y2 and y2, y3 . r is the correlation matrix. My program
See blow:
syms y1 ; syms y2 ; syms y3 ;
r = [1 0.56694671 ; 0.56694671 1];
a = -inf*[1 1 ]';
b = @(y1,y3,y2) [3.16517./sqrt(19.*(1./y1+1./y3)) 3.16517./sqrt(19.*(1./y2+1./y3)) ]';
[p e] = qsimvn( 5000, r, a, b );
f = @(y1,y2,y3) [p e].*[chi2pdf(y1,9) 0].*[chi2pdf(y2,9) 0].*[chi2pdf(y3,9) 0];
integral3(f,0,50,0,50,0,50);
the error terms :
Error using @(y1,y3,y2)[3.16517./sqrt(19.*(1./y1+1./y3)),3.16517./sqrt(19.*(1./y2+1./y3))]' Not enough input arguments.
Error in qsimvn>chlrdr (line 116) ap(i) = ap(i)/d(i); bp(i) = bp(i)/d(i);
Error in qsimvn (line 54) [n, n] = size(r); [ ch as bs ] = chlrdr( r, a, b );
How do i fix the problem? I need it. REALLY thank u all!
Answers (0)
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!