plot.npsdr: Plot sufficient predictors from an npsdr object
Description
Creates diagnostic scatter plots of nonlinear sufficient predictors produced
by npsdr(). The function visualizes the estimated transformed directions
and optionally overlays a lowess smoothing curve for continuous responses.
Additional graphical arguments can be provided. These plots help assess
nonlinear structure in the data and evaluate how effectively the kernel SDR
method reduces dimensionality.
# \donttest{set.seed(1)
n <- 200;
p <- 5;
x <- matrix(rnorm(n*p, 0, 2), n, p)
y <- x[,1]/(0.5 + (x[,2] + 1)^2) + 0.2*rnorm(n)
obj_kernel <- npsdr(x, y, plot=FALSE)
plot(obj_kernel, d = 1)
# }