fungible: Generate Fungible Regression Weights

Description Usage Arguments Value Author(s) References Examples

View source: R/fungible.R

Description

Generate fungible weights for OLS Regression Models.

Usage

1
fungible(R.X, rxy, r.yhata.yhatb, sets, print = TRUE)

Arguments

R.X

p x p Predictor correlation matrix.

rxy

p x 1 Vector of predictor-criterion correlations.

r.yhata.yhatb

Correlation between least squares (yhatb) and alternate-weight (yhata) composites.

sets

Number of returned sets of fungible weights.

print

Logical, if TRUE then print 5-point summaries of alternative weights.

Value

a

Number of sets x p matrix of fungible weights.

k

Number of sets x p matrix of k weights.

b

p x 1 vector of LS weights.

u

p x 1 vector of u weights.

r.yhata.yhatb

Correlation between yhata and yhatb.

r.y.yhatb

Correlation between y and yhatb.

cov.a

Expected covariance matrix for a.

cor.a

Expected correlation matrix for a.

Author(s)

Niels Waller

References

Waller, N. (2008). Fungible weights in multiple regression. Psychometrika, 73, 69–703.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Predictor correlation matrix
R.X <- matrix(c(1.00,   .56,  .77,
                 .56,  1.00,  .73,
                 .77,   .73, 1.00), 3, 3)
 
## vector of predictor-criterion correlations 
rxy <- c(.39, .34, .38)
 
 
## OLS standardized regression coefficients
b <- solve(R.X) %*% rxy
 
## Coefficient of determination (Rsq)
OLSRSQ <- t(b) %*% R.X %*% b

## theta controls the correlation between 
## yhatb: predicted criterion scores using OLS coefficients
## yhata: predicted criterion scores using alternate weights
theta <- .01

## desired correlation between yhata and yhatb 
r.yhata.yhatb <- sqrt( 1 - (theta)/OLSRSQ)

## number of returned sets of fungible weight vectors
Nsets <- 50

output <- fungible(R.X, rxy, r.yhata.yhatb, sets = Nsets, print = TRUE)

fungible documentation built on Sept. 29, 2021, 1:06 a.m.

Related to fungible in fungible...