LM2: Sample local 2-moments

Description Usage Arguments Value Examples

View source: R/LocalMoments.R

Description

LM2 returns a vector with the 2nd order sample local moments.

Usage

1
LM2(x, h, type = "Gaussian", data)

Arguments

x

A vector or matrix containing the points at which the moment will be calculated.

h

A number specifying the bandwidth.

type

A character string specifying the used kernel function.

data

A data matrix containing in each column a data point.

Value

If x is a vector returns the vector s_n^{\otimes 2}(x). If the input is a matrix the matrix s_n^{\otimes 2}(x_1), …, s_n^{\otimes 2}(x_m) is returned, where x = [x_1, …, x_m].

Examples

1
2
3
data <- matrix(rnorm(20),2,10)
x <- matrix(c(seq(-2, 2, length.out = 9), rep(0, 9)), 2, 9)
LM2(x, 0.5, "Gaussian", data)

Epsilon127/ldder documentation built on March 7, 2020, 7:47 a.m.