KernMoment: Moments of a kernel.

Description Usage Arguments Value Examples

View source: R/kernels.R

Description

Computes moments of a kernel over X=[0, 1] (boundary case), or X=[-1, 1] (interior case),

Usage

1
KernMoment(K, moment = 0, boundary = TRUE, type = "raw")

Arguments

K

kernel function.

moment

order j of moment to compute.

boundary

Logical scalar, specifying whether we are at a boundary.

type

Type of moment. "raw" computes \int_X u^j k(u), "absolute" computes \int_X |u^j k(u)|, and "raw2" computes \int_X u^j k(u)^2.

Value

Integral value (a scalar).

Examples

1
2
3
KernMoment(function(u) u<1, moment = 3, boundary = FALSE)
KernMoment(EqKern(kernel = "triangular", order = 2),
           moment = 3)

kolesarm/RDHonest documentation built on April 3, 2018, 11:08 a.m.