Learn R Programming

RSiena (version 1.5.0)

selectionTable: Function to construct selection tables for SAOMs

Description

The function selectionTable constructs a selection table which may be helpful for the interpretation of results for network dynamics, for an estimation result represented by a sienaFit object created by siena07.

Usage

selectionTable(x, xd, name, vname,
    as.matrix=FALSE,levls=NULL, levls.alt=levls,
    nfirst=x$nwarm+1, multiplier=1,
    include.endow=FALSE, include.creation=FALSE,
    silent=FALSE)

Value

An object of class selectionTable.

If as.matrix=TRUE, this object is a matrix; if as.matrix=FALSE (the default), it is a data frame, where the rows are all combinations of levls and levls.alt, and the columns:

ego

ego's values as a factor;

vego

the values levls

valter

the values levls.alt

select

the value of the selection table.

Arguments

x

An object of class sienaFit, produced by a call to siena07 for a model including a behavioral dependent variable; or an object of class sienaMeta, produced by a call to siena08; or an object of class sienaBayesFit, produced by a call to sienaBayes.

xd

If x is of class sienaFit, a siena data set used to produce x.
If x is of class sienaMeta or sienaBayesFit, one of the data sets used to produce x; preferable a representative one.

name

character string: name of network dependent variable.

vname

character string: name of actor covariate (should be centered!).

as.matrix

boolean: will the table be returned as a matrix.

levls

levels for ego.

levls.alt

levels for alter.

nfirst

If of class sienaBayesFit: first run in posterior sample used for constructing the table.

multiplier

multiplier for the range of the actor covariate.

include.endow

boolean, used only for models utilizing selection and endowment effects: by specifying include.endow=TRUE, the sum of evaluation and endowment effects is used.

include.creation

boolean, used only for models utilizing selection and creation effects: by specifying include.creation=TRUE, the sum of evaluation and creation effects is used.

silent

boolean; if FALSE, some information is reproduced at the console.

Author

Tom Snijders

Details

This functions is used for constructing selection tables for the interpretation of results for network dynamics obtained with the RSiena or multiSiena packages.

In matrix form, each row corresponds to ego's value of the covariate, and each column to alter's value. The table entries are the joint contributions of covariate effects to the objective function, for this covariate and for the combinations of ego and alter values. Effects currently implemented are "altX", "altSqX", "egoX", "egoSqX", "egoXaltX", "simX", "diffX", "diffSqX", "higher", "sameX", "egoDiffX", and "egoPlusAltX".

If levls is NULL (the default), the levels of ego's behavior are taken as the integer range of the dependent actor variable. In most applications levls.alt will be the same as levls, in which case it does not have to be specified.

The multiplier is used in case the variable vname has a different natural scale, and the values for ego and alter as reported should be multiplied. The values given for levls and levls.alt are before this multiplication, i.e., they are the values as in the data set.

The data set xd is only used to get the means and similarity means which are subtracted somewhere in the effects.

This function has its own print method.

References

https://www.stats.ox.ac.uk/~snijders/siena/
See the manual, Sections 13.2 and 13.4.

See Also

siena07, siena08

Examples

Run this code
mynet <- sienaDependent(array(c(s501, s502), dim=c(50, 50, 2)))
mycov  <- coCovar(s50a[,1])
mydata <- sienaDataCreate(mynet, mycov)
myeff <- getEffects(mydata)
myeff <- includeEffects(myeff, simX, interaction1="mycov")
myalgorithm <- sienaAlgorithmCreate(nsub=2, n3=100, seed=1291)
# nsub=2, n3=100 is used here for having a brief computation, not for practice.
ans <- siena07(myalgorithm, data=mydata, effects=myeff, silent=TRUE, batch=TRUE)
selectionTable(ans, mydata, "mynet", "mycov")

Run the code above in your browser using DataLab