knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
SimuNet generate network simulation in the form of scanList
s.
By default, scanList
s are of scanList.type
"theoretical"
: generated edges are drawn from the
posterior distribution obtained from Bayesian inference, nothing more.
Therefore, edge weight distribution will follow an unaltered Beta-binomial distribution inferred
from inputted observed data. See more on the article on network uncertainty!
library(SimuNet) # TODO: insert a demo graph matching simulations with their expected beta-binomial distribution
But SimuNet
has been conceptualized to embed a way to also simulate empirical phenomenon. These
can include:
remove_mostPeripheral()
)?The general approach is based on the concept of experimental designs, that consists in performing multiple "elementary" manipulations:
scanList
can be combined, chained, and tweaked at
will.SimuNet
provides "building blocks" of experimental design (see design_exp()
), and will include
more in the futurescanList
manipulations to suits their specific needs!# TODO: insert a schematic
Once the user knows what sequence of manipulations defines the experimental design, the function
design_exp()
can be used to generate a expDesign
object:
design_exp()
design_exp()
returns an object of class expDesign
, which main argument contain the sequence of
function to apply to a scanList
. design_exp()
internally relies on purrr::compose()
expDesign
object by passing it along other
functions in design_exp()
. design_exp()
accepts any combinations of functions and expDesign
objects!expDesign
objects can be used as arguments in simunet()
and perform_exp()
scanList
, but the
intermediate theoretical scanList
is stored in the attributes list attrs
under the name
theoretical.scanList
.scanList
as an argument as well, and perform the inputted
expDesign
to it. The returned scanList
similarly stores the original in attrs
Users can also input several expDesign
objects in one call of either simunet()
and
perform_exp()
to run several experimental design on a given theoretical scanList
, allowing for
easier comparison:
returned object is then a list of scanList
s, aptly named sLlist
objects.
provided building blocks are written to seamlessly be applied to a scanList
or sLlist
, but
user-defined functions could benefit from using lapply()
(e.g. lapply(scanList,my_fun)
)
# TODO: insert a schematic
Experimental design's philosophy can see inspiration from:
dplyr
(manipulations and building blocks can even be piped!),We believe that with this approach based on experimental design, SimuNet
can be used as a
framework to assess network uncertainty resulting from both the Bayesian framework adopted, as well
as under due to empirical matters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.