lpcde_fn: lpcde_fn: Conditional density estimator.

View source: R/lpcde_fns.R

lpcde_fnR Documentation

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
)

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.

Value

Conditional density estimate at all grid points.


lpcde documentation built on April 3, 2025, 10:09 p.m.