Learn R Programming

RSiena (version 1.1-232)

sienaCompositionChange: 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. If the entire data set contains more than one node set, then the node sets must be specified in all data objects.

option

Integer controlling the processing of the tie variables 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.

Value

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

NodeSet

Name of node set

Option

Option

Details

Intervals are treated as closed at each end. For data sets including a composition change object, estimation by Method of Moments is forced to be unconditional, overriding the specification in the sienaAlgorithm object.

References

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

See Also

sienaNodeSet

Examples

Run this code
# NOT RUN {
  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")
  
# }

Run the code above in your browser using DataLab