[R] Double integration using R

Robert A'gata rhelpacc at gmail.com
Sun Nov 6 18:15:14 CET 2011


Hi,

I have a function that I need to do double integration:

\int^T_0 \int^t_0 N(\delta / \sigma \sqrt(u)) (1-N(\delta / \sigma
\sqrt(u))) du dt

where N(x) is a standard normal probability of x.

I start off by writing an inner integral into a function. Meaning
\int^t_0 N(\delta,\sigma \sqrt(u)) (1-N(\delta,\sigma \sqrt(u))) du.
Then calling integrate function on this function. This straightforward
way does not seem to work. I am not sure if there is any sample code
to do such integration? Thank you.

Regards,

Robert



More information about the R-help mailing list