Learn R Programming

npDoseResponse (version 0.2)

KernelRetrieval: The helper function for retrieving a kernel function and its associated statistics.

Description

This function helps retrieve the commonly used kernel function, its second moment, and its variance based on the name.

Usage

KernelRetrieval(name)

Value

A list that contains three elements.

KernFunc

The interested kernel function.

sigmaK_sq

The second moment of the kernel function.

K_sq

The variance of the kernel function.

Arguments

name

The lower-case full name of the kernel function.

Author

Yikun Zhang, yikunzhang@foxmail.com

Examples

Run this code
# \donttest{
  kernel_result <- KernelRetrieval("epanechnikov")
  kernT <- kernel_result$KernFunc
  sigmaK_sq <- kernel_result$sigmaK_sq
  K_sq <- kernel_result$K_sq
# }

Run the code above in your browser using DataLab