Learn R Programming

multiplex (version 2.3)

semigroup: Constructing the Semigroup of Relations

Description

Function to create the complete semigroup of multiple relations, where the multiplication table can be specified with either a numerical or a symbolic form.

Usage

semigroup(x, type = c("numerical", "symbolic"), labels = NULL, cmp = FALSE, smpl = FALSE )

Arguments

x
an array; usually with three dimensions of stacked matrices where the multiple relations are placed.
type
does the semigroup should be given in a numerical (default) or in a symbolic form?
labels
(optional) a list of the labels of each distinct relation.
cmp
(optional) a logical to indicate whether the composite matrices should be also given.
smpl
(logical) whether to simplify or not the strings of relations.

Value

An object of `Semigroup' class. The items included are:If the specified type is `numerical', then a matrix of semigroup values is given, otherwise the values is returned as a data frame with the strings of the semigroup.

Warning

For medium size or bigger sets (having e.g. more the 4 relation types), the semigroup construction could take a long time.

Details

A multiple relation can be defined by square matrices of 0's and 1's indicating the presence and absence of ties among a set of actors. If there is more than one relation type, the matrices must preserve the label ordering of its elements and stacked into an object array in order to be effectively applied to this function.

The semigroup, which is an algebraic structure having a set with an associative operation on it, is calculated considering binary matrices only. This means that if the provided matrices are valued, the function will dichotomise the input data automatically; values higher or equal to a unit are converted to one, otherwise they are set to zero. If you are not happy with that, you can go to dichot and specify your own cutoff value for the dichotomization.

References

Boorman, S.A. and H.C. White, `Social Structure from Multiple Networks. II. Role Structures.' American Journal of Sociology, 81 (6), 1384-1446. 1976.

Boyd, J.P. Social Semigroups. A unified theory of scaling and blockmodelling as applied to social networks. George Mason University Press. 1991.

Pattison, P.E. Algebraic Models for Social Networks. Cambridge University Press. 1993.

See Also

prev, strings, edgeT, wordT, relabel, dichot, ltlw, cngr.

Examples

Run this code
## Create the data: 2 binary relations among 3 elements
arr <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
       c(3,3,2))>.5, 1 ) )

## optional: put labels
dimnames(arr)[[3]] <- list("n", "m")

## look at the semigroup
semigroup(arr)

Run the code above in your browser using DataLab