fuse: Computes the correlation between two composites of items.

Description Usage Arguments Value Note Author(s) References Examples

Description

Computes the correlation between two composites of items. Composites may contain overalapping items. Items weights for each composite may be specified.

Usage

1
fuse(r_mat, a, b, wt_a = rep(1, length(a)), wt_b = rep(1, length(b)))

Arguments

r_mat

A correlation matrix.

a

The items used for composite A specified as a vector of column numbers.

b

The items used for composite B specified as a vector of column numbers.

wt_a

A vector containing the weights of each item in composite A.

wt_b

A vector containing the weights of each item in composite B.

Value

A correlation coefficient.

correlation

The correlation between two composites.

covariance

The covariance between two composites.

variance_a

The variance of composite A.

variance_b

The variance of composite B.

Note

This function is entended to be used for single cases. See fuse2() for a vectorized alternative to this function.

Author(s)

Allen Goebl and Jeff Jones

References

Lord, F.M. & Novick, M.R. (1968). Statisticl theories of menal test scores.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
Rxx <- matrix(c(1.00, 0.25,  0.50,  0.61,
                0.25, 1.00,  0.30,  0.10,
                0.50, 0.30,  1.00, -0.30,
                0.61, 0.10, -0.30,  1.00), 4, 4)
a   <- c(1, 3)
b   <- c(2, 4)

# Example using overlapping items and weights
Rxx  <- matrix(.3, 4, 4); diag(Rxx) <- 1
a    <- c(1, 2, 4)
b    <- c(2, 3)
wt_a <- c(.60, .25, .15)
wt_b <- c(2, 3)

fuse(r_mat = Rxx, a = a, b = b, wt_a = wt_a, wt_b = wt_b)

allengoebl/iopsych documentation built on May 10, 2019, 9:22 a.m.