|
Subject: | XploRe Application Guide |
See XploRe: |
Quantlet: | clust09 | |
Description: | shows the dendrogram with Ward method | |
Download: | clust09.xpl |
proc()=main() x=read("bank2") i=0 ; compute the euclidean distance d=0.*matrix(rows(x),rows(x)) while (i.<cols(x)) i = i+1 d = d+(x[,i] - x[,i]')^2 endo t = agglom (d, "WARD", 3) ; use WARD method t g = tree (t.g, 0) ; to cluster the data g=g.points l = 5.*(1:rows(g)/5) + (0:4)' - 4 setmaskl (g, l, 0, 1, 1) setmaskp (g, 0, 0, 0) d = createdisplay (1,1) show (d, 1, 1, g) ; show the dendrogram endp ; main()
Subject: | XploRe Application Guide |
See XploRe: |