Description Usage Arguments Value References Examples
View source: R/gmodel.preset.R
gmodel.preset
generates one of pre-specified graphons
of size (n \times n). Users can select one of 10 different graphons by
their id
, an integer from 1 to 10. The table of available graphons
follows that of the reference article given below.
1 | gmodel.preset(n, id = 1, sort = TRUE)
|
n |
the number of nodes for a graphon to be generated. |
id |
an integer from 1 to 10, each corresponding to a specific graphon model. |
sort |
a logical value; TRUE to sort in an decreasing order of degree, FALSE otherwise. |
an (n\times n) graphon matrix.
chan2014graphon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
## Generate 3 random graphons of nodal size 100.
n = 100
r3 = (sample(1:10,3))
W1 = gmodel.preset(n,id=r3[1])
W2 = gmodel.preset(n,id=r3[2])
W3 = gmodel.preset(n,id=r3[3])
## Generate corresponding observations and plot them
A1 = gmodel.P(W1)
A2 = gmodel.P(W2)
A3 = gmodel.P(W3)
\dontshow{
for (i in 1:10){
W = gmodel.preset(100,id=i)
}
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.