summary.lpdensity: Summary Method for Local Polynomial Density Estimation and...

View source: R/lpdensity_methods.R

summary.lpdensityR Documentation

Summary Method for Local Polynomial Density Estimation and Inference

Description

The summary method for local polynomial density objects.

Usage

## S3 method for class 'lpdensity'
summary(object, ...)

Arguments

object

Class "lpdensity" object, obtained from calling lpdensity.

...

Additional options, including (i) grid specifies a subset of grid points to display results; (ii) gridIndex specifies the indices of grid points to display results; (iii) alpha specifies the significance level; (iv) CIuniform specifies whether displaying pointwise confidence intervals (FALSE, default) or the uniform confidence band (TRUE); (v) CIsimul specifies the number of simulations used to construct critical values (default is 2000).

Author(s)

Matias D. Cattaneo, Princeton University. cattaneo@princeton.edu.

Michael Jansson, University of California Berkeley. mjansson@econ.berkeley.edu.

Xinwei Ma (maintainer), University of California San Diego. x1ma@ucsd.edu.

See Also

lpdensity for local polynomial density estimation.

Supported methods: coef.lpdensity, confint.lpdensity, plot.lpdensity, print.lpdensity, summary.lpdensity, vcov.lpdensity.

Examples

# Generate a random sample
set.seed(42); X <- rnorm(2000)

# Estimate density and report results
est1 <- lpdensity(data = X, bwselect = "imse-dpi")
summary(est1)

# Report results for a subset of grid points
summary(est1, grid=est1$Estimate[4:10, "grid"])
summary(est1, gridIndex=4:10)

# Report the 99% uniform confidence band
set.seed(42) # fix the seed for simulating critical values
summary(est1, alpha=0.01, CIuniform=TRUE)


lpdensity documentation built on Oct. 6, 2024, 9:06 a.m.