Learn R Programming

lpcde (version 0.1.6)

lpcde_fn: lpcde_fn: Conditional density estimator.

Description

Function for estimating the density function and its derivatives.

Usage

lpcde_fn(
  y_data,
  x_data,
  y_grid,
  x,
  p,
  q,
  p_RBC,
  q_RBC,
  bw,
  mu,
  nu,
  cov_flag,
  kernel_type,
  rbc = FALSE
)

Value

Conditional density estimate at all grid points.

Arguments

y_data

Response variable dataset, vector.

x_data

Covariate dataset, vector or matrix.

y_grid

Numeric vector, specifies the grid of evaluation points along y-direction.

x

Numeric vector or matrix, specifies the grid of evaluation points along x-direction.

p

Polynomial order for y.

q

Polynomial order for covariates.

p_RBC

Nonnegative integer, specifies the order of the local polynomial for Y used to construct bias-corrected point estimates. (Default is p+1.)

q_RBC

Nonnegative integer, specifies the order of the local polynomial for X used to construct bias-corrected point estimates. (Default is q+1.)

bw

Numeric, bandwidth vector.

mu

Degree of derivative with respect to y.

nu

Degree of derivative with respect to x.

cov_flag

Flag for covariance estimation option.

kernel_type

Kernel function choice.

rbc

Boolean for whether to return RBC estimate and standard errors.