library(didec)
n <- 50
X1 <- rnorm(n,0,1)
X2 <- X1
X3 <- rnorm(n,0,1)
X4 <- X3 + X2
X <- data.frame(X1=X1,X2=X2,X3=X3,X4=X4)
vcp <- VarClustPartition(X,
dist.method = c("PD"),
part.method = c("optimal"),
criterion = c("Silhouette"),
plot = TRUE)
vcp$clusters
# \donttest{
data("bioclimatic")
X <- bioclimatic[c(2:4,9)]
vcp1 <- VarClustPartition(X,
linkage = TRUE,
link.method = c("complete"),
dist.method = "PD",
part.method = "optimal",
criterion = "Silhouette",
plot = TRUE)
vcp1$clusters
vcp2 <- VarClustPartition(X,
linkage = TRUE,
link.method = c("complete"),
dist.method = "footrule",
part.method = "optimal",
criterion = "Adiam&Msplit",
plot = TRUE)
vcp2$clusters
# }
Run the code above in your browser using DataLab