nintegrate | R Documentation |
Trapezoidal integration of an arbitrarily dimensional function.
nintegrate(fun, lower, upper, subdivisions=100, differences=(upper-lower)/subdivisions)
fun |
function. Arguments can be in sequence or single vector. |
lower,upper |
numeric (vector). Upper and lower bound of integration. Either one of these or |
subdivisions |
numeric (vector). Number of bins. |
differences |
numeric. Width of bins. |
Numeric.
Tomas Bacigal
nderive
##cumulative distribution function of a bivariate normal copula
##evaluated at point c(0.5,0.6); compare pCopula(c(0.5,0.6),cop=copNormal(),par=0.5)
nintegrate(function(x) dCopula(x,cop=copNormal(),par=0.5),
lower=0.001, upper=c(0.5,0.6), subdivisions=20)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.