
Plot Method for bbnp_regression Objects
plot.bbnp_regression.RdCreates visualizations of bias-bounded conditional expectation estimation results
Arguments
- x
An object of class bbnp_regression
- type
Character string specifying plot type. Options are:
"regression"(default): Conditional expectation with confidence interval"ft": Fourier transform plot with estimated envelope
- fill_ci
Color for confidence interval ribbon (default: a muted blue).
- alpha_ci
Transparency for confidence interval ribbon (default: 0.35)
- point_alpha
Transparency for data points (default: 0.28)
- point_color
Color for data points (default: a soft grey).
- ft_resol
Resolution for Fourier transform plot (default: 500)
- xi_range
Optional numeric
c(lower, upper)giving the frequency range to display in the"ft"plot. IfNULL(default) a wide range around the selected window is shown (seeexpand). This controls only what is drawn; it does not change the fitting window[xi_lb, xi_ub].- expand
For the
"ft"plot whenxi_rangeisNULL: how far past the selected window to display, as a multiple (default 2.5).- ...
Additional arguments (unused)
Examples
# \donttest{
X <- gen_sample_data(size = 500, dgp = "2_fold_uniform", seed = 1)
Y <- 2 * X - X^2 + rnorm(length(X), sd = 0.3)
fit <- biasBound_condExpectation(Y, X, h = 0.1)
plot(fit)
plot(fit, type = "ft")
# }