[R-sig-eco] Cluster coefficients

Chris McOwen Chris.McOwen at unep-wcmc.org
Mon Oct 22 14:00:23 CEST 2012


Dear List,

I am looking to cluster data, with the data being coefficients from a regression (subsets)

The "NA" represent variables that were not present in the most likely model ( based on AIC), and the value the magnitude and direction of the relationship.

I would like to cluster the data so that observations are grouped according to: the similarity in the direction of the relationship ( i.e. +ve or -ve) and the presence/absence of variables.

I am unsure how to do this, as i don't think my usual approaches ( i.e hclust) don't seem to do this?

Any ideas?

Thanks

Chris

coeffs <-
structure(list(ChlA = c(-0.02436578, NA, NA, NA, NA, NA, NA, 
NA, 0.03602927, NA, NA, NA, 0.16461933, NA, NA, NA, NA, NA, NA, 
-0.14214184, 0.09010449, NA, NA, -0.25981374, 0.05450299, NA, 
-0.3777202, NA, NA, NA, NA, 0.094851, -0.01348093, -0.2623704, 
-0.07597477, 0.01049517, -0.15105286, NA, 0.06347485, 0.0424554, 
0.02042914, 0.01154592, NA, -0.009050139, -0.8025892, 0.022382508, 
-0.04114666, NA), Effort = c(-0.01528351, NA, NA, NA, -0.14650915, 
NA, -0.086915722, 0.46196117, 0.31503442, 0.6955735, 0.004619744, 
NA, 0.13200113, -0.3329337, -0.01589268, 0.26226411, NA, NA, 
NA, NA, 0.33927632, 0.34913992, NA, 0.28399434, -0.01868735, 
0.1521177, -0.29593265, NA, NA, -0.02212162, 0.1327453, 0.1134467, 
-0.10632058, NA, NA, 0.03952418, 0.02501368, NA, -0.14226405, 
NA, -0.05573387, NA, NA, 0.009173017, NA, -0.007658034, 0.06355533, 
NA), Length = c(-0.12397649, -0.1990927, -0.3416899, 0.3789017, 
-0.04141538, NA, -0.05019331, -0.03900047, NA, NA, NA, 0.09063704, 
-0.05901642, -0.2513824, NA, -0.16386284, -0.005989466, -0.3353835, 
-0.14850747, -0.18532863, 0.08020726, -0.01348295, -0.03967718, 
-0.05156794, -0.29177408, -0.2140788, 0.15502771, -0.5998103, 
-0.27371235, 0.28124269, -0.556122, -0.5641859, -0.02509982, 
-0.5163383, -0.01121551, -0.09833893, 0.24457199, -0.29285981, 
0.01754324, 0.5703817, -0.01752201, NA, -0.30086224, -0.409820219, 
0.06540707, -0.075332989, 0.1109691, -0.04784984), TL = c(0.0415428, 
NA, NA, NA, -0.38159535, -0.3520744, -0.004309651, NA, NA, NA, 
NA, -0.22826707, -0.06513589, 0.267311, -0.33893225, 0.02565467, 
-0.009809531, NA, -0.07078014, -0.73948837, 0.19525102, -0.04553349, 
0.19446357, -0.02549957, 0.30417694, 0.2093883, 0.04087627, 0.5440551, 
0.05066191, NA, 0.2049936, 1.057117, -0.24755493, NA, -0.08312852, 
-0.01551364, 0.22184745, 0.15343752, NA, NA, NA, 0.3079413, 0.02976413, 
-0.177998832, NA, -0.13936654, NA, -0.21881099), SST = c(NA, 
NA, 0.1941592, NA, NA, NA, -0.642082765, NA, -0.71091908, NA, 
-0.021628699, NA, NA, 0.1232983, NA, NA, -0.004652469, NA, -0.04232208, 
0.04340174, -1.06425431, 0.34010947, 0.05472887, NA, NA, NA, 
0.26350658, NA, 0.01467305, NA, 0.2191084, -2.5002445, -0.12388647, 
NA, 0.3543805, 2.27831939, 0.13500845, NA, 0.01565693, NA, 1.79379954, 
-0.07284253, NA, NA, NA, NA, NA, NA)), .Names = c("ChlA", "Effort", 
"Length", "TL", "SST"), class = "data.frame", row.names = c(NA, 
-48L))

Chris Mcowen
Postdoctoral Scientist, Nippon Foundation Nereus Senior Fellow
Marine Assessment and Decision Support Programme

UNEP World Conservation Monitoring Centre
219 Huntingdon Road
Cambridge CB3 0DL
United Kingdom
Switchboard: +44 (0)1223 277 314
Fax: +44 (0)1223 277 136

www.unep-wcmc.org



More information about the R-sig-ecology mailing list