constructCor: Calculate the correlations between constructs.

Description Usage Arguments Value Author(s) See Also Examples

Description

Calculate the correlations between constructs. Different type of correlations can be requested: PMC, Kendall tau rank correlation, Spearman rank correlation.

Usage

1
2
3
constructCor(x, method=c("pearson", "kendall", "spearman"), trim=20,
    index=FALSE, col.index=TRUE, digits=2, output=1,
    upper=T)

Arguments

x

repgrid object.

method

A character string indicating which correlation coefficient is to be computed. One of "pearson" (default), "kendall" or "spearman", can be abbreviated. The default is "pearson".

trim

The number of characters a construct is trimmed to (default is 20). If NA no trimming occurs. Trimming simply saves space when displaying correlation of constructs with long names.

index

Whether to print the number of the construct.

col.index

Logical. Whether to add an extra index column so the column names are indexes instead of construct names. This option renders a neater output as long construct names will stretch the output (default is FALSE).

digits

Numeric. Number of digits to round to (default is 2).

output

The type of output printed to the console. output=0 will supress printing of the output. output=1 will print results to the screen. output=2 will surpress printing but return a matrix ready for printing.

upper

Whether to display upper triangle of correlation matrix only (default is TRUE).

Value

Prints results to the console and invisibly returns a matrix of construct correlations.

Author(s)

Mark Heckmann

See Also

elementCor

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 

# three different types of correlations
constructCor(mackay1992)                
constructCor(mackay1992, meth="kend")
constructCor(mackay1992, meth="spea")

# format output
constructCor(mackay1992, upper=F)   
constructCor(mackay1992, col.index=F, trim=6)
constructCor(mackay1992, index=T, col.index=F, trim=6)

# save as object for further processing.
# no visible output.
r <- constructCor(mackay1992, trim=6, out=0)
r


## End(Not run)

OpenRepGrid documentation built on May 2, 2019, 4:54 p.m.