elementCor: Calculate the correlations between elements.

Description Usage Arguments Value Author(s) References See Also Examples

Description

Calculate the correlations between elements. Note that simple element correlations as a measure of similarity are flawed as they are not invariant to construct reflection (Mackay, 1992; Bell, 2010). A correlation index invariant to construct reflection is Cohen's rc measure (1969), which can be calculated using the argument rc=TRUE which is the default option.

Usage

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

Arguments

x

repgrid object.

rc

Use Cohen's rc which is invariant to construct reflection (see notes). It is used as default.

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.

upper

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

Value

matrix of element correlations

Author(s)

Mark Heckmann

References

Bell, R. C. (2010). A note on aligning constructs. Personal Construct Theory & Practice, (7), 42-48.

Cohen, J. (1969). rc: A profile similarity coefficient invariant over variable reflection. Psychological Bulletin, 71(4), 281-284.

Mackay, N. (1992). Identification, Reflection, and Correlation: Problems In The Bases Of Repertory Grid Measures. International Journal of Personal Construct Psychology, 5(1), 57-75.

See Also

constructCor

Examples

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

elementCor(mackay1992)                      # Cohen's rc
elementCor(mackay1992, rc=F)                # PM correlation
elementCor(mackay1992, rc=F, meth="spear")  # Spearman correlation

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

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


## End(Not run)

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