View source: R/selectionTables.r
selectionTable | R Documentation |
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
.
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)
x |
An object of class |
xd |
If |
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 |
multiplier |
multiplier for the range of the actor covariate. |
include.endow |
boolean, used only for models utilizing selection and
endowment effects: by specifying |
include.creation |
boolean, used only for models utilizing selection and
creation effects: by specifying |
silent |
boolean; if |
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.
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 |
valter |
the values |
select |
the value of the selection table. |
Tom Snijders
https://www.stats.ox.ac.uk/~snijders/siena/
See the manual, Sections 13.2 and 13.4.
siena07
, siena08
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.