sienaCompositionChange {RSiena}R Documentation

Functions to create a Siena composition change object

Description

Used to create a list of events describing the changes over time of a Siena actor set

Usage

sienaCompositionChange(changelist, nodeSet = "Actors", option = 1)
sienaCompositionChangeFromFile(filename, nodeSet = "Actors",
    fileobj=NULL, option = 1)

Arguments

changelist A list with an entry for each actor in the node set. Each entry a vector of numbers (may be as characters) indicating intervals during which the corresponding actor was present.
filename Name of file containing change information. One line per actor, each line a series of space delimited numbers indicating intervals.
fileobj The result of readLines on filename.
nodeSet Character string containing the name of a Siena node set.
option Integer controlling the processing of the network entries for the actors not currently present. Values (default is 1)
1 0 before entry, final value carried forward after leaving
2 0 before entry, missing after (final value carried forward, but treated as missing)
3 missing whenever not in the network. Previous values will be used where available, but
always treated as missing values.
4 Convert to structural zeros (not available at present).

Details

Intervals are treated as closed at each end.

Value

An object of class "compositionChange", a list of numeric vectors, with attributes:

NodeSet Name of node set
Option Option

Author(s)

Ruth Ripley

References

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

See Also

sienaNodeSet

Examples

clist <- list(c(1, 3), c(1.4, 2.5))
#or
clist <- list(c('1', '3'), c('1.4', '2.5'))

compChange <- sienaCompositionChange(clist)

## Not run: 
filedata <- c("1 3", "1.4 2.5")
write.table(filedata, "cc.dat",row.names=FALSE, col.names=FALSE,
    quote=FALSE)
## file will be
## 1 3
## 1.4 2.5
compChange <- sienaCompositionChangeFromFile("cc.dat")
## End(Not run)

[Package RSiena version 1.0.5 Index]