getSELWeights: Construct memory-efficient weights for estimation

View source: R/selfunctions.R

getSELWeightsR Documentation

Construct memory-efficient weights for estimation

Description

This function constructs SEL weights with appropriate trimming for numerical stability and optional renormalisation so that the sum of the weights be unity

Usage

getSELWeights(x, bw = NULL, ..., trim = NULL, renormalise = TRUE)

Arguments

x

A numeric vector (with many close-to-zero elements).

bw

A numeric scalar or a vector passed to 'kernelWeights'.

...

Other arguments pased to kernelWeights.

trim

A trimming function that returns a threshold value below which the weights are ignored. In common applications, this function should tend to 0 as the length of x increases.

renormalise

Logical; passed to 'sparseVectorToList'.

Value

A list with indices of large enough elements.

Examples

getSELWeights(1:5, bw = 2, kernel = "triangular")

smoothemplik documentation built on Aug. 22, 2025, 1:11 a.m.