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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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