[R] how to use quadrature to integrate some complicated functions
R. Michael Weylandt <email@example.com>
michael.weylandt at gmail.com
Tue Nov 8 15:43:48 CET 2011
Have you tried wrapping it in a function and using integrate()? R is pretty good at handling numerical integration. If integrate() isn't good for you, can you say more as to why?
On Nov 6, 2011, at 4:15 PM, JeffND <Zuofeng.Shang.5 at nd.edu> wrote:
> Hello to all,
> I am having trouble with intregrating a complicated uni-dimensional function
> of the following form
> Here n is about 5000, Phi is the cumulative distribution function of
> standard normal,
> phi is the density function of standard normal, and x ranges over
> My idea is to to use quadrature to handle this integral. But since Phi has
> not cloaed form,
> I don't know how to do this effeciently. I appreciate very much if someone
> has any ideas about it.
> View this message in context: http://r.789695.n4.nabble.com/how-to-use-quadrature-to-integrate-some-complicated-functions-tp3996765p3996765.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help