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]

# Re: st: How to set a range from 0 to positive infinity in calculating integrals?

 From Chris Min To "statalist@hsphsun2.harvard.edu" Subject Re: st: How to set a range from 0 to positive infinity in calculating integrals? Date Tue, 11 Oct 2011 20:15:12 -0700 (PDT)

```Dear Maarten,

Thank you for the clear explanation -- I think it absolutely makes sense.

Might I ask you one more quick, related question?

If I want to calculate an integral of y=normal(-x) (i.e., a=-1 and b=0 in my previous example, shown below again) over x[0,+inf], I guess I should be able to obtain an approximation using a reasonably high figure for an upper bound, because as x approaches a positive infinity y=normal(-x) approaches 0 (based on your explanation). Am I correct?

Thanks in advance for your further help!

******************
set obs 100
range x 0 ?
gen y=1-normal(ax-b) /* where a and b are scalars */
integ y x, g(integral)

----- Original Message -----
From: Maarten Buis <maartenlbuis@gmail.com>
To: statalist@hsphsun2.harvard.edu
Cc:
Sent: Tuesday, October 11, 2011 3:10 AM
Subject: Re: st: How to set a range from 0 to positive infinity in calculating integrals?

On Mon, Oct 10, 2011 at 9:48 PM, Chris Min wrote:
> But, I did mean "normal()" in my example (i.e., I need to calculate integrals of cumulative normal), not normalden(). In that case, would your explanation still apply to my example?

In case of the cumulative density function my instinct tells me that
the answer will be positive infinity. The argument I made before
worked because at ever larger numbers the density function gets closer
to 0, so it will add increasingly less to the integral, meaning that
after some suitably high number you can approximate those
contributions to be 0. The cumulative density function approaches 1 at
positive infinity, so the contributions to the integral at higher
numbers will not be approximately 0, so the area under the cumulative
density function for 0 to positive infinity will also be infinite.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------

*
*  For searches and help try:
*  http://www.stata.com/help.cgi?search
*  http://www.stata.com/support/statalist/faq
*  http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index