Very slow computation of the command cdfMvn()

Hello,

I have recently used the command cdfMvn() for obtaining multivariate normal CDF of a random vector z=[z1,...,zT]. However, I noticed that it T<=8, running the code below:

T=8;

ulim = zeros(T,1);

corr = eye(T);

p = cdfMvn(ulim, corr);

p;

it takes about 33 secs in my laptop. If I change T to be 10, it takes 2 mins, and if T=22, then GAUSS returns '.' as a result, which seems to be an empty value.

I am confused about this result and I would be appreciate if anyone can give me a solution of this issue.

Thank you so much in advance.

1 Answer



0



cdfMVne is much, much faster than cdfMVn. For your example on my Macbook, cdfMVn takes about 12 seconds and cdfMVne takes about 0.00094 seconds. I would recommend creating a procedure to wrap cdfMVne and make it simpler for repeated use. Note that cdfMVne has options to control the tolerance for convergence. However, with default settings I get the expected answer 0.5^8 = 0.00390625.

aptech

1,773

Your Answer

1 Answer

0

cdfMVne is much, much faster than cdfMVn. For your example on my Macbook, cdfMVn takes about 12 seconds and cdfMVne takes about 0.00094 seconds. I would recommend creating a procedure to wrap cdfMVne and make it simpler for repeated use. Note that cdfMVne has options to control the tolerance for convergence. However, with default settings I get the expected answer 0.5^8 = 0.00390625.


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.

Try GAUSS for 14 days for FREE

See what GAUSS can do for your data

© Aptech Systems, Inc. All rights reserved.

Privacy Policy