Description Usage Arguments Value Examples
This function estimates the dimension, i.e. the rank of B. The default
method 'CV'
performs leave-one-out (LOO) cross-validation using
mars
as follows for k = min.dim, ..., max.dim
a
cross-validation via mars
is
performed on the dataset (Y_i, B_k' X_i)_{i = 1, ..., n} where
B_k is the p x k dimensional CVE estimate. The
estimated SDR dimension is the k where the
cross-validation mean squared error is minimal. The method 'elbow'
estimates the dimension via k = argmin_k L_n(V_{p - k}) where
V_{p - k} is the space that is orthogonal to the column space of the
CVE estimate of B_k. Method 'wilcoxon'
finds the minimum using
the Wilcoxon test.
1 | predict_dim(object, ..., method = "CV")
|
object |
an object of class |
... |
ignored. |
method |
This parameter specifies which method is used in dimension
estimation. It provides three options: |
A list
with
criterion for method and k = min.dim, ..., max.dim
.
estimated dimension is the minimizer of the criterion.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # create B for simulation
B <- rep(1, 5) / sqrt(5)
set.seed(21)
# creat predictor data x ~ N(0, I_p)
x <- matrix(rnorm(500), 100)
# simulate response variable
# y = f(B'x) + err
# with f(x1) = x1 and err ~ N(0, 0.25^2)
y <- x %*% B + 0.25 * rnorm(100)
# Calculate cve for unknown k between min.dim and max.dim.
cve.obj.simple <- cve(y ~ x)
predict_dim(cve.obj.simple)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.