hierarchical clustering - Using "ward" method with pvclust in R -
i using pvclust package in r hierarchical clustering dendrograms p-values.
i want use "ward" clustering , "euclidean" distance method. both work fine data when using hclust. in pvclust keep getting error message "invalid clustering method". problem apparently results "ward" method, because other methods such "average" work fine, "euclidean" on own.
this syntax , resulting error message:
result <- pvclust(t(data2007num), method.hclust="ward", method.dist="euclidean", nboot=100) bootstrap (r = 0.5)... error in hclust(distance, method = method.hclust) : invalid clustering method my data matrix has following form (28 countries x 20 policy dimensions):
x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 y1 y2 y3 y4 y5 y6 y7 y8 y9 y10 aut 2 3 4 2 1 1 4 3 2 2 2 3 3 4 4 2.0 5 4 0 3 ger 3 5 3 2 1 3 2 4 4 5 4 0 4 5 4 3.0 5 5 3 2 swe 5 5 1 5 4 3 1 4 4 5 3 4 5 2 4 3.0 3 3 5 0 nld 4 4 2 3 2 1 0 4 4 0 4 4 4 2 2 4.0 4 4 2 5 esp 3 4 1 4 5 0 3 2 4 1 4 3 3 1 2 3.0 2 2 0 2 ita 3 2 0 3 1 1 3 3 5 5 4 2 4 1 1 2.0 0 2 0 2 fra 3 2 1 3 1 2 4 2 5 2 3 2 3 3 5 4.0 1 2 0 3 dnk 5 2 1 3 4 4 2 4 3 0 4 4 2 3 5 2.0 5 4 5 3 gre 3 3 2 5 2 1 3 2 2 2 3 2 3 0 2 3.0 0 1 0 2 che 5 4 3 3 4 3 2 3 4 1 4 4 2 1 1 3.0 5 4 0 3 bel 3 2 3 1 4 2 4 2 2 2 3 3 3 1 5 2.0 2 3 2 0 cze 2 4 3 3 2 2 1 2 5 2 3 1 4 1 2 3.0 1 4 0 2 pol 3 3 4 4 0 1 3 3 2 2 4 2 2 0 3 4.0 2 2 0 3 irl 3 1 2 1 4 3 2 1 5 4 3 2 2 1 3 2.0 0 1 1 2 lux 2 1 2 5 3 2 2 5 4 2 2 4 3 2 4 3.0 2 3 0 1 hun 1 3 2 3 2 1 4 3 5 4 2 3 4 3 3 2.0 3 2 4 2 prt 3 2 3 5 4 1 4 1 5 5 3 2 2 1 2 2.0 1 1 1 1 aus 4 1 2 1 2 3 1 1 1 5 4 5 3 1 2 3.0 1 3 5 1 can 1 1 1 1 4 1 0 1 1 5 1 1 3 3 2 2.0 1 2 5 4 fin 5 4 4 3 2 3 2 3 3 3 2 2 4 3 3 3.0 4 4 5 2 gbr 3 1 2 1 2 3 1 1 2 5 4 4 4 3 1 2.0 1 3 5 5 jpn 4 1 0 1 2 2 0 2 5 4 3 1 1 3 3 2.0 2 4 5 3 kor 3 3 0 1 2 1 0 0 1 4 0 1 1 2 3 2.0 1 2 1 3 mex 0 3 4 0 3 2 5 2 3 5 2 2 0 0 0 0.0 0 1 0 3 nzl 5 1 2 1 2 3 1 1 5 2 3 5 2 2 2 0.5 0 0 3 3 nor 5 3 2 4 2 4 2 5 4 2 4 5 4 2 4 4.0 5 4 5 0 svk 1 4 3 2 4 2 1 2 5 2 3 2 4 2 2 3.0 0 2 0 3 usa 3 0 1 3 2 4 0 3 0 1 0 0 3 4 1 2.0 1 1 5 4 i tried used "ward" dataset provided pvclust package (lung) other data provided in r (such boston in mass package, without success. solution or if "ward" method disabled inpvclust?
Comments
Post a Comment