RSiena scripts



This page presents a number of RSiena scripts. They use data sets that can be downloaded from the Data sets page.

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 (recognizable from the data) - 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 specification.



Scripts

    The (long) introductory script also contained in Section 2.4 of the RSiena users' manual is contained here in five smaller pieces.

  1. Rscript01DataFormat.R with some basic information about R, networks, data formats etc;
    with an example data file arclistdata.dat.
  2. RSienaSNADescriptives.R with some descriptives, using package sna.
  3. Rscript02SienaVariableFormat.R for how to specify data as variables in RSiena, and specify the model; using the s50 data set.
  4. Rscript03SienaRunModel.R for how to carry out the estimation and look at the results;
  5. Rscript04SienaBehaviour.R for how to specify models for dynamics of networks and behaviour;
  6. In addition there are some other scripts.

  7. RscriptSienaMultiple.R for how to specify models for dynamics of multiple networks;
    this uses a manufactured data set (longitudinal, 2 waves, 2 networks);
  8. vdB_tt.R an example of testing time heterogeneity, using the van de Bunt students data set.
  9. RscriptSienaGof.R for how to check goodness of fit.
  10. RscriptMultipleGroups.R an example of the multiple group option and of meta-analysis using function siena08, using Chris Baerveldt's Dutch Social Behavior data set.
  11. RscriptSienaOrdered.R an example of modeling a network with ordered ties, by representing them as multiple, ordered networks, using the van de Bunt students data set.
  12. RscriptSienaBipartite.R an example of co-evolution of a one-mode and a two-mode network, using a set with substance use variables of the Glasgow Teenage Friends and Lifestyle Study data.
  13. RscriptSienaSymmetric.R a brief example of modeling a non-directed network, using the s50 data set.
  14. Composition change in a network: R script and data for illustration, also see the slides.


Back to the main Siena page