diagonals in a network
A typical example in which diagonals
can be helpful is Social Network
Analysis. For example, if we use matrices to represent friendship
perceptions between individuals, then we need a dyadic matrix.
Let says that we want to look at second-order connections (i.e. friends
of friends). If we now want to represent the data from both time period
in a single object, we need a 4-dimensional array. Higher-order arrays
are hard to visualise, another way of doing this is by representing two
dimensions along each of the two edges of a matrix. We can do this using
the Knonecker Product (denoted ⊗), which we can call in R
using
the alias %x%
.
Feelings of friendship towards oneself aren’t always particularly
insightful. We can now use the diagonals
library to eliminate those.
The diagonals package now available on CRAN and can therefore be install directly from inside R
using:
Subsequently the package can be loaded using:
The above demonstration is also available as a vignette that is included in the package.
It can be accessed from R
using:
A general introduction to diagonals
is available in next weeks post: diagonals. This post is also available as a vignette that is included in the package
For more information on the package and its development please see yesterday’s post diagonals on CRAN.