relWt: Relative weights

Description Usage Arguments Value Author(s) References Examples

Description

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

Usage

1
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).

Author(s)

Jeff Jones and Allen Goebl

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

1
2
3
4
5
6
7
8
9
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)

Example output

$eps
         EPS
1 0.24066119
2 0.05492664
3 0.12143476
4 0.28158189

$beta_star
[1] -0.4924924  0.2204546 -0.3504168  0.5335388

$lambda_star
          [,1]      [,2]       [,3]       [,4]
[1,] 0.9670433 0.0823975 0.13647693 0.19852422
[2,] 0.0823975 0.9632848 0.25351748 0.03196840
[3,] 0.1364769 0.2535175 0.95383919 0.08540336
[4,] 0.1985242 0.0319684 0.08540336 0.97584446

iopsych documentation built on May 2, 2019, 2:27 p.m.