estimate.bandwidth: Bandwidth estimation for CVE.

Description Usage Arguments Value Examples

Description

If no bandwidth or function for calculating it is supplied, the CVE method defaults to using the following formula (version 1)

h = (2 * tr(Σ) / p) * (1.2 * n^(-1 / (4 + k)))^2

Alternative version 2 is used for dimension prediction which is given by

h = (2 * tr(Σ) / p) * χ_k^-1((nObs - 1) / (n - 1))

with n the sample size, p the dimension of X and Σ is (n - 1) / n times the sample covariance matrix of X.

Usage

1
estimate.bandwidth(X, k, nObs, version = 1L)

Arguments

X

the n x p matrix of predictor values.

k

the SDR dimension.

nObs

number of points in a slice, only for version 2.

version

either 1 or 2.

Value

Estimated bandwidth h.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# set dimensions for simulation model
p <- 5; k <- 1
# create B for simulation
B <- rep(1, p) / sqrt(p)
# samplsize
n <- 100
set.seed(21)
#creat predictor data x ~ N(0, I_p)
x <- matrix(rnorm(n * p), n, p)
# simulate response variable
#     y = f(B'x) + err
# with f(x1) = x1 and err ~ N(0, 0.25^2)
y <- x %*% B + 0.25 * rnorm(100)
# calculate cve with method 'simple' for k = 1
set.seed(21)
cve.obj.simple <- cve(y ~ x, k = k)
print(estimate.bandwidth(x, k = k))

CVarE documentation built on March 11, 2021, 5:06 p.m.