Generic question on res.hcpc$desc.ind

183 views
Skip to first unread message

Bernie Kruger

unread,
May 13, 2015, 8:12:12 AM5/13/15
to factomin...@googlegroups.com
Hi,

I am running a FAMD and then a HCPC on the result, stored in res.hcpc. I am interested in getting the below values out of the "by" class

> res.hcpc$desc.ind

$para
Cluster: 1
       25        30        42        88        97 
0.7286901 1.4680486 1.6680311 1.7143005 1.8690026 
------------------------------------------------------------------------------------------------------------------------------------ 
Cluster: 2
       87        24        17        37        22 
0.5039163 0.7346655 0.8302469 0.8302469 0.8447145 
------------------------------------------------------------------------------------------------------------------------------------ 
Cluster: 3
      19       60       92        9       13 
1.425906 1.425906 1.425906 1.483826 1.483826 
------------------------------------------------------------------------------------------------------------------------------------ 
Cluster: 4
      67        5       84       49       54 
1.095410 1.095410 1.136101 1.374796 1.374796 

$dist
Cluster: 1
      39       53       97       88       51 
6.213347 5.387726 5.345137 5.253111 5.221998 
------------------------------------------------------------------------------------------------------------------------------------ 
Cluster: 2
      21       57       12       24       43 
5.688167 5.688167 5.688167 5.213512 5.110376 
------------------------------------------------------------------------------------------------------------------------------------ 
Cluster: 3
       8       86       19       60       92 
6.105403 6.035527 5.823159 5.823159 5.823159 
------------------------------------------------------------------------------------------------------------------------------------ 
Cluster: 4
      65        7       31       70       35 
5.885309 5.885309 5.724629 5.724629 5.573382 

into a usable data.frame e,g.

Measure  Cluster  Record  Value
para         1           25          0.7286901
para         1           30          1.4680486
..
dist           4           65          5.885309

Thanks
Bernie

François Husson

unread,
May 13, 2015, 9:59:20 AM5/13/15
to factomin...@googlegroups.com, bernie...@gmail.com
The object "desc.ind$para" gives the individual(s) the clostest to the centre of gravity of a cluster (and it gives the distance between each individual and the centre of gravity of the cluster).

The object "desc.ind$dist" gives the individuals the farest from the centres of gravity of the other clusters (an individual that couldn't be in the other clusters because very far from the other cluster and in this way it is a specific individual). The distance to the centre of gravity of the closest cluster is given.

Bernie Kruger

unread,
May 14, 2015, 5:30:31 AM5/14/15
to factomin...@googlegroups.com, bernie...@gmail.com
Hi Francois,

Thanks for your explanation of $para and $dist. I am familiar with the terms. If you look at the end of my question, I actually want to export these values in a usable way and I don't know how to do that. It is in a "by" class which as far as I understand is a list of named vectors or similar.

Regards
Bernie
Reply all
Reply to author
Forward
0 new messages