Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


folda (version 0.1.0)

forwardSel: Forward Selection via Multivariate Test Statistics

Description

This function performs forward selection on a dataset based on multivariate test statistics (Pillai or Wilks). It iteratively adds variables that contribute the most to the test statistic until no significant variables are found or a stopping criterion is met.

Usage

forwardSel(m, response, testStat = "Pillai", alpha = 0.1, correction = TRUE)

Value

A list with three components:

currentVarList

A vector of selected variable indices based on the forward selection process.

forwardInfo

A data frame containing detailed information about the forward selection process, including the selected variables, test statistics, and thresholds.

stopInfo

A character string describing why the selection process stopped.

Arguments

m

A numeric matrix containing the predictor variables. Rows represent observations and columns represent variables.

response

A factor representing the response variable with multiple levels (groups).

testStat

A character string specifying the test statistic to use. Can be "Pillai" (default) or "Wilks".

alpha

A numeric value between 0 and 1 specifying the significance level for the test. Default is 0.1.

correction

A logical value indicating whether to apply a multiple comparison correction. Default is TRUE.

References

Wang, S. (2024). A New Forward Discriminant Analysis Framework Based On Pillai's Trace and ULDA. arXiv preprint arXiv:2409.03136. Available at https://arxiv.org/abs/2409.03136.