Dear Statalist:
Sorry - Please disregard my last message on this - I took the integration on
y to be over -oo to +oo. However, for fixed x, the partial integral over y
for fixed x is just the probability that Y< 0.56 |X=x, where X and Y are the
random variables whose joint distribution is f(x,y). Since the conditional
distribution of Y|X is also a normal with adjusted mean and variance (e.g.
see T.W. Anderson -An Introduction to Multivariuate Statistical Analysis -
Wiley), you can express P(Y < 0.56) in terms of the cumulative normal
function PHI ("norm" in Stata). Thus after integration by y, you are left
with something like x*PHI( (x-a)/b) to integrate with respect to x. You
could do this numerically, but you might be able to get this integral in
closed form also, by integrating by parts twice. First differentiate the PHI
and integrate x, leaving an integral of the form x*x*f( (x-a)/b) ) where
f(x) is the normal density. Then differentiate x and integrate x*f( (x-a)/b)
) . The latter is a perfect differential.
Al Feiveson
-----Original Message-----
From: Clara [mailto:[email protected]]
Sent: Friday, November 22, 2002 10:26 AM
To: [email protected]
Subject: st: integrals
hi, I need to solve a double integral. This integral does not have an
analytic solution, then i need to do this numerically. There are someone
that know how can i do this in stata??
I need to integral:
x*f(x,y)dxdy
where f(x,y) is a bivariate normal density function.
the integration intervals are: [-infinity, 0.56]
thanks, clara
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/