fuseVec: Computes the correlation between a composite and a vector of...

Description Usage Arguments Value Author(s) References Examples

Description

Computes the correlation between a composite and a vector of items.

Usage

1
fuseVec(r_mat, a, wt_a = rep(1, length(a)), output = "vec")

Arguments

r_mat

A correlation matrix.

a

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

wt_a

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

output

Output can be set to "mat", to return a matrix made up of the newly generated correlations appened to the original correlation matrix.

Value

A vector of correlation coefficients.

Author(s)

Allen Goebl and Jeff Jones

References

Lord, F.M. & Novick, M.R. (1968). Statisticl theories of mental test scores., 97-98.

Examples

1
2
3
4
5
6
7
8
data(dls2007)
dat <- dls2007
rxx <- dat[1:4, 2:5]
items <- c(1,3)
wt_a <- c(2,1)

fuseVec(r_mat=rxx, a=items)
fuseVec(r_mat=rxx, a=items, wt_a=wt_a, output="mat")

Example output

[1] 0.7071068 0.2545584 0.7071068 0.4949747
                               V1        V2        V3        V4          
V1 Cognitive ability    1.0000000 0.2400000 0.0000000 0.1900000 0.8944272
V2 Structered interview 0.2400000 1.0000000 0.1200000 0.1600000 0.2683282
V3 Conscientiousness    0.0000000 0.1200000 1.0000000 0.5100000 0.4472136
V4 Biodata              0.1900000 0.1600000 0.5100000 1.0000000 0.3980201
                        0.8944272 0.2683282 0.4472136 0.3980201 1.0000000

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