View source: R/conceptMapping.R
conceptMapping | R Documentation |
This function conducts a concept mapping analysis on sorter data, producing a concept map based on one of three clustering methods: k-means, network analysis, or classical multidimensional scaling (CMDS).
conceptMapping(
CMData,
method = "network",
numberOfClusters = "auto",
verbose = TRUE,
rangeNumberOfClusters = 2:15,
graph = FALSE,
numberOfKmeansRestarts = 100,
backgroundColor = "black",
main = NULL,
...
)
CMData |
A data frame containing concept mapping data.
It must include the columns:
|
method |
A string specifying the clustering method to use. Options are:
|
numberOfClusters |
Either a character string ( |
verbose |
Logical, if |
rangeNumberOfClusters |
A vector of integers specifying the range of clusters to evaluate
when |
graph |
Logical. If |
numberOfKmeansRestarts |
An integer specifying the number of restarts for k-means clustering.
Only relevant if |
backgroundColor |
A string specifying the background color of network plots. Default is |
main |
A string specifying the title for plots. Default is |
... |
Additional arguments, such as |
The function supports three methods for clustering:
"kmeans"
: Uses k-means clustering with an optional silhouette-based determination of cluster count.
"network"
: Generates a network plot using modularity-based clustering.
"cmds"
: Applies classical multidimensional scaling (CMDS) and clusters the results.
Heatmaps are created for all methods, while additional visualizations depend on the chosen method and graph
parameter.
An object of class conceptMap
, containing:
allStatements
A data frame with statement numbers and text.
CMData
The original concept mapping data.
method
The clustering method used.
numberOfClusters
The number of clusters identified.
clusterResults
A vector indicating cluster assignments for each statement.
heatmapPlot
A heatmap visualizing co-occurrence patterns.
silhouettePlot
(If applicable) A silhouette plot for "kmeans"
or "cmds"
.
networkPlot
(If applicable) A network plot for "network"
.
cmdsPlot
(If applicable) A CMDS plot for "cmds"
.
# Simulate data with custom parameters:
set.seed(1)
myCMData <- simulateCardData(nSorters=40, pCorrect=.90, attributeWeights=c(1,1,1,1))
# Subject the data to sorter cluster analysis
myCMDataBySorters <- sorterMapping(myCMData)
# Concept mapping on sorter cluster 3 using default "network" method
myCMAnalysis3 <- conceptMapping(myCMDataBySorters[[3]])
# Concept mapping using default network method using 3 clusters
myCMAnalysis3b <- conceptMapping(myCMDataBySorters[[3]], numberOfCluster = 3)
# Concept mapping using kmeans clustering and 3 clusters
myCMAnalysis3c <- conceptMapping(myCMDataBySorters[[3]], method = "kmeans",
numberOfCluster = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.