Calculate some descriptive statistics of each group
summarizeClusters(data, belongmatrix, weighted = TRUE, dec = 3, silent = TRUE)
The original dataframe used for the classification
A membership matrix
A boolean indicating if the summary statistics must use the membership matrix columns as weights (TRUE) or simply assign each observation to its most likely cluster and compute the statistics on each subset (FALSE)
An integer indicating the number of digits to keep when rounding (default is 3)
A boolean indicating if the results must be printed or silently returned
A list of length k (the number of group). Each element of the list is a dataframe with summary statistics for the variables of data for each group
data(LyonIris)
AnalysisFields <-c("Lden","NO2","PM25","VegHautPrt","Pct0_14","Pct_65","Pct_Img",
"TxChom1564","Pct_brevet","NivVieMed")
dataset <- sf::st_drop_geometry(LyonIris[AnalysisFields])
queen <- spdep::poly2nb(LyonIris,queen=TRUE)
Wqueen <- spdep::nb2listw(queen,style="W")
result <- SFCMeans(dataset, Wqueen,k = 5, m = 1.5, alpha = 1.5, standardize = TRUE)
summarizeClusters(dataset, result$Belongings)