[R] Clustering nested data

Scott Bearer sbearer at tnc.org
Fri Jul 6 18:43:23 CEST 2007

Hi all,

I am interested in performing a cluster analysis on ecological data from
forests in Pennsylvania.  I would like to develop definitions for forest
types (red maple forests, upland oak forests, etc.(AH AR in attached table))
based on measured attributes in each forest type.  To do this, I would like
to 'draw clusters' around forest types based on information from various
tree species (red maple, red oak, etc.(837, 832 in attached table))
occurring in those forests.  Each row of data includes mean values on a
particular species occurring within a forest type at a particular site.  In
other words, if we monitored 10 sites in red maple forests, we would only
have 10 rows of data for the tree species 'red maple', even though we
measured 100 trees.

I have used classification trees to examine this data, which I like because
of it's predictive abilities for later 'unknown' datasets.  However, my
concern is that the mean species attributes (columns Diameter:Avgnumtrees in
attached table) are associated with the tree species (nested?)(column
Treespecies in attached table) and are not independent attributes, but are
directly associated with the species listed in that row.

My question is, what is the best way to conduct a clustering (I have also
tried hclust, cclust and flexclust) or CART model with this sort of nested
Also, what is the preferrable method for predicting a new dataset once these
clusters or CART models have been developed?

Any help would be greatly appreciated.

Kind regards,


      Scott L. Bearer, Ph.D.
      Forest Ecologist

      sbearer at tnc.org
      (570) 321-9092 (Office)
      (570) 321-9096 (Fax)
      (570) 460-0778 (Mobile)       The Nature Conservancy
        in Pennsylvania

      Community Arts Center
      220 West Fourth Street, 3rd Floor
      Williamsport, PA  17701


More information about the R-help mailing list