[Rsiena-help] [rsiena-help][4986] Creating SienaDependent from Edgelist
Tom Snijders
tom.snijders at nuffield.ox.ac.uk
Wed May 17 20:02:51 CEST 2017
Dear Gerrit,
I am out of touch until May 30 and have no time to check this. This type of question is more appropriate for the yahoo list (see Siena website).
Best regards,
Tom
================================================================
Tom A.B. Snijders
Professor of Statistics and Methodology
Dept. of Sociology, University of Groningen
Emeritus Fellow, Nuffield College, University of Oxford
Associate Member, Dept. of Statistics, University of Oxford
http://www.stats.ox.ac.uk/~snijders/
-----Original Message-----
From: noreply at r-forge.r-project.org [mailto:noreply at r-forge.r-project.org]
Sent: 17 May 2017 13:53
To: noreply at r-forge.r-project.org
Subject: [rsiena-help][4986] Creating SienaDependent from Edgelist
Read to this message and approve/reject it at:
https://r-forge.r-project.org/forum/admin/pending.php?action=view_pending&group_id=461&forum_id=1525
By: Gerrit Jochims
Hello erveryone,
Following the R manual, I’m trying to create a SienaDependent network variable from an Edgelist (n = 2867 actors, M = 6 observation moments, resulting in 16.116 interactions between egos and alters) by using the script:
Edgeliste=read.table("SeinaDependent_Edgeliste.dat", header=FALSE)
names(Edgeliste)=c("focal", "co", "value",
"year")
Edgeliste1= by(Edgeliste, Edgeliste [, 4], function (x)
spMatrix(2867, 2867, x[, 1], x[, 2], x[, 3]))
AVnet1=sienaDependent(Edgeliste1)
The .dat file “SeinaDependent_Edgeliste” is organized as a matrix including
4 columns “ego”, “alter”, “value” and “wave”, example:
1 2256 1 2005
2 137 1 2006
2 228 1 2005
2 306 1 2006
… … … …
Dimensions of the Edgelist are 16.116 rows x 4 columns (16.116 interaction from 12.654 ego-alter-relationships x 4 “ego”, “alter”, “value”
and “wave”)
But as I run the mentioned script, the following “error” pops up:
Error in sienaDependent(Edgeliste1) :
entries in networks must be 0, 1, 10 or 11
For me, this seems curious, because the edgelist contains just ones in the column “values”.
By playing around with the data (try and error), I exchanged the ones by zeros “0”. And then it works. But zeros don’t make sense to me, because a “zero”
means “no interaction between ego 1 and alter 2256”.
Changed data (see below) leads to successful SienaDependent creation
1 2256 0 2005
2 137 0 2006
2 228 0 2005
2 306 0 2006
… … … …
I’ll be grateful for every comment!
Gerrit
______________________________________________________________________
You are receiving this email because the forum you administrate has a new moderated message awaiting your approval.
More information about the Rsiena-help
mailing list