Learn R Programming

iopsych (version 0.90.1)

relWt: Relative weights

Description

Function to implement Johnson's (2000) relative weight computation.

Usage

relWt(r_mat, y_col, x_col)

Arguments

r_mat
A correlation matrix.
y_col
A vector of columns representing criterion variables.
x_col
A vector of columns representing predictor variables.

Value

A list containing the objects eps, beta_star, and lambda_star. The object eps contains the vector of relative weights of the predictors whose sum is equivalent to the model $R^2$ (see Johnson, 2000, ps 8 - 9). The object beta_star contains the regression weights from regressing the criterion on Z, the 'best fitting orthogonal approximation' of the predictor variables (see Johnson, 2000, p. 5). The object lambda_star contains the regression coefficients from regressing Z on the predictor variables (see Jonhson, 2000, p. 8).

References

Johnson, J. (2000). A heuristic method for estimating the relative weight of predictor variables in multiple regression. Multivariate Behavioral Research, 35, 1--19.

Examples

Run this code
Rs <- matrix(c(1.0, 0.2,  0.3, 0.4, -0.4,
               0.2, 1.0,  0.5, 0.1,  0.1,
               0.3, 0.5,  1.0, 0.2, -0.3,
               0.4, 0.1,  0.2, 1.0,  0.4,
              -0.4, 0.1, -0.3, 0.4,  1.0), 5, 5)
ys <- 5
xs <- 1:4

relWt(Rs, ys, xs)

Run the code above in your browser using DataLab