Learn R Programming

refund (version 0.1-40)

simpson_weights: Compute Simpson integration weights

Description

Computes Simpson's rule weights for numerical integration on an equidistant grid. This matches pffr's default integration method in ff() terms. Note: pffr uses (b-a)/n/3 (divides by grid length n), not (b-a)/(n-1)/3.

Usage

simpson_weights(xind)

Value

Numeric vector of Simpson weights.

Arguments

xind

Numeric vector of evaluation points.