BookmarkSubscribeRSS Feed
Hlin01
Calcite | Level 5

Hi

 

If there a way to calculate the probability of x1<c, x2<c, x3<c in IML, where x1, x2, and x3 follow a MVN(0, V), where R has a compound symmetry structure, with correlation = r and variance=1?

 

Thanks.

HM

1 REPLY 1
Rick_SAS
SAS Super FREQ

No, there is not a built-in function call for multivariate normal CDFs when d>2.  For d=2 (bivariate), you can use the PROBBNRM function  and for higher-dimensions you can use Monte Carlo estimation as follows:

 

/* Monte Carlo estimation for 3-D CDF of MVN with 
   CS covariance structure */
proc iml;
call streaminit(123);
d = 3;                         /* dimension */
N = 1e7;                       /* sample size */
mean = j(1, d, 0);             /* mean of distribution */
Sigma = {1   0.5 0.5,
         0.5 1   0.5,
         0.5 0.5 1};
Z = randnormal(N, mean, I(d)); /* Z ~  MVN (0, I)  */
v0 = {0 0 0};                  /* cutoff values in each component (c,c,c) */
ComponentsInRegion = (Z < v0)[,+]; /* number of components in region */
group = (ComponentsInRegion=d);    /* all 3 components in the region? */
MCEst = mean(group);               /* proportion of obs in region */
print MCEst;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 867 views
  • 1 like
  • 2 in conversation