interpret_size: Functions to assess the relative importance of effects at...

View source: R/sienaRI.r

interpret_sizeR Documentation

Functions to assess the relative importance of effects at observation moments

Description

The function interpret_size computes various effect sizes for Stochastic Actor-oriented Models. As its value it returns the relative importance of effects of a SAOM according to the measure of relative importance described in Section 3.1 of Indlekofer and Brandes (2013). This is based on the influence of effects on potential tie change or behavior change decisions of individual actors at the given observation moments (waves).
Other measures useful for effect sizes are entropy-based effect sizes as in Snijders (2004) and the within-ego standard deviations of change statistics. If getChangeStats=TRUE, the arrays of change statistics are stored in the sienaRI object that is created.

It takes the data as well as the complete model specification into account. Therefore, necessary arguments are the analysed data given as a sienadata data object as well as the complete model specification represented either by an estimated sienaFit object or by the combination of a suitable parameter vector theta and the corresponding sienaEffects object.

Usage

## S3 method for class 'sienaFit'
interpret_size(x, data, getChangeStats=FALSE, ...)
## S3 method for class 'sienaEffects'
interpret_size(x, data, theta, getChangeStats=FALSE, ...)
## S3 method for class 'sienaRI'
print(x, printSigma=FALSE,...)
## S3 method for class 'sienaRI'
plot(x, actors = NULL, col = NULL, addPieChart = FALSE,
              radius = 1, width = NULL, height = NULL, legend = TRUE,
              legendColumns = NULL, legendHeight = NULL,
              cex.legend = NULL, cex.names = NULL,...)

Arguments

x

for interpret_size.sienaFit: a sienaFit object, resulting from a call of siena;
for interpret_size.sienaEffects: a sienaEffects object that was used for calling siena;
for print.sienaRI and plot.sienaRI: a sienaRI object resulting from a call to interpret_size.

data

siena data object representing the analyzed data and resulting from a call to make_data_rsiena.

theta

Vector of parameter values of evaluation effects included in the model. Length of theta has to be equal to the number of included evaluation effects in the effects object x.

getChangeStats

Boolean: If TRUE, an array of change statistics is added to the interpret_size object.

printSigma

Boolean: If TRUE, average within-actor standard deviations of change statistics ('sigma') are included in the print.

actors

vector of integers: set of actors to be included in the plot; if NULL, all actors.

col

Colors used in the plot. If col=NULL a default color scheme is used.

addPieChart

Boolean: If TRUE, pie charts of aggregated relative importances for the complete set of actors will be added to the plot.

radius

Radius of pie charts. Only effective if addPieCharts = TRUE.

width

Width of the plot. If width=NULL a default value is used.

height

Height of the plot. If height=NULL a default value is used.

legend

Boolean: if TRUE a legend is added to the plot. x$effectNames are used as labels.

legendColumns

Number of columns in legend. If legendColumns=NULL a default value is used. Only effective if legend=TRUE.

legendHeight

Height of legend. If legendHeight=NULL a default value is used. Only effective if legend=TRUE.

cex.legend

Specifies the relative font size of legend labels.

cex.names

Specifies the relative font size of bar graph labels.

...

Other arguments.

Details

interpret_size works only for estimation by the Method of Moments using modelType 1 (directed networks) or 2 ('forcing' model for non-directed networks). For dependent behavior variables, behModelType=1 ('standard') is assumed. It does not yet work for endowment or creation effects (i.e., included effects have to be of type eval) or rate, and also not for models with interaction effects. For two-mode (bipartite) networks as dependent variables, it works only if the number of second-mode nodes is less than the number of actors.

If there are any missing tie values in the network data set, they are imputed by initial zeros and Last Observation Carried Forward. Structural zeros and ones are replaced by NA and treated as impossible choices in the probability vectors and ignored in the standard deviations; but the change statistics for these dyads still are given in changeStatistics (if requested).

The averages reported in the components sigmas (average across actors) and meansigmas (average across waves) are obtained by averaging at the variance level and then taking square roots.

Value

If the model contains only one dependent variable, interpret_size returns an object of class sienaRI. Otherwise, it returns a list of objects of class sienaRI, each corresponding to one dependent variable.

A returned sienaRI object stores the expected relative importances of effects of one dependent variable at observation moments as defined in Section 3.1 of Indlekofer and Brandes (2013).

A sienaRI object is a list with the following components. For the components referred to as lists themselves, these are lists corresponding to the observation moments.

- dependentVariable

the name of the corresponding dependent variable.

- effectNames

the names of considered effects.

- RIActors

a list that contains the expected relative importances of effects for each potential actor decision at observation moments. This is equation (3) in Indlekofer and Brandes (2013).

- expectedRI

