## example of rebus analysis with simulated data
data(sim.data)
## First compute GLOBAL model
sim.mat <- matrix(c(0,0,0,0,0,0,1,1,0),3,3,byrow=TRUE)
dimnames(sim.mat) <- list(c("Price","Quality","Satisfaction"),
c("Price","Quality","Satisfaction"))
sim.sets <- list(c(1,2,3,4,5),c(6,7,8,9,10),c(11,12,13))
sim.mod <- c("A","A","A") ## reflective indicators
sim.global <- plspm(sim.data, sim.mat, sim.sets, sim.mod)
sim.global
## Then compute cluster analysis on the residuals of global model
sim.res.clus <- res.clus(sim.global)
## Plot dendrogram with 4 classes specifying colors
dev.new()
resclus.plot(sim.res.clus, k=4, col.up="gray", col.down=c("orange","royalblue","green3","red"))
## Plot triangular dendrogram with 4 classes, labels shown, and widther lines
dev.new()
resclus.plot(sim.res.clus, k=4, lwd.down=2, col.up="gray", show.labels=TRUE, type="triangle")
Run the code above in your browser using DataLab