Learn R Programming

lpcde (version 0.1.6)

fhat: Estimator construction

Description

Function for estimating the density function and its derivatives.

Usage

fhat(x_data, y_data, x, y_grid, p, q, mu, nu, h, kernel_type)

Value

Conditional density estimate at all grid points.

Arguments

x_data

Covariate dataset, vector or matrix.

y_data

Response variable dataset, vector.

x

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

y_grid

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

p

Polynomial order for y.

q

Polynomial order for covariates.

mu

Degree of derivative with respect to y.

nu

Degree of derivative with respect to x.

h

Numeric, bandwidth vector.

kernel_type

Kernel function choice.