K_fun: Kernel Function for Adaptive Procedures

View source: R/basic_fcn_RD.R

K_funR Documentation

Kernel Function for Adaptive Procedures

Description

Calculates K(x/b; C, C') in our previous draft.

Usage

K_fun(b, C_pair, X, mon_ind, swap = FALSE)

Arguments

b

a scalar "modulus of continuity" parameter; can take the value of 0.

C_pair

a pair of smoothness parameters (C, C'); can take the values of Inf.

X

data matrix.

mon_ind

index number for monotone variables, with length ncol(X).

swap

we take (C', C) instead of (C, C') if swap = TRUE.

Value

A numeric vector with the length equal to nrow(X); if b = 0, returns 0 vector.

Examples

X <- matrix(c(1, -2, -3, 4, 5, -6), nrow = 3, ncol = 2)
mon_ind <- c(1, 2)
C_pair <- c(0.5, 1)
K_fun(1, C_pair, X, mon_ind)
K_fun(1, c(Inf, 1), X, mon_ind)

koohyun-kwon/rdadapt documentation built on May 8, 2022, 8:49 p.m.