sim_A {JANE} | R Documentation |
Simulate unweighted networks from latent space cluster models
Description
Simulate an unweighted network from a D
-dimensional latent space cluster model with K
clusters and N
actors. The squared euclidean distance is used (i.e., dist(U_i,U_j)^2
), where U_i
and U_j
are the respective actor's positions in an unobserved social space.
Usage
sim_A(
N,
mus,
omegas,
p,
beta0,
model,
precision_R_effects,
remove_isolates = TRUE
)
Arguments
N |
An integer specifying the number of actors in the network. |
mus |
A numeric |
omegas |
A numeric |
p |
A numeric vector of length |
beta0 |
A numeric value specifying the intercept parameter for the logistic regression model. |
model |
A character string to specify the model to simulate the network from:
|
precision_R_effects |
Precision parameters for random degree heterogeneity effects:
|
remove_isolates |
A logical; if |
Value
A list containing the following components:
A |
A sparse adjacency matrix of class 'dgCMatrix' representing the simulated network. |
Z |
A numeric |
U |
A numeric |
RE |
A numeric |
precision_R_effects |
The specific precision_R_effects used to simulate |
model |
A character string representing the specific |
Examples
mus <- matrix(c(-1,-1,1,-1,1,1),
nrow = 3,
ncol = 2,
byrow = TRUE)
omegas <- array(c(diag(rep(7,2)),
diag(rep(7,2)),
diag(rep(7,2))),
dim = c(2,2,3))
p <- rep(1/3, 3)
beta0 <- 1.0
JANE::sim_A(N = 100L,
model = "NDH",
mus = mus,
omegas = omegas,
p = p,
beta0 = beta0,
remove_isolates = TRUE)