
This page presents a number of RSiena scripts.
They use data sets that can be downloaded from the
Data sets page.
Firefox or Chrome may be better than Internet Explorer
for showing the scripts presented here.
Remarks about errors or improvements may be sent to the
Siena  StOCNET
discussion list at http://groups.yahoo.com/groups/stocnet/.
In case of an error, please do check that you are using the latest
version of RSiena (recognizable from the date,
available from
the RSiena project at RForge)  the error may have
been corrected already.
Error reports should be accompanied by complete data and scripts
which reproduce the error!
However, it should be noted that the functions in these scripts
do not necessarily work for all (perhaps complicated) model specifications.


Scripts
The five introductory scripts mentioned in Section 2.4
of the RSiena users' manual
are contained with a sixth piece.
 basicRSiena.r
An example of a basic sequence of commands for estimating a
model by function siena07() of RSiena.
 Rscript01DataFormat.R
with some basic information about R, networks, data formats etc;
with an example data file arclistdata.dat.

RSienaSNADescriptives.R
with some descriptives, using package sna.

Rscript02SienaVariableFormat.R
for how to specify data as variables in RSiena, and specify the model;
using the s50 data set.

Rscript03SienaRunModel.R
for how to carry out the estimation and look at the results;

Rscript04SienaBehaviour.R
for how to specify models for dynamics of networks and behaviour;
In addition there are some other scripts.

RscriptSienaMultiple.R
for how to specify models for dynamics of multiple networks;
this uses a
manufactured data set
(longitudinal, 2 waves, 2 networks);

RscriptSienaTimeTest.R
an example of testing time heterogeneity, using the
van de Bunt students data set.

RscriptMultipleGroups_meta.R
an example of metaanalysis with the metafor package and siena08,
and of the multiple group option, using
Chris Baerveldt's Dutch Social Behavior
data set.

RscriptMultipleGroups.R
a more limited example of the multiple group option and of metaanalysis
using function siena08, using
Chris Baerveldt's Dutch Social Behavior
data set.

RscriptSienaOrdered.R
an example of modeling a network with ordered ties
(i.e., valued ties with a small set of ordered categories),
by representing them as multiple, ordered networks, using the
van de Bunt students data set.

RscriptSienaBipartite.R
an example of coevolution of a onemode and a twomode network, using
a set with substance use variables of the
Glasgow Teenage Friends and Lifestyle Study data.

Two scripts showing how to analyze a twomode network as a onemode network,
using structural zeros.
This sometimes is useful because it opens up some further possibilities
to use RSiena options. The scripts use
the data set of the
Glasgow Teenage Friends and Lifestyle Study.

RscriptSienaSymmetric.R
a brief example of modeling a nondirected network, using the
s50 data set.
 Composition change in a network:
R script and data for illustration,
also see the slides.
 Simulation of networks with a given model specification:
NetworkSimulation.R.
 Goodness of fit:
An example script for how to use sienaGOF() is in
sienaGOF_new.R.
 Scripts to help making selection tables
(see the corresponding section in the manual):
SelectionTables.r.
 Scripts to help making influence tables
(see the corresponding section in the manual):
InfluenceTables.r.
(Note: the influence table available 616 February, 2018 had an error in the
average similarity effect.)
 Random coefficient multilevel estimation of the Stochastic ActorOriented
Model:
