March 2019
Beginner to intermediate
448 pages
13h 14m
English
We will reuse the same example from the previous recipe, and we will find the most representative clusters.
library(TraMineR)
datax <- read.csv("./data__model.csv",stringsAsFactors = FALSE)mvad.labels <- c("CLOSED","L1", "L2", "L3")mvad.scode <- c("CLD","L1", "L2", "L3")mvad.seq <- seqdef(datax, 3:22, states = mvad.scode,labels = mvad.labels)group__ <- paste0(datax$Sex,"-",datax$Age)
dist.om1 <- seqdist(mvad.seq, method = "OM", indel = 1, sm = "TRATE")library(cluster)clusterward1 <- agnes(dist.om1, diss = TRUE, method = "ward")plot(clusterward1, ...
Read now
Unlock full access