Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: st: Multivariate Normal CDF

 From Matthew Baker To statalist@hsphsun2.harvard.edu Subject Re: st: Multivariate Normal CDF Date Thu, 28 Mar 2013 13:17:18 -0400

```Ali --

You might take a look at Capellari's and Jenkins's mvnp package (net
search mvnp). In fact, the 2nd Quarter 2006 Issue of the Stata Journal
describes how it works, and also contains a description of an
implementation of a GHK multivariate normal probability simulator in
Mata by Gates.

Best,

Matt Baker

On Thu, Mar 28, 2013 at 12:11 PM, Ali Hashemi <hashemi@vt.edu> wrote:
> Dear listserv members,
>
> I'm trying to compute the normal cdf at 1000 points (each point is
> defined by a combination of x1 and x2) using the following mean (mu)
> and standard deviation (sigma).
>
> mu=[ 3, -1 ]
> sigma=[ 0.2, -0.1 \  -0.1, 0.4 ]
>
> I know this can be easily done in MATLAB by P = normcdf(X,mu,sigma).
> In Stata, I have used binormal(x1,x2,ro) function as follows:
> gen ro= -.1 / (.2*.4)^.5
> gen cdf=binormal( x1-3 , x2-(-1) , ro )
>
> I have two questions:
> 1) Is this correct?
> 2) How can this be done for cases with more than two variables
> (M-variate instead of  bivariate)? Is there a more general approach
> (like in MATLAB) that can be used for generating the joint cumulative
> distribution of an M-variate normal distribution?
>
> Your help is greatly appreciated
> Ali
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

--
Dr. Matthew J. Baker
Department of Economics
Hunter College and the Graduate Center, CUNY
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```