Learn R Programming

latentnet (version 2.0)

sociomatrix: Return the sociomatrix corresponding to a network object

Description

Return the sociomatrix corresponding to a network object as a matrix. See ergmm for more information.

Usage

sociomatrix(object, matrix.type="adjacency", attrname = NULL)

Arguments

object
a network object. See documentation for the network package.
matrix.type
one of "adjacency", "edgelist", "incidence"
attrname
an optional network attribute to return as an edge weight instead of the binary value.

Value

  • sociomatrix returns a matrix of zeros and one (or the attribute value) indicating the presence of a tie from i to j.

See Also

ergmm, network

Examples

Run this code
#
data(sampson)
#
# test the sociomatrix function
#
sociomatrix(samplike)

Run the code above in your browser using DataLab