boundary_bias: Bias on the boundary

Description Usage Arguments Value

View source: R/boundary_bias.R

Description

This function computes the bias on the boundary, typicall at x = 0, in a local composite quantile regression.

Usage

1
2
boundary_bias(x0 = 0, dat, kernID = 0, left = TRUE, maxit = 20, tol =
  1e-3)

Arguments

x0

A scalar, boundary point in estimation.

dat

A list with the following components:

y

A vector treatment outcomes. In a fuzzy RD, this variable can also be a vector of treatment assignment variables.

x

A vector of covariates.

h

A scalar bandwidth.

p

The polynomial degree. p = 2 is used to estimate the second derivative of the conditional mean function for bias estimation. LCQR is used to estimate the second derivative.

q

Number of quantiles used in estimation. It needs to be an odd integer such as 5 or 9.

kernID

Kernel id number.

  1. kernID = 0: triangular kernel.

  2. kernID = 1: biweight kernel.

  3. kernID = 2: Epanechnikov kernel.

  4. kernID = 3: Gaussian kernel.

  5. kernID = 4: tricube kernel.

  6. kernID = 5: triweight kernel.

  7. kernID = 6: uniform kernel.

left

A logical variable that takes the value TRUE for data to the left of (below) the cutoff. Defaults to TRUE.

maxit

Maximum iteration number in the MM algorithm for quantile estimation. Defaults to 20.

tol

Convergence criterion in the MM algorithm. Defaults to 1.0e-3.

Value

Estimated bias on the boundary.


xhuang20/rdcqr documentation built on July 1, 2021, 5:22 a.m.