Skip to contents

Constructors for detailed plot controls used by the redesigned np plotting interface. Common choices such as errors, band, alpha, bootstrap, and B remain direct plot arguments; these helpers collect less common options.

Usage

np_boot_control(nonfixed = c("exact", "frozen"),
                wild = c("rademacher", "mammen"),
                blocklen = NULL)

np_grid_control(xtrim = NULL, xq = NULL, slices = NULL)

np_render_control(style = c("band", "bar"),
                  bar = c("|", "I"),
                  bar.num = NULL)

Arguments

nonfixed

Bootstrap behavior for non-fixed bandwidth routes. "exact" reconstructs each duplicate-row resample and recomputes nearest-neighbour bandwidths; "frozen" reuses the bandwidths from the fitted object.

wild

Wild-bootstrap multiplier distribution.

blocklen

Optional block length for block bootstrap methods.

xtrim

Optional two-element trim range for evaluation grids.

xq

Optional evaluation quantiles.

slices

Optional slice specification for routes that support it.

style

Interval display style.

bar

Bar style when style = "bar".

bar.num

Optional number of bars.

Details

Gaussian simultaneous variability bands use the Gaussian-multiplier framework of Chernozhukov, Chetverikov and Kato (2013, 2015). For the density/distribution families, related simultaneous-inference research is due to Cattaneo, Jansson and Ma (2024) and Cattaneo, Chandak, Jansson and Ma (2024). See plot.np for the full published references, implementation scope and estimator-specific qualifications.

These helpers validate names and values early. Raw lists are deliberately not accepted as substitutes, so misspelled detailed controls fail before plot computation begins.

Compound public plot arguments use dots, consistently with the package API. Constructor function names and returned object fields are unchanged. Common rendering controls such as data.overlay, data.rug, layout, and output are supplied directly to plot(...) rather than through np_render_control().

Gaussian simultaneous variability bands use the direct plot argument gaussian.draws (default 9999), including supported density and distribution plots. This controls Gaussian calibration only; B and np_boot_control() continue to control bootstrap resampling. See plot.np for supported targets, covariance contracts and the references to Chernozhukov, Chetverikov and Kato (2013, 2015).

Conditional density and distribution level bootstraps permit different supported continuous kernel families and orders on the X and Y sides, including beta on either side. Beta-containing routes remain limited to continuous X and Y with local-constant fitting and retain the resolved support bounds stored in the bandwidth object. The nonfixed choice changes nearest-neighbour bandwidth replay, not those fitted support bounds.

Value

A small classed list consumed by plot methods.

Examples

if (FALSE) { # \dontrun{
plot(fit,
     errors = "bootstrap",
     bootstrap = "inid",
     B = 9999,
     band = "pointwise",
     boot.control = np_boot_control(nonfixed = "exact"))
} # }