confint.lpcde {lpcde}R Documentation

Confint method for local polynomial density conditional estimation

Description

The confint method for local polynomial conditional density objects.

Usage

## S3 method for class 'lpcde'
confint(
  object,
  parm = NULL,
  level = 0.95,
  CIuniform = FALSE,
  CIsimul = 2000,
  ...
)

Arguments

object

Class "lpdensity" object, obtained by calling lpcde.

parm

Integer, indicating which parameters are to be given confidence intervals.

level

Numeric scalar between 0 and 1, the confidence level for computing confidence intervals/bands. Equivalent to (1-significance level).

CIuniform

TRUE or FALSE (default), plotting either pointwise confidence intervals (FALSE) or uniform confidence bands (TRUE).

CIsimul

Positive integer, specifies the number of simulations used to construct critical values (default is 2000). This option is ignored if CIuniform=FALSE.

...

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

Value

Estimate

A matrix containing grid points, estimates and confidence interval end points using p- and q-th order local polynomials as well as bias-corrected estimates and corresponding confidence intervals.

crit_val

The critical value used in computing the confidence interval end points.

Author(s)

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

Rajita Chandak (maintainer), Princeton University. rchandak@princeton.edu.

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

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

See Also

lpcde for local polynomial conditional density estimation.

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

Examples

n=100
x_data = as.matrix(rnorm(n, mean=0, sd=1))
y_data = as.matrix(rnorm(n, mean=0, sd=1))
y_grid = stats::quantile(y_data, seq(from=0.1, to=0.9, by=0.1))
# density estimation
model1 = lpcde::lpcde(x_data=x_data, y_data=y_data, y_grid=y_grid, x=0, bw=0.5)
confint(model1)


[Package lpcde version 0.1.4 Index]