plot.cve {CVE} | R Documentation |
Boxplots of the output L
from cve
over k
from
min.dim
to max.dim
. For given k
, L
corresponds
to L_n(V, X_i) where V is a stiefel manifold element as
minimizer of
L_n(V), for further details see Fertl, L. and Bura, E. (2019).
## S3 method for class 'cve' plot(x, ...)
x |
an object of class |
... |
Fertl, L. and Bura, E. (2019), Conditional Variance Estimation for Sufficient Dimension Reduction. Working Paper.
see par
for graphical parameters to pass through
as well as plot
, the standard plot utility.
# create B for simulation B <- cbind(rep(1, 6), (-1)^seq(6)) / sqrt(6) set.seed(21) # creat predictor data x ~ N(0, I_p) X <- matrix(rnorm(600), 100) # simulate response variable # y = f(B'x) + err # with f(x1, x2) = x1^2 + 2 x2 and err ~ N(0, 0.25^2) Y <- (X %*% B[, 1])^2 + 2 * X %*% B[, 2] + rnorm(100, 0, .1) # Create bandwidth estimation function estimate.bandwidth <- function(X, k, nObs) { n <- nrow(X) p <- ncol(X) X_c <- scale(X, center = TRUE, scale = FALSE) 2 * qchisq((nObs - 1) / (n - 1), k) * sum(X_c^2) / (n * p) } # calculate cve with method 'simple' for k = min.dim,...,max.dim cve.obj.simple <- cve(Y ~ X, h = estimate.bandwidth, nObs = sqrt(nrow(X))) # elbow plot plot(cve.obj.simple)