Function to simulate data based on EGM
Usage
simEGM(
communities,
variables,
loadings,
cross.loadings = 0.01,
correlations,
sample.size,
p.in = 0.95,
p.out = 0.8,
max.iterations = 1000
)
Arguments
- communities
Numeric (length = 1). Number of communities to generate
- variables
Numeric vector (length = 1 or
communities
). Number of variables per community- loadings
Numeric (length = 1). Magnitude of the assigned network loadings. Uses the same magnitude as factors loadings
Uses
runif(n, min = value - 0.025, max = value + 0.025)
for some jitter in the loadings- cross.loadings
Numeric (length = 1). Standard deviation of a normal distribution with a mean of zero (
n, mean = 0, sd = value
). Defaults to0.01
- correlations
Numeric (length = 1). Magnitude of the community correlations
Uses
runif(n, min = value - 0.015, max = value + 0.015)
for some jitter in the correlations- sample.size
Numeric (length = 1). Number of observations to generate
- p.in
Numeric (length = 1). Sets the probability of retaining an edge within communities. Single values are applied to all communities. Defaults to
0.95
- p.out
Numeric (length = 1 or
communities
). Sets the probability of retaining an edge between communities. Single values are applied to all communities. Defaults to0.80
- max.iterations
Numeric (length = 1). Number of iterations to attempt to get convergence before erroring out. Defaults to
1000