coef.lpbwcde: Coef method for local polynomial density bandwidth selection

View source: R/lpbwcde_methods.R

coef.lpbwcdeR Documentation

Coef method for local polynomial density bandwidth selection

Description

The coef method for local polynomial density bandwidth selection objects.

Usage

## S3 method for class 'lpbwcde'
coef(object, ...)

Arguments

object

Class "lpbwcde" object, obtained by calling lpbwcde.

...

Other arguments.

Value

Matrix

A matrix containing y_grid points and selected bandwidths.

Author(s)

Matias D. Cattaneo (maintainer). matias.d.cattaneo@gmail.com.

Rajita Chandak. rajita.chandak@gmail.com.

Michael Jansson. michael.jansson.berkeley@gmail.com.

Xinwei Ma. xinweima.pku@gmail.com.

See Also

lpbwcde for data-driven bandwidth selection.

Supported methods: coef.lpbwcde, print.lpbwcde, summary.lpbwcde.

Examples

set.seed(42)
n <- 100
x_data <- as.matrix(rnorm(n, mean = 0, sd = 1))
y_data <- as.matrix(rnorm(n, mean = 0, sd = 1))
# bandwidth selection
y_grid <- stats::quantile(y_data, seq(from = 0.1, to = 0.9, by = 0.1))
model2 <- lpcde::lpbwcde(y_data = y_data, x_data = x_data, x = 0,
                         y_grid = y_grid, bw_type = "mse-rot")
coef(model2)


lpcde documentation built on May 21, 2026, 5:09 p.m.