generateData_rewire | R Documentation |
Function first generates K
scale-free graphs with p
vertices. They have the same order and degree distribution and share most of the edges, but some edges may vary (user can control how many).
Function then generates corresponding precision and covariance matrices, all of the size p
by p
(see the paper for the details of the procedure).
Then for each l
-th element of vector n
it generates K
data matrices, each of the size n_l
by p
,
i.e., for the same underlying graphs we can generate several sets of K
datasets with different sample sizes.
generateData_rewire(
K,
p,
n,
power = 1,
m = 1,
perc = 0.05,
int = NULL,
ncores = NULL,
makePlot = TRUE,
verbose = TRUE
)
K |
number of graphs/data matrices. |
p |
number of nodes in the true graphs. |
n |
a numerical vector of the sample sizes for each desired set of
|
power |
a number, power of preferential attachment for the Barabasi-Albert algorithm for the generation of the scale-free graph. Bigger number means more connected hubs. The default value is 1. |
m |
number of edges to add at each step of Barabasi-Albert algorithm for generation of the scale-free graph. The default value is 1. |
perc |
a number, tuning parameter for the difference between graphs.
Number of trials to perform in the rewiring procedure of the first graph is
|
int |
a vector of two numbers, |
ncores |
number of cores to use in parallel data generation.
If |
makePlot |
If makePlot = FALSE, plotting of the generated graphs is disabled. The default value is TRUE. |
verbose |
If verbose = FALSE, tracing information printing is disabled. The default value is TRUE. |
The following list is returned
Graphs
– a list of adjacency matrices of the K
generated graphs.
CommomGraph
- a matrix, common part (intersection) of the K
generated graphs.
Data
- a list of lists, for each sample size of the input vector n
one obtains K
data matrices, each of the size n_l
by p
.
Sigma
- a list of K
covariance matrices of the size p
by p
.
data <- generateData_rewire(K = 3, p = 50, n = 20, ncores = 1, verbose = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.