simp_int {Conake}R Documentation

The Simpson method to compute integral

Description

This function computes the Simpson method to calculate an integral.

Usage

simp_int(x, fx, n.pts = 256, ret = FALSE)

Arguments

x

The vector where the integral is computed

fx

The function to integrate

n.pts

The number of points used to compute the integral through the Simpson technique.

ret

A boolean control parameter. Default value is FALSE.

Value

Returns the value of the integral.

Author(s)

W. E. Wansouwé, F.G. Libengué and C. C. Kokonendji

Examples

Vec=rgamma(100,1.5,2.6)
x=seq(min(Vec),max(Vec),length.out=100)
simp_int(x,dgamma(x,1.5,2.6))


[Package Conake version 1.0.1 Index]