| np_plot_data | R Documentation |
Bias-corrected bounds are experimental (pre-beta research), incomplete, and not recommended for general-purpose inference. See the experimental-status section below.
Plot methods return an np_plot_data object for output="data"
or output="plot-data". It contains plotted targets and geometry, not
fitted estimator objects. These methods inspect, extract or replay that data
without fitting, bandwidth selection, bootstrap simulation or RNG use.
## S3 method for class 'np_plot_data'
print(x, ...)
## S3 method for class 'np_plot_data'
as.data.frame(x, row.names = NULL, optional = FALSE,
panel = NULL, target = NULL, band = NULL, ...)
## S3 method for class 'np_plot_data'
plot(x, y = NULL, ..., panel = NULL, target = NULL,
band = NULL, renderer = c("base", "rgl"))
x |
A plot-data object. |
y |
Unused; must be |
panel |
Panel identifier or one-based index. Extraction requires an explicit selection when there is more than one panel. Replay defaults to all panels. |
target |
Scalar target identifier or one-based index within the selected panel. Extraction requires a selection when multiple targets exist, for example several quantiles or derivative components. Replay defaults to all targets. |
band |
An available band name. Extraction requires a selection if several bands were computed. Replay defaults to all computed bands. This selects saved endpoints; it never computes a missing band. |
renderer |
Base graphics or the existing interactive rgl surface renderer. One-dimensional, coefficient, contour and image replay use base graphics. |
row.names, optional |
Standard data-frame method arguments. |
... |
Graphical overrides for replay, unused by |
All families use the same endpoint convention: lower and upper
are absolute values on the target scale. Do not add the estimate or corrected
estimate to them. The corrected estimate need not be the interval midpoint,
particularly for percentile constructions. A standard error is a genuine
available SE, never an interval width divided by a critical value; its reference
is identified in the corresponding inference record. Unavailable values remain
NA with explicit status and their evaluation rows are retained.
The object has these components:
Version two records the requested interval construction and effective per-component metadata on inference-enabled routes. Display-only routes can return version one. Saved version-one and version-two results retain their original component keys and can be replayed directly.
Estimator family name.
Resolved plot controls and, where applicable, explicitly supplied argument names. These describe the computation; changing them does not recompute it.
Named panels. Each contains grid, variables,
values, intervals and display. Grid columns have stable
identifiers eval_1, eval_2, etc., avoiding collisions with target
field names. variables maps each coordinate to its original name,
role and label, preserving factor/ordered grid columns. Values are keyed by
row_id and target_id, with estimate,
bias_corrected, std_error and status.
Intervals add band, alpha, lower, upper,
family_id and status. Display holds only retained plotting geometry
and styles, including requested observations, rugs or bootstrap boxplot summaries.
Scalar target identities, quantities, labels, derivative variables
and orders, multi-indices, coefficient terms, response levels and quantile
tau values where relevant. inference_id links to method metadata.
In schema version two, each target-specific
record has a components list keyed by pointwise,
simultaneous or bonferroni. Each entry identifies its effective
interval, calibration, endpoint construction, status and applicable
resolution or critical-value diagnostics. For example,
x$inference[[1]]$components$simultaneous$interval identifies the
construction used for that joint band. The request retains the user's
construction and supplied arguments. Compact records of the actual construction, law, calibration,
SE reference, projection and available resolution diagnostics. Categorical
contrast metadata records the lower and upper comparison levels for every grid
row, with orientation upper minus lower. Full bootstrap
draws, covariance workspaces, fitted models and RNG states are not plot results.
The finite-grid event and its explicit panel/row/target members. Pointwise intervals do not imply joint coverage. Simultaneous and Bonferroni scopes remain those of the selected method; panels, derivatives and quantiles are not combined unless that method actually calibrated their union. No coverage between grid points is implied.
Additional plot-result diagnostics when available.
Coefficient displays of plus/minus one standard error use band "std_error",
alpha=NA, status "display_only" and no confidence-family claim.
For class-probability plots, rows padded for missing evaluation coordinates
remain in the display grid but are excluded from coverage families and
Bonferroni counts. Defined targets with unavailable uncertainty remain family
members; an unavailable interval does not silently reduce the requested family.
An empirical copula probability-pair display likewise has no estimated target or interval. Asking for a missing band is an error.
data and plot-data return the same numerical payload under matched
controls; only the latter draws the original estimator plot. plot(x) on
saved plot data replays its geometry. It does not recompute inferential quantities
or acquire missing fitted state. The original estimator methods retain their
existing annotations and graphical controls.
The schema deliberately replaces plot-only d1/r1/cd1
objects, signed error slots, width arrays and inherited estimator methods.
Fitted-model APIs and control-constructor arguments are unchanged. For plot
arguments, use dotted spellings such as boot.control,
bias.control, gaussian.draws and gradient.order.
as.data.frame returns the selected grid and values joined to the selected
absolute interval columns. Interval status is named interval_status in
this flattened table. Without intervals it returns only coordinates and values.
print invisibly returns x. Base replay invisibly returns NULL;
interactive surface replay returns the renderer's widget.
All bias-corrected confidence intervals and bands are experimental (pre-beta research), incomplete, and not recommended for general-purpose inference. This status remains in effect unless the documentation explicitly states otherwise for a particular method and scope. It applies wherever bias-corrected bounds are available: asymptotic and bootstrap constructions, including legacy methods, pointwise intervals, Bonferroni intervals and simultaneous bands, for levels and supported derivatives.
These methods form an ongoing research project. Implementation support, numerical checks and favorable simulation results in selected settings do not establish generally valid coverage. Coverage can fail outside the studied settings, and available options do not constitute a general solution to bias-corrected inference. Method-specific assumptions, restrictions and known failures must be considered when experimenting with these bounds.
plot.np, np_boot_control
x <- seq(-2, 2, length.out = 30)
bw <- npudensbw(dat = data.frame(x = x), bws = .6,
bandwidth.compute = FALSE)
p <- plot(bw, errors = "asymptotic", band = "pointwise",
neval = 7, output = "data")
d <- as.data.frame(p)
d[c("eval_1", "estimate", "lower", "upper")]
p$targets
p$panels[[1]]$variables
plot(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.