sienaNodeSet: Function to create a node set

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/sienautils.r

Description

Creates a Siena node set which can be used as the nodes in a siena network.

Usage

1
sienaNodeSet(n, nodeSetName="Actors", names=NULL)

Arguments

n

integer, size of set.

nodeSetName

character string naming the node set.

names

optional character string vector of length n of the names of the nodes.

Details

This function is important for data sets having more than one node set, but not otherwise.

Value

Returns a Siena node set, an integer vector, possibly with names, plus the attributes, class equal to "sienaNodeSet", and nodeSetName equal to the argument nodeSetName.

Author(s)

Ruth Ripley

References

See http://www.stats.ox.ac.uk/~snijders/siena/

See Also

sienaDependent, sienaDataCreate

Examples

1
2
3
4
5
6
7
8
senders <- sienaNodeSet(50, nodeSetName="senders")
receivers <- sienaNodeSet(30, nodeSetName="receivers")
senders.attribute <- coCovar(rep(1:10, each=5), nodeSet="senders")
receivers.attribute <- coCovar(rep(1:5, each=6), nodeSet="receivers")
mynet <- sienaDependent(array(c(s501[,1:30], s502[,1:30]), dim=c(50, 30, 2)),
      nodeSet=c("senders", "receivers"))
(mydata <- sienaDataCreate(mynet, senders.attribute, receivers.attribute,
      nodeSets=list(senders, receivers)))

RSiena documentation built on Sept. 24, 2020, 3 p.m.