Learn R Programming

rddensity (version 2.1)

h_opt_density_res: Internal function, calculates theoretical optimal bandwidth.

Description

h_opt_density_res calculates theoretical optimal bandwidth for restricted model.

Usage

h_opt_density_res(
  p,
  N,
  dgp_F1_l,
  dgp_F1_r,
  dgp_Fp1_l,
  dgp_Fp1_r,
  kernel = "triangular"
)

Arguments

p

Integer, polynomial order.

N

Integer, sample size.

kernel

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

x

Numeric vector or data matrix, the running variable.

dgp_F1, dgp_Fp1

Numeric, theoretical d.g.p.

f_low, f_up

Numeric, lower and upper boundaries.

Value

Returns MSE optimal bandwidth.

Details

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