I'm trying to write mata code to evaluate integrals |f(x)g(x) (where
g(x)is the standard normal pdf) by Gauss-Hermite quadrature (I know this
has been done before in Stata, but I'm trying to learn mata, so I
thought I might give it a try).
I was able to code for the nodes and weight vectors, but I can't figure
out how to tell mata which fuction f(x) I wish to evaluate.
I want to be able to specify the f(x) function, say x^2, when calling
the mata program