A baseline distribution of motif counts from a specified number of networks using a specified baseline model is computed. Options for the baseline model are - Erd<U+0151>s<U+2013>R<U+00E9>nyi - Actor's choice - Fixed density - Providing an ERGM fit for the whole network - Providing a partial ERGM fit (for only one level)
simulate_baseline(
net,
motifs,
n = 10,
lvl_attr = "sesType",
assume_sparse = TRUE,
model = "erdos_renyi",
level = -1,
ergm_model = NULL,
directed = NULL
)network object
list of motif identifier strings
number of random graphs
character string specifying the attribute name where level
information is stored in net.
whether the random graphs shall be assumed to be sparse. used to find ideal counting function. defaults to TRUE.
baseline model to be used. Options are 'erdos_renyi',
'fixed_densities', 'actors_choice', 'ergm' and 'partial_ergm'. See
vignette("random_baselines") for more details. Defaults to
'erdos_renyi'.
lvl_attr of the variable level for the Actor's Choice model and for partial ERGM
ergm model as for example fitted by calling
ergm::ergm(). Used when model is set to 'ergm' or 'partial_ergm' to
sample random networks.
whether the graph shall be treated as a directed graph. Per
default (NULL), this is determined automatically using the structure
of the provided network object
data frame with one column for each motif identifier string and one row for every computed random graph
Note that when using the Actor's Choice model this function does not choose
the variable level automatically. Use the level parameter to provide a
valid level.
When using (partial) ERGM the parameter net is not used. Random
networks are sampled in R using the ergm_model parameter.
# NOT RUN {
simulate_baseline(ml_net, list("1,2[I.C]"), n = 10, directed = FALSE)
# }
Run the code above in your browser using DataLab