Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: Re: st: RE: Re: Calculation of integrals


From   Clyde Schechter <cschecht@aecom.yu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   RE: Re: st: RE: Re: Calculation of integrals
Date   Wed, 12 Dec 2007 10:38:06 -0500

I can't help with the LIMDEP. But it is easy to see that with his simpsler function, 5*ln(x), that Stata gives the correct result. 5*ln(x) is the derivative of 5*(x*ln(x)-x), so it is easy to calculate its integral from 1 to 100 in closed form as 5*(100*ln(100)-99) = 1807.5851. The result Emmanouil's code is 1807.2015, which is close enough for most purposes (and -integ- produces a numerical approximation to the integral).

Clyde Schechter


*
* 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/




© Copyright 1996–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index