a list that contains the expected relative importances of effects aggregated over all actors for each network observation. These are the averages of the actor related values in RIActors. This is equation (4) in Indlekofer and Brandes (2013).

- IActors

a list that contains the expected importances of effects for each potential actor decision at observation moments. This is the numerator of equation (3) in Indlekofer and Brandes (2013).

- expectedI

a list that contains the expected importances of effects aggregated over all actors in each observation. More precisely, it contains the averages of the actor related values in IActors.

- absoluteSumActors

a list that contains the sum of the (unstandardized) L1-differences calculated for each potential actor decision at observation moments. This is the denominator of equation (3) in Indlekofer and Brandes (2013).

- RHActors

a list that contains the degree of certainty, also called degree of determination, in the potential ministep taken by an actor at the observation moments; this is R_H(i,x) of formula (6) in Snijders (2004). The mean over actors of these degrees of certainty, given by formula (7) in Snijders (2004), is printed by the print method for interpret_size objects.

- sigma

a list of effects by ego matrices of the values of the within-ego standard deviations of the change statistics.

- sigmas

effects by wave matrices of averages (see above for how this is done; across actors) of sigma. These are printed if printSigma=TRUE.

- meansigmas

average (see above for how this is done) over waves of sigmas.

- changeStatistics

a list of arrays (effects by choices by egos) containing, for each observation wave, the values of the change statistics for making this choice, where for one-mode networks the choice is defined by the alters with alter=ego referring to 'no change', for two-mode networks the choice is defined by the second-mode nodes with the last choice referring to 'no change', and for behavior the choice is defined as going down, staying constant, or going up; this output is produced only if getChangeStats=TRUE.

- toggleProbabilities

an array (egos by choices by waves), where "choices" are as directly above, giving the choice probabilities of ego in a ministep, when the data are as in this wave.

Author(s)

Natalie Indlekofer, Tom Snijders, Daniel Gotthardt

References

Indlekofer, N. and Brandes, U. (2013), Relative Importance of Effects in Stochastic Actor-oriented Models. Network Science, 1, 278–304.

Snijders, T.A.B. (2004), Explained Variation in Dynamic Network Models. Mathematics and Social Sciences, 168, 31–41.

Examples

myalgo <- set_algorithm_saom(nsub=1, n3=50, seed=1293)
mynet1 <- as_dependent_rsiena(array(c(tmp3, tmp4), dim=c(32, 32, 2)))
mydata <- make_data_rsiena(mynet1)
myeff <- make_specification(mydata)
myeff <- set_effect(myeff, list(density, recip, outAct, inPop))
(myeff <- set_effect(myeff, reciAct, parameter=1))
ans <- siena(mydata, effects=myeff, control_algo=myalgo, batch=TRUE)
RI <- interpret_size(ans, mydata)
RI
print(RI, printSigma=TRUE)
# average within-ego standard deviations of change statistics by wave:
RI$sigmas
# sigma averaged over waves:
RI$meansigmas
# to get the change statistics:
RI.cs <- interpret_size(ans, mydata, getChangeStats=TRUE)
# For the network at the first wave:
dim(RI.cs$changeStatistics[[1]])
# E.g., the change statistics for the first actor (note the 0 first column):
RI.cs$changeStatistics[[1]][,1,]
# semi-standardized parameters by wave:
ans$theta * RI$meansigmas
## Not run: 
plot(RI, addPieChart=TRUE)
plot(RI, actors=1:20, addPieChart=TRUE, radius=1.08)

## End(Not run)
# For two dependent variables:
myalgo <- set_algorithm_saom(nsub=1, n3=50, seed=1293)
mynet2 <- as_dependent_rsiena(array(c(s502, s503), dim=c(50, 50, 2)))
mybeh <- as_dependent_rsiena(s50a[,2:3], type="behavior")
mydata2 <- make_data_rsiena(mynet2, mybeh)
myeff2 <- make_specification(mydata2)
myeff2 <- set_effect(myeff2, list(density, recip, transTies))
myeff2 <- set_effect(myeff2, avAlt, depvar="mybeh", covar1="mynet2")
ans2 <- siena(mydata2, effects=myeff2, control_algo=myalgo, batch=TRUE)
# Use only the parameters for the evaluation function:
(theta.eval <- coef(ans2, dropRates=TRUE))
RI <- interpret_size(myeff2, data=mydata2, theta=theta.eval)
RI[[1]]
RI[[2]]
RI[[1]]$sigmas
RI[[2]]$sigmas
## Not run: 
plot(RI[[2]], col = c("red", "green"), legend=FALSE)
plot(RI[[1]], addPieChart = TRUE, legendColumns=2)

## End(Not run)

RSiena documentation built on April 20, 2026, 5:07 p.m.