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

# st: -gausshermite- on SSC

 From Jean-Benoit Hardouin To statalist@hsphsun2.harvard.edu Subject st: -gausshermite- on SSC Date Fri, 06 May 2005 14:26:14 +0200

Thank to Kit Baum, the -gausshermite- module has been added to SSC.

-gausshermite- allow to estimate the integrals of the form f(x)g(x/mu,sigma) over all the reals by Gauss-Hermite quadrature, where g(x/mu,sigma) is the gaussian distribution function of mean mu and variance sigma^2. It allow to estimate E(f(X)) if X is distributed among g(X/mu,sigma).

You must describe the f(x) function, and -optionnally- the values of mu and sigma. f(x) is a function who depend only of x. The module return only one value (this module is closer of a Stata function than an usual command because all the used information is contained in the written of the command, and so the result is the same, whatever the current dataset).

Example :
. gausshermite x^2 , sigma(10) mu(5)
if f(x)=x^2, mu=5 and sigma=10

The estimated value of the integral is save in r(int). You must display the value in using the -display- option,
for example
. gausshermite x^2 , sigma(10) mu(5) display
will return :
int_R (x^2)g(x/sigma=10)dx=125.00001203

The number of quadrature nodes can be define with the nodes option.

By default, sigma=1, mu=0 and nodes=12

The module use the -ghquadm- module to estimate the quadrature nodes and weights. This program can be download in writting -findit ghquadm- (in STB-61).

Jean-Benoit Hardouin

--
***************************************************************************
Jean-Benoit Hardouin
Biostatisticien
Observatoire Régional de la Santé du Centre
BP 2439
1, rue Porte Madeleine
45032 Orléans Cedex 1
tél : 02 38 74 48 80
fax : 02 38 74 48 81
Email : jean-benoit.hardouin@orscentre.org
**************************************************************************

*
* 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–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index