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

Share:

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")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.