Learn R Programming

thectar

thectar provides tools to facilitate the second step of Hermeneutic Content Analysis (Bergman, 2010, https://dx.doi.org/10.4135/9781506335193). The current version focuses on the use of Multidimensional Scaling (MDS). It provides tools for data preparation, modeling, and interpretation of MDS maps. Many of the tools depend on the package 'smacof' (Mair, De Leuuw, Borg, & Groenen, https://CRAN.R-project.org/package=smacof).

Example

This basic example shows how to compute a similarity matrix and create a plot showing the 20% highest similarities. For this, we use example data on the 17 Sustainable Development Goals. The final map shows similarity of SDGs in terms of importance according to the respondents.

library(thectar)
# Calculate a similiarity matrix using Association Strength Index
data(SDG_coocurrence)
SDG_coocurrence <- SDG_coocurrence[,-2] # Drop the second column as it is not relevant
similarity <- simi(SDG_coocurrence, method = "as", comments = FALSE)
similarity[1:3, 1:3] # Show first three rows and columns
#>                            No_Poverty Zero_Hunger
#> No_Poverty                 0.05882353  0.03715170
#> Zero_Hunger                0.03715170  0.05263158
#> Good_Health_and_Well_Being 0.02941176  0.04135338
#>                            Good_Health_and_Well_Being
#> No_Poverty                                 0.02941176
#> Zero_Hunger                                0.04135338
#> Good_Health_and_Well_Being                 0.07142857

# Create a plot showing the 20% highest similarities
# To compute the MDS solution, we use the package 'smacof' (Mair, De Leuuw, 
# Borg, & Groenen). 

dissimilarity <- max(similarity) - similarity
res <- smacof::smacofSym(dissimilarity, type = "ordinal")
highlall(similarity, res, quantile = 20, xlim = c(-1.4,1.1), cex.labels = 0.55, 
         main = "Perceptions of Sustainable Development Goals")

Copy Link

Version

Install

install.packages('thectar')

Monthly Downloads

1

Version

1.0.0

License

GPL-3

Maintainer

Lena Berger

Last Published

November 15th, 2019

Functions in thectar (1.0.0)

simi

Similarity matrix (simi)
simicount

Similarity matrix by counting (simicount)
highlall

Highlight highest similarities overall (highlall)
highlpoints

Highlight highest similarities per point (highlpoints)
SDG_coocurrence

Co-occurence of Sustainable Development Goals (SDGs)
SDG_grouping

Grouping of Sustainable Development Goals (SDGs)
lspoints

Lowering Stress by excluding points (lspoints)
lscomb

Lowering Stress by comparing combinations (lscomb)