elementCor: Calculate the correlations between elements.

View source: R/calc.r

elementCorR Documentation

Calculate the correlations between elements.

Description

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

elementCor(x, rc = TRUE, method = "pearson", trim = 20, index = TRUE)

Arguments

x

repgrid object.

rc

Use Cohen's rc which is invariant to construct reflection (see description above). It is used as the 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.

Value

matrix of element correlations

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


   elementCor(mackay1992)                      # Cohen's rc
   elementCor(mackay1992, rc=FALSE)            # PM correlation
   elementCor(mackay1992, rc=FALSE, method="spearman")  # Spearman correlation

   # format output
   elementCor(mackay1992, trim=6)
   elementCor(mackay1992, index=FALSE, trim=6)

   # save as object for further processing
   r <- elementCor(mackay1992)
   r
   
   # change output of object
   print(r, digits=5)
   print(r, col.index=FALSE)
   print(r, upper=FALSE)
   
   # accessing elements of the correlation matrix
   r[1,3]
   

OpenRepGrid documentation built on May 31, 2023, 5:33 p.m.