Learn R Programming

rENA (version 0.3.0)

gmr: Generalized Means Rotation (GMR)

Description

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

Usage

gmr(V, X)

Value

A numeric vector representing the rotation.

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.

See Also

get_x1_main_effect

Examples

Run this code
if (FALSE) {
V <- matrix(rnorm(100), ncol = 5)
X <- data.frame(target = rnorm(20), predictor1 = rnorm(20), predictor2 = rnorm(20))
r <- gmr(V, X)
}

Run the code above in your browser using DataLab