H.inv.select: Bandwidth matrix selection

Description Usage Arguments Details Value References Examples

View source: R/H.inv.select.R

Description

Computes inverse of bandwidth matrix using rule-of-thumb from Silverman (1986).

Usage

1
H.inv.select(X, H.mult = 1)

Arguments

X

Matrix of inputs

H.mult

Scaling factor for rule-of-thumb smoothing matrix

Details

This method performs selection of (inverse) multivariate bandwidth matrices using Silverman's (1986) rule-of-thumb. Specifically, Silverman recommends setting the bandwidth matrix to

H_{jj}^{1/2} = ≤ft(\frac{4}{M + 2}\right)^{1 / (M + 4)}\times N^{-1 / (M + 4)}\times \mbox{sd}(x^j) \mbox{\ \ \ \ for }j=1,...,M

H_{ab} = 0\mbox{\ \ \ \ for }a\neq b

where M is the number of inputs, N is the number of observations, and \mbox{sd}(x^j) is the sample standard deviation of input j.

Value

Returns inverse bandwidth matrix

References

\insertRef

Silvermansnfa

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(USMacro)

USMacro <- USMacro[complete.cases(USMacro),]

# Extract data
X <- as.matrix(USMacro[,c("K", "L")])

# Generate bandwidth matrix
print(H.inv.select(X))
#              [,1]         [,2]
# [1,] 3.642704e-08 0.000000e+00
# [2,] 0.000000e+00 1.215789e-08

tkmckenzie/snfa documentation built on June 11, 2020, 4:34 a.m.