# nintegrate: Numerical integration In acopula: Modelling Dependence with Multivariate Archimax (or any User-Defined Continuous) Copulas

 nintegrate 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 `differences` should have length of `fun`ction dimension. `subdivisions` numeric (vector). Number of bins. `differences` numeric. Width of bins.

Numeric.

### Author(s)

Tomas Bacigal

`nderive`

### 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)
``````

acopula documentation built on Sept. 11, 2023, 1:08 a.m.