nintegrate {acopula} | R Documentation |
Numerical integration
Description
Trapezoidal integration of an arbitrarily dimensional function.
Usage
nintegrate(fun, lower, upper, subdivisions=100, differences=(upper-lower)/subdivisions)
Arguments
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. |
Value
Numeric.
Author(s)
Tomas Bacigal
See Also
Examples
##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)
[Package acopula version 0.9.4 Index]