Skip to contents

Creates visualizations of bias-bounded conditional expectation estimation results

Usage

# S3 method for class 'bbnp_regression'
plot(
  x,
  type = c("regression", "ft"),
  fill_ci = "grey",
  alpha_ci = 0.8,
  point_alpha = 0.3,
  ft_resol = 500,
  ...
)

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: "grey")

alpha_ci

Transparency for confidence interval ribbon (default: 0.8)

point_alpha

Transparency for data points (default: 0.3)

ft_resol

Resolution for Fourier transform plot (default: 500)

...

Additional arguments (unused)

Value

A ggplot2 object

Examples

# \donttest{
X <- rnorm(100)
Y <- X^2 + rnorm(100)
fit <- biasBound_condExpectation(Y, X, h = 0.1)
#> Warning: No feasible xi_n passed Schennach's test in interval [0.9695, 3.0660]. Using theoretical upper bound xi_ub = 3.0660. This may indicate insufficient signal or inappropriate xi bounds.
plot(fit)

plot(fit, type = "ft")

# }