Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Multivariate Normal CDF


From   Ali Hashemi <[email protected]>
To   Stata listserv <[email protected]>
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index