true_f: True regression function value

Description Usage Arguments Value Examples

View source: R/sim_funs.R

Description

True regression function value

Usage

1
2
3
4
5
6
7
8
true_f(
  reg.name = c("AK", "AK.bin"),
  reg.spec,
  M,
  x,
  cvar.spec = NULL,
  scale = NULL
)

Arguments

reg.name

class of regression functions to be used; "AK" denotes regression functions in Section 5 of Armstrong and Kolesár (2020); "AK.bin" denotes denotes the case where y = 1(f(x) + u > 0), using regression functions in Section 5 of Armstrong and Kolesár (2020), where u is a normal random variable.

reg.spec

a number denoting the type of regression function among the class of functions chosen in reg.name.

M

bound on the second derivative

x

a vector of x values.

cvar.spec

specification for conditional variance function, one of c("homo", "het.AK").

scale

scale parameter, a positive constant multiplied to the noise.

Value

a vector of true regression function values evaluated at x

Examples

1
2
3
x <- seq(-1, 1, length.out = 50)
true_f("AK", 1, 1, x)
true_f("AK.bin",1, 1, x, "het.AK", 1/2)

koohyun-kwon/HTEBandSim documentation built on Dec. 21, 2021, 7:43 a.m.