Cluster analysis

Description
A method for identifying structures in construct system is cluster analysis. Any distance or similarity measure accounting for a certain type of association could be used as a cluster criterion. Traditionally mostly Euclidean and Manhattan distances have been used. The earliest implementation of a cluster algorithm for repertory grids was incorporated in the program FOCUS (Shaw & Thomas, 1978). The following code outputs two dendrograms for the constructs and elements. Several distance measure can be selected (explanations from ?dist dcoumentation):


 * euclidean: Squared distance between the two vectors (L2 norm)
 * manhattan: Also called city-block-distance, absolute distance between the two vectors (L1 norm).
 * minkowski: The p norm, the pth root of the sum of the pth powers of the differences of the components.
 * maximum: Maximum distance between two components of x and y (supremum norm)
 * canberra: $$\sum(|x_i - y_i| / |x_i + y_i|)$$. Terms with zero numerator and denominator are omitted from the sum and treated as if the values were missing. This is intended for non-negative values (e.g. counts).
 * binary: The vectors are regarded as binary bits, so non-zero elements are on and zero elements are off. The distance is the proportion of bits in which only one is on amongst those in which at least one is on.

Also several cluster methods can be selected (explanations from ?hclust documentation). The other methods can be regarded as aiming for clusters with characteristics somewhere between the single and complete link methods:
 * ward</tt>: Ward's minimum variance method aims at finding compact, spherical clusters.
 * complete</tt>: The complete linkage method finds similar clusters.
 * single</tt>: The single linkage method (which is closely related to the minimal spanning tree) adopts a ‘friends of friends’ clustering strategy.
 * average</tt>
 * mcquitty</tt>
 * median</tt>
 * centroid</tt>

The distance and cluster methods can be combined as wished.

Clustering Grids
When the function is called dendrograms of the construct and element clustering are drawn. cluster(bell2010)

The function also returns the reordered matrix invisibly. To see the reordered grid save it into a new object. > x <- cluster(bell2010) > x

META DATA: Number of constructs: 9 Number of elements: 10

SCALE INFO: The grid is rated on a scale from 1 (left pole) to 7 (right pole) using steps of

RATINGS: er (or the person who fill - 5 6 - A person of the opposite A teacher you respected - 4 | | 7 - the unhappiest person y friend of the same sex - 3 | | | | 8 - A person you work wel you did not respect - 2 | | | | | | 9 - self               fident person you  - 1 | | | | | | | | 10 - A person of the                      | | | | | | | | | |                    ot transparent (1)   5 3 4 3 7 6 5 6 6 7   (1) transparent  islikes sports (2)   3 3 3 4 4 2 7 6 6 6   (2) loves sports          rough (3)   3 6 6 5 7 7 6 5 5 4   (3) gentle              relaxed (4)   2 6 4 3 6 5 6 2 4 5   (4) worried & ten   insensitive (5)   3 2 6 4 6 5 5 4 4 4   (5) sensitive    ot interactive (6)   7 4 7 6 5 6 5 7 6 6   (6) loves people (academically) (7)   7 7 7 7 4 6 6 4 6 5   (7) smart (academ ccept as it is (8)  7 5 5 4 4 6 6 5 5 7   (8) loves to argu fearful&timid (9)  6 5 4 5 3 5 4 5 5 6   (9) fearless

The function also allows to only cluster constructs or elements. To only cluster the constructs us the following code. Again a dendrogram is drawn and a grid with reordered constructs is returned. x <- cluster(bell2010, along=1) x

To only cluster the elements specify along=2</tt>.

x <- cluster(bell2010, along=2) x

To apply different distance measures and clsuter methods us the arguments dmethod</tt> and cmethod</tt> (here manhattan distance and single linkage clustering). > x <- cluster(bell2010, dmethod="manh", cmethod="single") > x

META DATA: Number of constructs: 9 Number of elements: 10

SCALE INFO: The grid is rated on a scale from 1 (left pole) to 7 (right pole) using steps of

RATINGS: unhappiest person you know - 5 6 - closest friend of the sam on of the opposite sex t - 4 | | 7 - A teacher you respected er you did not respect - 3 | | | | 8 - A person of the oppos the person who fill - 2 | | | | | | 9 - self fident person you - 1 | | | | | | | | 10 - A person you wor | | | | | | | | | |                   ot interactive (1)   7 5 4 6 5 7 6 6 6 7   (1) loves people (academically) (2)  7 4 7 6 6 7 7 5 6 4   (2) smart (academ ccept as it is (3)   7 4 5 6 6 5 4 7 5 5   (3) loves to argu fearful&timid (4)   6 3 5 5 4 4 5 6 5 5   (4) fearless     ot transparent (5)   5 7 3 6 5 4 3 7 6 6   (5) transparent           rough (6)   3 7 6 7 6 6 5 4 5 5   (6) gentle          insensitive (7)   3 6 2 5 5 6 4 4 4 4   (7) sensitive           relaxed (8)   2 6 6 5 6 4 3 5 4 2   (8) worried & ten islikes sports (9)   3 4 3 2 7 3 4 6 6 6   (9) loves sports

To apply different methods to the constructs and the rows, use a two-step approach.

x <- cluster(bell2010, along=1)                   # cluster constructs using default methods x <- cluster(x, along=2, dm="manh", cm="single")  # cluster elements using manhattan distance and single linkage clustering x

Some other options ca be set. Paste the code into the R console to try it out. cluster(bell2010, main="My cluster analysis")  # new title cluster(bell2010, type="t")                    # different drawing style cluster(bell2010, dmethod="manhattan")         # using manhattan metric cluster(bell2010, cmethod="single")            # do single linkage clustering cluster(bell2010, cex=1, lab.cex=1)            # change appearance cluster(bell2010, lab.cex=.7,                  # advanced appearance changes        edgePar = list(lty=1:2, col=2:1))

Clustered Bertin
The following figure shows a clustered Bertin matrix. The full explanation is found under the section  Bertin display.



Literature

 * Shaw, M. L., & Thomas, L. F. (1978). FOCUS on education - an interactive computer system for the development and analysis of repertory grids. International Journal of Man-Machine Studies, 10(2), 139-173.