Hi, I have a erdos-renyi game with 6000 nodes and probability 0.003. g1 = erdos.renyi.game(6000, 0.003) How to create a Watts Strogatz game with the same probability. g1 = watts.strogatz.game(1, 6000, ?, ?) What should be the third and fourth parameter to this argument. -- View this message in context: http://r.789695.n4.nabble.com/Watts-Strogatz-game-tp3491922p3491922.html Sent from the R help mailing list archive at Nabble.com.
Hi, I have no familiarity with these functions --- I see that they are not in base R --- so I suggest that at very least you identify the package that you are using. Better would be to contact the package maintainer directly. Sometimes maintainers do not read R-help. Cheers Andrew On Tue, May 03, 2011 at 12:42:55AM -0700, kparamas wrote:> Hi, > > I have a erdos-renyi game with 6000 nodes and probability 0.003. > > g1 = erdos.renyi.game(6000, 0.003) > > How to create a Watts Strogatz game with the same probability. > > g1 = watts.strogatz.game(1, 6000, ?, ?) > What should be the third and fourth parameter to this argument. > > > -- > View this message in context: http://r.789695.n4.nabble.com/Watts-Strogatz-game-tp3491922p3491922.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Andrew Robinson Program Manager, ACERA Department of Mathematics and Statistics Tel: +61-3-8344-6410 University of Melbourne, VIC 3010 Australia (prefer email) http://www.ms.unimelb.edu.au/~andrewpr Fax: +61-3-8344-4599 http://www.acera.unimelb.edu.au/ Forest Analytics with R (Springer, 2011) http://www.ms.unimelb.edu.au/FAwR/ Introduction to Scientific Programming and Simulation using R (CRC, 2009): http://www.ms.unimelb.edu.au/spuRs/
>> I have a erdos-renyi game with 6000 nodes and probability 0.003. >> >> g1 = erdos.renyi.game(6000, 0.003) >> >> How to create a Watts Strogatz game with the same probability. >> >> g1 = watts.strogatz.game(1, 6000, ?, ?) >> What should be the third and fourth parameter to this argument.According to ?watts.strogatz.game help file (in the igraph package?), the four arguments to this function are: dim Integer constant, the dimension of the starting lattice. size Integer constant, the size of the lattice along each dimension. nei Integer constant, the neighborhood within which the vertices of the lattice will be connected. p Real constant between zero and one, the rewiring probability. So it looks like the last two should be neighborhood and rewiring probability respectively.
On Wed, May 4, 2011 at 9:28 AM, Robert Baer <rbaer at atsu.edu> wrote:>>> I have a erdos-renyi game with 6000 nodes and probability 0.003. >>> >>> g1 = erdos.renyi.game(6000, 0.003) >>> >>> How to create a Watts Strogatz game with the same probability. >>> >>> g1 = watts.strogatz.game(1, 6000, ?, ?) >>> What should be the third and fourth parameter to this argument.You can work out the number of edges in a Watts-Strogatz game easily, by calculating the degree of the nodes in the non-randomized network. This will be different for different dimensions, of course. Randomization does not change the average degree. Obviously, you cannot exactly match all Erdos-Renyi graphs, because the W-S density cannot change continuously. Gabor> According to ?watts.strogatz.game help file (in the igraph package?), the > four arguments to this function are: > dim ? ? Integer constant, the dimension of the starting lattice. > size ? ? Integer constant, the size of the lattice along each dimension. > nei ? ? Integer constant, the neighborhood within which the vertices of the > lattice will be connected. > p ? ? ? ? Real constant between zero and one, the rewiring probability. > > So it looks like the last two should be neighborhood and rewiring > probability respectively. > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Gabor Csardi <csardi at rmki.kfki.hu>? ?? MTA KFKI RMKI