fuseMat: The intercorrelation among items and composites made of these...

Description Usage Arguments Value Author(s) Examples

Description

The key matrix is used to specify any number of weighted item composites. A correlation matrix of these composites and the original correlation matrix is then computed and returned.

Usage

1
fuseMat(r_mat, key_mat, type = "full")

Arguments

r_mat

A correlation matrix.

key_mat

A matrix with one row for each composite and one column for each item contained in r_mat. The value if each element corresponds to the weight given to an item.

type

The type of output desired.

Value

If type = cxc then a matrix of the intercorrelations between the specified composites are returned. If type = cxr then the intercorrelations between the original item and the specified composites are returned. If type = full then all the intercorrelations between both the original items and the specified composites are returned.

Author(s)

Allen Goebl and Jeff Jones

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
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); Rxx

# Single composite
Key <- matrix(c(1, 2, 3, -1), 1, 4); Key

fuseMat(r_mat = Rxx, key_mat = Key)

# Three composites
Key <- matrix(c(1, 2, 3, -1,
                2, 1, 0, -2,
                1, 1, 0,  0), 3, 4, byrow = TRUE)

fuseMat(Rxx, Key)

Example output

     [,1] [,2] [,3]  [,4]
[1,] 1.00 0.25  0.5  0.61
[2,] 0.25 1.00  0.3  0.10
[3,] 0.50 0.30  1.0 -0.30
[4,] 0.61 0.10 -0.3  1.00
     [,1] [,2] [,3] [,4]
[1,]    1    2    3   -1
     [,1] [,2] [,3]  [,4] [,5]
[1,] 1.00 0.25  0.5  0.61 1.00
[2,] 0.25 1.00  0.3  0.10 0.25
[3,] 0.50 0.30  1.0 -0.30 0.50
[4,] 0.61 0.10 -0.3  1.00 0.61
[5,] 1.00 0.25  0.5  0.61 1.00
          [,1]      [,2]       [,3]       [,4]       [,5]       [,6]      [,7]
[1,] 1.0000000 0.2500000  0.5000000  0.6100000  0.5007501  0.4740959 0.7905694
[2,] 0.2500000 1.0000000  0.3000000  0.1000000  0.6390325  0.5983735 0.7905694
[3,] 0.5000000 0.3000000  1.0000000 -0.3000000  0.9218830  0.8745459 0.5059644
[4,] 0.6100000 0.1000000 -0.3000000  1.0000000 -0.2283756 -0.3129954 0.4490434
[5,] 0.5007501 0.6390325  0.9218830 -0.2283756  1.0000000  0.9653532 0.7208618
[6,] 0.4740959 0.5983735  0.8745459 -0.3129954  0.9653532  1.0000000 0.6782892
[7,] 0.7905694 0.7905694  0.5059644  0.4490434  0.7208618  0.6782892 1.0000000

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