Learn R Programming

CVarE (version 1.1)

predict_dim: Estimate Dimension of the Sufficient Reduction.

Description

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 \times 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.

Usage

predict_dim(object, ..., method = "CV")

Arguments

object

an object of class "cve", usually, a result of a call to cve or cve.call.

...

ignored.

method

This parameter specifies which method is used in dimension estimation. It provides three options: 'CV' (default), 'elbow' and 'wilcoxon'.

Value

A list with

criterion for method and k = min.dim, ..., max.dim.

k

estimated dimension is the minimizer of the criterion.

Examples

Run this code
# NOT RUN {
# 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)

# }

Run the code above in your browser using DataLab