knitr::opts_chunk$set(collapse = TRUE, comment = "#")
library(OpenRepGrid)
settings(show.scale=FALSE, show.meta=FALSE)

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).

Several distance measure can be selected (explanations from ?dist dcoumentation):

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:

The distance and cluster methods can be combined as wished.

R-Code

Clustering

When the function cluster 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. To oppress the creation of a graphic set print = FALSE.

x <- cluster(bell2010, print=FALSE)
x

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, print=FALSE)
x

To only cluster the elements set along=2.

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

To apply different distance measures and cluster methods us the arguments dmethod and cmethod (here manhattan distance and single linkage clustering).

x <- cluster(bell2010, dmethod="manh", cmethod="single", print=FALSE)
x

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

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

Some other options can be set. Paste the code into the R console to try it out. See ?cluster for more information.

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))

Bootsrapped clustering

TODO

Clustered Bertin

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

bertinCluster(bell2010)

Literature



markheckmann/OpenRepGrid documentation built on April 14, 2024, 8:15 a.m.