Learn R Programming

PhylogeneticEM (version 1.0.0)

find_independent_regression_vectors.glmnet_multivariate: Given a regularization path, find K selected independant variables.

Description

find_independent_regression_vectors tries to find a situation where K variables are selected, so that the selected columns of matrix Xp are independant.

Usage

find_independent_regression_vectors.glmnet_multivariate(Xp, K, fit, root)

Arguments

Xp
(transformed) matrix of regression
K
number of non-zero components allowed
root
integer, position of the root column (intercept) excluded from the fit. null if no root column.

Value

delta a vector of regression with K non-zero coefficients.

Details

To do that, if a set of selected is not independent, we go back to the previous selected variables, and forbid the moves that led to non-independance for the rest of the path.