Just do a variable transformation. If your function is f(x), your new
function would be:
f'(x) = sigma * f(sigma * x + mu). You can integrate f'(x) using
the Hermite quadrature.
Ravi.
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On
Behalf Of Ines Azaiez
Sent: Tuesday, April 13, 2010 9:25 PM
To: r-help-bounces at stat.math.ethz.ch; r-help at r-project.org
Subject: [R] Gaussian Quadrature Numerical Integration In R
Hi All,
I am trying to use A Gaussian quadrature over the interval (-infty,infty)
with weighting function W(x)=exp(-(x-mu)^2/sigma) to estimate an integral.
Is there a way to do it in R? Is there a function already implemented which
uses such weighting function.
I have been searching in the statmode package and I found the function
"gauss.quad(100, kind="hermite")" which uses the weighting
function
W(x)=exp(-x^2). Is there a more general version of this weighting function
(using mu and sigma)?
Thanks for your help
Iazaiez
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.