multiness_sim {multiness} | R Documentation |
Simulate from the MultiNeSS model
Description
multiness_sim
simulates a realization of the Gaussian
or logistic MultiNeSS model with Gaussian latent positions.
Usage
multiness_sim(n,m,d1,d2,model,sigma,self_loops,opts)
Arguments
n |
A positive integer, the number of nodes. |
m |
A positive integer, the number of layers. |
d1 |
A non-negative integer, the number of common latent dimensions. |
d2 |
A non-negative integer, the number of individual latent dimensions. |
model |
A string which provides choice of model,
either |
sigma |
A positive scalar or numeric vector of length |
self_loops |
A Boolean, if |
opts |
A list, containing additional optional arguments:
|
Details
The common and individual latent positions, V
and U_k
respectively, are generated as
Gaussian random variables with standard deviation opts$gamma
, and
dependence controlled by the optional
arguments opts$dependence_type
and opts$rho
.
Under the Gaussian model, the n \times n
adjacency matrix for layer k=1,...,m
has independent Gaussian entries with standard deviation sigma
and
mean given by
E(A_k) = VV^{T} + U_kU_k^{T}.
Under the logistic model, the n \times n
adjacency matrix for layer k=1,...,m
has independent Bernoulli entries with mean given by
E(A_k) = g(VV^{T} + U_kU_k^{T}),
where g
denotes the element-wise application of the inverse logistic
link (expit
) function. Under both models, self_loops
provides
an option to set the diagonal entries of the adjacency matrices to zero.
Value
A list is returned with the realizations of the latent dimensions and the multiplex network:
A |
An array of dimension |
V |
A matrix of dimension |
U |
An array of dimension |
P |
If specified, an array of dimension |
density |
If specified and |
Examples
# gaussian model, uncorrelated latent positions
data1 <- multiness_sim(n=100,m=4,d1=2,d2=2,
model="gaussian")
# logistic model, correlated latent positions
data2 <- multiness_sim(n=100,m=4,d1=2,d2=2,
model="logistic",
self_loops=FALSE,
opts=list(dependence_type="all",rho=.3,return_density=TRUE))