[R] closeness of codes

Henri-Paul Indiogine hindiogine at gmail.com
Mon Sep 19 08:46:07 CEST 2011


I am using the R library RQDA to assign certain codes to paragraphs of
documents in a collection.   Several paragraphs are assigned more than
1 code.  E.g. often the codes "poverty" and "education" will be
assigned to the same paragraph.   Often also "math" and "career" will
be given to the same paragraphs.  Other codes are never given to the
same paragraphs.

I would like to calculate the relationship or "closeness" of certain
codes.  RQDA will generate a cross-codes table.  It has the form of an
upper triangular matrix where the upper triangle has the number of
cross occurrences of 2 codes at their intersection.  The lower
triangle is filled with NA.  The diagonal simply has the number of
occurrences of the codes by themselves.

The row names are the names of the codes and the column names are the
IDs of the codes.  E.g.

           1     2     3    4
code1  3     0      2    1
code2  NA  4     1     0
code3  NA NA   2     0
code4  NA NA  NA   3

We can see that code1 is associated 2 out of 3 times with code3.
Code2 is present 1 out of 4 times with code3.  Code2 is never assigned
to the same paragraph as Code1 and Code4 are, and so on.

I am trying to understand how to create some sort of graph or diagram
to represent this.  Should I use a cluster diagram or a network graph?
 Also, what sort of R code could I use?

Thanks for your feedback.

Henri-Paul Indiogine

Curriculum & Instruction
Texas A&M University
TutorFind Learning Centre

Email: hindiogine at gmail.com
Skype: hindiogine
Website: http://people.cehd.tamu.edu/~sindiogine

More information about the R-help mailing list