| debiased_local_linear | R Documentation |
Fit the debiased local-linear estimator in equation (5) of Cheng and Chen or construct its paired-bootstrap simultaneous confidence band (Figure 3).
debiased_local_linear(x, y, points = NULL, bandwidth = NULL, tau = 1,
grid_size = 200L, n_folds = 5L, random_state = 0L)
regression_confidence_band(x, y, points = NULL, bandwidth = NULL,
tau = 1, confidence = 0.95, n_boot = 999L, random_state = NULL,
grid_size = 200L, n_folds = 5L, max_attempts = NULL)
x |
Numeric one-dimensional covariates. |
y |
Numeric responses of the same length as |
points |
Optional numeric evaluation grid. |
bandwidth |
Positive bandwidth selected for the ordinary smoother. |
tau |
Positive ratio |
grid_size |
Generated grid size when |
n_folds |
Number of cross-validation folds for bandwidth selection. |
random_state |
Optional local random seed. |
confidence |
Confidence level strictly between zero and one. |
n_boot |
Positive number of paired-bootstrap replicates. |
max_attempts |
Maximum resamples attempted if singular fits occur. |
A di_estimate or di_band object.
Cheng, G. and Chen, Y.-C. (2019). Nonparametric Inference via Bootstrapping the Debiased Estimator. Electronic Journal of Statistics, 13(1). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1214/19-EJS1575")}.
x <- seq(-1, 1, length.out = 50)
y <- sin(pi * x) + rnorm(50, sd = 0.1)
fit <- debiased_local_linear(x, y, bandwidth = 0.3)
band <- regression_confidence_band(x, y, bandwidth = 0.3,
n_boot = 19, random_state = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.