Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/sienaRIDynamics.r
The function sienaRIDynamics
returns the relative importance of
effects in a SAOM according to the measure of relative importance described
in Indlekofer and Brandes (2013).
More precisely, it returns aggregates of relative importances over
simulated micro-steps between observation moments as described in Section
3.2 of this paper.
The measure is based on the influence of effects on simulated
micro-steps and takes the complete model specification into account.
Therefore, required arguments are the analysed data given as a
siena
data object (necessary for the micro-steps simulations)
as well as the complete model specification represented either by an
estimated sienaFit
object or by the triple consisting of a
suitable parameter vector theta
and the corresponding
sienaAlgorithm
and sienaEffects
objects.
1 2 3 4 5 6 |
data |
|
ans |
|
theta |
Vector of parameter values of effects included in the model.
Length of |
algorithm |
|
effects |
|
depvar |
If the model contains more than one dependent variable,
it has to be specified for which dependent variable the relative importances
of associated effects should be determined.
Only those simulated micro-steps that refer to the selected dependent
variable are considered in the aggregated values of relative importance
of the corresponding effects.
If |
intervalsPerPeriod |
For analyzing the dynamics of relative
importances between observation moments, the time interval between
observation moments is divided into |
x |
|
staticRI |
|
col |
Colors used in the plot. If |
ylim |
A vector of two numbers specifying the maximum and minimum
value of the y-range visible in the plot. If |
width |
Width of the plot. If |
height |
Height of the plot. If |
legend |
Boolean: if |
legendColumns |
Number of columns in legend. If
|
legendHeight |
Height of legend. If |
cex.legend |
Specifies the relative font size of legend labels. |
... |
Other arguments. |
Currently there still is an error in this function.
sienaRIDynamics
takes the data as well as the complete model
specification into account.
Therefore, necessary arguments are the analyzed data given as a
siena
data object as well as the complete model specification
represented either by an estimated sienaFit
object or by the
triple consisting of a suitable parameter vector theta
and the corresponding sienaAlgorithm
and sienaEffects
objects.
Note that sienaRIDynamics
works only with Method of Moments
(i.e., for sienaAlgorithm
objects with maxlike = FALSE
).
If ans
is a valid sienaFit
object that resulted from a
call to siena07
with unconditional estimation (i.e.,
for sienaAlgorithm
objects with cond = FALSE
),
the calculations of relative importances are based on ans$theta
,
ans$x
, and ans$effects
.
(Note that if the estimation of ans
has been conditional on a
dependent variable, it is necessary to give the associated
sienaEffects
object explicitly to sienaRIDynamics
).
Alternatively, the necessary information can be given directly as a
suitable parameter vector theta
(containing necessary rate
and evaluation parameters), a sienaAlgorithm
object, and a
sienaEffects
object. In this case, ans
has to be
unspecified, i.e., ans=NULL
.
sienaRIDynamics
returns an object of class sienaRIDynamics
.
A returned sienaRIDynamics
object stores the relative importances
of effects in simulated micro-steps aggregated to intervalsPerPeriod
averages per period. For details, see Section 3.2 of
Indlekofer and Brandes (2013).
A sienaRIDynamics
object consists of following components:
intervalValues
the relative importances of included effects for simulated micro-steps of the considered dependent variable aggregated over subintervals.
dependentVariable
the name of the dependent variable the results refer to.
effectNames
the names of considered effects.
Natalie Indlekofer
Indlekofer, N. and Brandes, U., “Relative Importance of Effects in Stochastic Actor-oriented Models.” Network Science, 1 (3), 2013.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | myalgorithm <- sienaAlgorithmCreate(nsub=2, n3=50, cond=FALSE)
mynet1 <- sienaDependent(array(c(tmp3, tmp4), dim=c(32, 32, 2)))
mydata <- sienaDataCreate(mynet1)
myeff <- getEffects(mydata)
myeff <- includeEffects(myeff, density, recip, transTies, nbrDist2)
ans <- siena07(myalgorithm, data=mydata, effects=myeff, batch=TRUE)
## Not run:
RIDynamics1 <- sienaRIDynamics(mydata, ans=ans)
RIDynamics1
plot(RIDynamics1)
## End(Not run)
## Not run:
myalgorithm2 <- sienaAlgorithmCreate(nsub=2, n3=50, cond=TRUE)
ans2 <- siena07(myalgorithm2, data=mydata, effects=myeff, batch=TRUE)
RIDynamics2 <- sienaRIDynamics(mydata, ans=ans2, effects=myeff)
RIDynamics2
RIDynamics3 <- sienaRIDynamics(data=mydata, theta=c(ans2$rate,ans2$theta),
algorithm=myalgorithm2, effects=myeff, intervalsPerPeriod=4)
RIDynamics3
## End(Not run)
## Not run:
myalgorithm3 <- sienaAlgorithmCreate(nsub=2, n3=50)
mynet2 <- sienaDependent(array(c(s501, s502, s503), dim=c(50, 50, 3)))
mybeh <- sienaDependent(s50a, type="behavior")
mydata2 <- sienaDataCreate(mynet2, mybeh)
myeff2 <- getEffects(mydata2)
myeff2 <- includeEffects(myeff2, density, recip, transTies, transTrip, nbrDist2)
ans3 <- siena07(myalgorithm3, data=mydata2, effects=myeff2, batch=TRUE)
RIDynamics4 <- sienaRIDynamics(mydata2, ans=ans3, depvar="mybeh")
RIDynamics4
RIDynamics5 <- sienaRIDynamics(mydata2, ans=ans3, depvar="mynet2")
RIDynamics5
## End(Not run)
## Not run:
RI5 <- sienaRI(mydata2, ans=ans3)
plot(RIDynamics5, staticRI=RI5[[1]])
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.