h_opt_density: Internal function, calculates theoretical optimal bandwidth.

View source: R/rddensity_fun.R

h_opt_densityR Documentation

Internal function, calculates theoretical optimal bandwidth.

Description

h_opt_density calculates theoretical optimal bandwidth.

Usage

h_opt_density(x, p, N, dgp_F1, dgp_Fp1, f_low, f_up, kernel = "triangular")

Arguments

x

Numeric vector or data matrix, the running variable.

p

Integer, polynomial order.

N

Integer, sample size.

dgp_F1, dgp_Fp1

Numeric, theoretical d.g.p.

f_low, f_up

Numeric, lower and upper boundaries.

kernel

String, the kernel function, can be triangular (default), uniform or epanechnikov.

Details

This is an internal function, and should not be called by users.

Value

Returns MSE optimal bandwidth.


rddensity documentation built on Jan. 22, 2023, 1:26 a.m.