Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sienaDataCreate

Function to create a Siena data object


Description

Creates a Siena data object from input dependent variables (networks and possibly behavioural variables), covariates, and composition change objects.

Usage

sienaDataCreate(..., nodeSets=NULL, getDocumentation=FALSE)

Arguments

...

objects of class sienaDependent, coCovar, varCovar, coDyadCovar, varDyadCovar, and/or sienaCompositionChange. There should be at least one sienaDependent object.

nodeSets

list of Siena node sets. Default is the single node set named "Actors", length equal to the number of rows in the first object of class "sienaDependent". If the entire data set contains more than one node set, then the node sets must have been specified in the creation of all data objects mentioned in ....

getDocumentation

Flag to allow documentation of internal functions, not for use by users.

Details

The function checks that the objects fit, that there is at least one network, and adds various attributes to each dependent variable describing the data. If there is more than one nodeSet they must all be specified. Function print01Report will give a basic description of the data object and is a check useful, e.g., for diagnosing problems.

Value

An object of class "siena" which is designed to be used in a siena model fit. The components of the object are.

nodeSets

List of node sets involved

observations

Integer indicating number of waves of data

depvars

List of networks and behavior variables

cCovars

List of constant covariates

vCovars

List of changing covariates

dycCovars

List of constant dyadic covariates

dyvCovars

List of changing dyadic covariates

compositionChange

List of composition change objects corresponding to the node sets

Author(s)

Ruth Ripley

References

See Also

Examples

mynet <- sienaDependent(array(c(s501, s502, s503), dim=c(50, 50, 3)))
mybeh <- sienaDependent(s50a, type="behavior")
mydata <- sienaDataCreate(mynet, mybeh)
## And for a two-mode network
mynet1 <- sienaDependent(array(c(s501, s502), dim=c(50, 50, 2)), nodeSet="senders")
senders <- sienaNodeSet(50, nodeSetName="senders")
receivers <- sienaNodeSet(30, nodeSetName="receivers")
mynet2 <- sienaDependent(array(c(s501[,1:30], s502[,1:30]), dim=c(50, 30, 2)),
      nodeSet=c("senders", "receivers"))
(mydata <- sienaDataCreate(mynet1, mynet2, nodeSets=list(senders, receivers)))
## Not run: 
print01Report(mydata, modelname = "mydescription")

## End(Not run)

RSiena

Siena - Simulation Investigation for Empirical Network Analysis

v1.3.0
GPL-2 | GPL-3 | file LICENSE
Authors
Tom A.B. Snijders [cre, aut] (<https://orcid.org/0000-0003-3157-4157>), Ruth Ripley [aut], Christian Steglich [aut, ctb] (<https://orcid.org/0000-0002-9097-0873>), Johan Koskinen [aut, ctb] (<https://orcid.org/0000-0002-6860-325X>), Nynke Niezink [aut, ctb], Viviana Amati [aut, ctb] (<https://orcid.org/0000-0003-1190-1237>), Christoph Stadtfeld [ctb] (<https://orcid.org/0000-0002-2704-2134>), James Hollway [ctb] (IHEID, <https://orcid.org/0000-0002-8361-9647>), Per Block [ctb], Robert Krause [ctb], Charlotte Greenan [ctb], Josh Lospinoso [ctb], Michael Schweinberger [ctb] (<https://orcid.org/0000-0003-3649-5386>), Mark Huisman [ctb], Krists Boitmanis [ctr], Felix Schoenenberger [ctb], Mark Ortmann [ctb], Marion Hoffman [ctb], Robert Hellpap [ctb], Alvaro Uzaheta [ctb]
Initial release
2021-05-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.