
ENA Rotate by generalized means rotation (GMR)
Source:R/ena.rotate.by.generalized.R
ena.rotate.by.generalized.RdComputes a dimensional reduction from a matrix of ENA points
such that the first dimension best represents the contribution of a target
variable after controlling for covariates via Lasso. An optional second
GMR axis can be computed for y_var; remaining dimensions are filled
by SVD of the doubly-deflated space. Delegates to
generalized_means_rotation.
Arguments
- enaset
An
ENAsetor compatible list withmodel$points.for.projection(orpoints.normed.centered),line.weights, androtation$codes.- params
A list with the following named elements:
x_varRequired. A
data.frame(or character vector of column names inenaset$meta.data) whose first column is the target variable. Additional columns are treated as covariates and penalized via Lasso.y_varOptional. Same format as
x_var. When provided a second GMR axis is computed.select_2_groupsOptional length-2 list/vector of group labels. When given, the GMR fit for the x axis uses only rows whose target value is in these two groups. The group mean difference for x1 (the secondary axis that keeps group means on the x-axis) is always computed from the full data.
interactionsLogical; if
TRUE(default) pairwise interaction terms are added to the model matrix when covariates are present. SetFALSEfor main-effects-only Lasso.
Value
A list with rotation (q x q matrix, column names GMR1,
GMR2|SVD2, SVD3, …), codes, eigenvalues, and
node.positions = NULL, suitable for use inside rotate().