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 at the end of May, and its replacement, statalist.org is already up and running.


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

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


From   Chris Min <cmsk0109@yahoo.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   st: How to set a range from 0 to positive infinity in calculating integrals?
Date   Sun, 9 Oct 2011 13:06:15 -0700 (PDT)

Hello,

I'm a beginning user of STATA, and I want to use the command "integ" to calculate for the following integral of y over x ranging from 0 to positive infinity. But I don't know how to set a range for x (i.e., from 0 to positive infinity). If anyone can help me with the second line of my coding, that would be great.

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


Chris

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index