Learn R Programming

yaImpute (version 1.0-21)

bestVars: Computes the number of best X-variables

Description

The number of best variables is estimated by finding an apparent inflection point in the relationship between the generalized root mean square distance (see link{grmsd} and the number of X-variables.

Usage

bestVars(obj,nbest=NULL)

Arguments

obj
an object create by varSelection
nbest
number of variables designated as the best; if null the number is estimated

Value

  • An character vector of variable names in decreasing order of importance.

See Also

varSelection

Examples

Run this code
require(yaImpute)

data(iris)
set.seed(12345)

x <- iris[,1:2]  # Sepal.Length Sepal.Width 
y <- iris[,3:4]  # Petal.Length Petal.Width 

vsel <- varSelection(x=x,y=y,nboot=5,useParallel=FALSE)

bestVars(vsel)

Run the code above in your browser using DataLab