Reads in a Siena session from file or siena01Gui()
and creates a Siena data or group object.
sienaDataCreateFromSession(filename = NULL, session = NULL,
modelName = "Siena", edited = NULL, files = NULL,
getDocumentation=FALSE)
Input session file
Input session (from siena01Gui
)
Character string of project name
Boolean, indicates whether a file has been edited and
therefore should not be re-read. Used internally by
siena01Gui
.
List of data files, used internally by siena01Gui
Flag to allow documentation of internal functions, not for use by users.
A list with the following components:
Boolean, TRUE indicating success
A Siena data or group object, of class siena
or
sienaGroup
Effects object associated with mydata
Allows creation of data objects of class "Siena" direct from data
files rather than from the various Siena network and covariate
objects. Is always called by siena01Gui
but can also be used
directly.
The columns of the gui screen should have the format described below. If a session file is used for input, it should have columns with exactly the same names and in exactly the same order as those below with a row of column headings and no row numbers.
Used to identify the groups when using the multi-group option described in the Manual. Must not contain embedded blanks, and should be identical for all rows which relate to the same group.
Network files or dyadic covariates should use the same name for each file of the set. Other files should have unique names, a list of space separated ones for constant covariates.
in siena01Gui
, usually entered by using a
file selection box, after clicking Add
.
Only relevant for networks or dyadic covariates. Can be matrix, a single Pajek network (.net) or a Siena network file (and edgelist with three or four columns: from, to, value, wave (optional)). Not tested for dyadic covariates yet!
Only relevant for networks and dyadic covariates. All other files cover all the relevant periods. Indicates the order of the network and dyadic covariate files. Should range from 1 to n within each group. Enter multiple integers with spaces between for Siena network multi-wave files. Use the value 1 or blank for other files which cover multiple periods.
If you have more than one set of nodes, use this column to indicate which is relevant to each file. Should not contain embedded blanks.
Indicate here what type of data the file contains. Options are "network", "behavior", "constant covariate", "changing covariate", "constant dyadic covariate", "changing dyadic covariate", "exogenous event".
Yes or No. Only files with Yes will be included in the model.
Enter any values which indicate missingness, with spaces between different entries.
Enter any values which indicate ties, with spaces between different entries.
For Siena network files, enter the number of actors here.
If using a file for input, it should be of one of the following types:
Extension | Type |
.csv |
Comma separated |
.dat or .prn |
Space delimited |
Network and covariate files should be text files with a row for each node. The numbers should be separated by spaces or tabs. Exogenous events should be specified by a file with a row for each node. Each row should be consist of a set of pairs of numbers which indicate the periods during which the corresponding actor was present. e.g.
1 3 1.5 3 1 1.4 2.3 3 2.4 3
would describe a network with 4 nodes, and 3 observations. Actor 1 is present all the time, actor 2 joins at time 1.5, actor 3 leaves and time 1.4 then rejoins at time 2.3, actor 4 joins at time 2.4. All intervals are treated as closed.
# NOT RUN {
tmp <- sienaDataCreateFromSession("sienaFreshman.csv")
mydata <- tmp$mydata
myeff <- tmp$myeff
# }
Run the code above in your browser using DataLab