gmr: Generalized Means Rotation (GMR)

View source: R/gmr.R

gmrR Documentation

Generalized Means Rotation (GMR)

Description

Computes the generalized means rotation for a given set of ENA points and predictor variables.

Usage

gmr(V, X)

Arguments

V

A matrix containing ENA set points for projection.

X

A data frame containing all predictor variables, with the first column as the target variable.

Details

If X has only one column, a linear model is fit between V and the single predictor. Otherwise, the main effect of the first predictor is extracted using get_x1_main_effect. Singular value decomposition (SVD) is then performed, and the first right singular vector is used to project the data. A linear model is fit to the projected data, and the coefficients are normalized to produce the rotation vector.

Value

A numeric vector representing the rotation.

See Also

get_x1_main_effect

Examples

## Not run: 
V <- matrix(rnorm(100), ncol = 5)
X <- data.frame(target = rnorm(20), predictor1 = rnorm(20), predictor2 = rnorm(20))
r <- gmr(V, X)

## End(Not run)


rENA documentation built on Nov. 5, 2025, 5:50 p.m.

Related to gmr in rENA...