MinWithinProba {fake} | R Documentation |
Within-group probabilities for communities
Description
Computes the smallest within-group probabilities that can be used to simulate a graph where communities can be expected for given probabilities of between-group probabilities and group sizes.
Usage
MinWithinProba(pk, nu_between = 0, nu_mat = NULL)
Arguments
pk |
vector of the number of variables per group in the simulated
dataset. The number of nodes in the simulated graph is |
nu_between |
probability of having an edge between two nodes belonging
to different groups, as defined in |
nu_mat |
matrix of probabilities of having an edge between nodes
belonging to a given pair of node groups defined in |
Details
The vector of within-group probabilities is the smallest one that
can be used to generate an expected total within degree
strictly higher than the expected total between degree
for all
communities
(see
ExpectedCommunities
). Namely, using
the suggested within-group probabilities would give expected .
Value
A vector of within-group probabilities.
See Also
ExpectedCommunities
, SimulateAdjacency
,
SimulateGraphical
Examples
# Simulation parameters
pk <- rep(20, 4)
nu_between <- 0.1
# Estimating smallest nu_within
nu_within <- MinWithinProba(pk = pk, nu_between = nu_between)
# Expected metrics
ExpectedCommunities(
pk = pk,
nu_within = max(nu_within),
nu_between = nu_between
)