Bookmark and Share

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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Multivariate Normal CDF


From   Ali Hashemi <hashemi@vt.edu>
To   Stata listserv <statalist@hsphsun2.harvard.edu>
Subject   st: Multivariate Normal CDF
Date   Thu, 28 Mar 2013 12:11:39 -0400

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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index