Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gllobally optimal clustering in STATA

    Hello statalisters,
    during my researches I came across several advanced clustering methods that, differently from K-means, would allow finding globally optimal clustering instead of local ones.
    Is there any of these methods available on Stata 14?

    Thanks,
    Marco

  • #2
    Look them up - the manual explains the clustering available. Also, enter findit cluster in the command window to see if a user written procedures does what you need.

    Comment


    • #3
      I have just put up an implementation of Partitioning Around Medoids at http://teaching.sociology.ul.ie/statacode. PAM attempts a global maximisation.

      Try:

      Code:
      net from http://teaching.sociology.ul.ie/statacode
      net describe clutils
      net install clutils
      If you use the code, please let me know how you get on. It hasn't been widely tested.

      Working example:
      Code:
      set matsize 1000
      sysuse citytemp
      keep if !missing(tempjan)
      gen id = _n
      sort id
      matrix dissim dd = temp*, L2squared
      clpam k4, dist(dd) id(id) medoids(4) many
      separate tempjan, by(k4)
      scatter tempjan1-tempjan4 tempjul, legend(off)
      Click image for larger version

Name:	clpamexample.png
Views:	1
Size:	85.5 KB
ID:	1400612

      Comment

      Working...
      X