solveWt: Find r given arbitrary predictor weights

Description Usage Arguments Value Note Author(s) Examples

Description

Find r given arbitrary predictor weights

Usage

1
solveWt(r_mat, y_col, x_col, wt)

Arguments

r_mat

A correlation matrix.

y_col

A vector of columns representing criterion variables.

x_col

A vector of columns representing predictor variables.

wt

A vector of predictor weights or a list of multiple vectors.

Value

The correlation between the weighted predictor composite and criterion.

Note

This uses a simpler, faster version of the same formula used for fuse().

Author(s)

Allen Goebl and Jeff Jones

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(iopsych)
#Get Data
data(dls2007)
r_mat <- dls2007[1:6, 2:7]

#Get weights
unit_wt <- c(1,1,1,1)
other_wt <- c(1,2,1,.5)
wt_list <- list(unit_wt, other_wt)

#Solve
solveWt(r_mat=r_mat, y_col=6, x_col=1:4, wt=unit_wt)
solveWt(r_mat=r_mat, y_col=6, x_col=1:4, wt=other_wt)
solveWt(r_mat=r_mat, y_col=6, x_col=1:4, wt=wt_list)

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