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: How to set a range from 0 to positive infinity in calculating integrals?
From
Chris Min <[email protected]>
To
"[email protected]" <[email protected]>
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/