h_opt_density_res: Internal function, calculates theoretical optimal bandwidth.

View source: R/rddensity_fun.R

h_opt_density_resR Documentation

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.

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.