constructCor {OpenRepGrid} | R Documentation |
Calculate correlations between constructs.
Description
Different types of correlations can be requested: PMC, Kendall tau rank correlation, Spearman rank correlation.
Usage
constructCor(
x,
method = c("pearson", "kendall", "spearman"),
trim = 20,
index = FALSE
)
Arguments
x |
|
method |
A character string indicating which correlation coefficient
is to be computed. One of |
trim |
The number of characters a construct is trimmed to (default is
|
index |
Whether to print the number of the construct. |
Value
Returns a matrix of construct correlations.
See Also
Examples
# three different types of correlations
constructCor(mackay1992)
constructCor(mackay1992, method = "kendall")
constructCor(mackay1992, method = "spearman")
# format output
constructCor(mackay1992, trim = 6)
constructCor(mackay1992, index = TRUE, trim = 6)
# save correlation matrix for further processing
r <- constructCor(mackay1992)
r
print(r, digits = 5)
# accessing the correlation matrix
r[1, 3]
[Package OpenRepGrid version 0.1.15 Index]