rdpg_snapshot_bs {fase} | R Documentation |
Simulate binary edge networks with B-spline latent processes
Description
rdpg_snapshot_bs
simulates a realization of a functional network
with Bernoulli edges, according to an inner product latent process model.
The latent processes are generated from a B
-spline basis with equally
spaced knots.
Usage
rdpg_snapshot_bs(n,d,m,self_loops=TRUE,
spline_design,process_options)
Arguments
n |
A positive integer, the number of nodes. |
d |
A positive integer, the number of latent space dimensions. |
m |
A positive integer, the number of snapshots.
If this argument is not specified, it
is determined from the snapshot index vector |
self_loops |
A Boolean, if |
spline_design |
A list, describing the
|
process_options |
A list, containing additional optional arguments:
|
Details
The spline design of the functional network data (snapshot indices,
basis dimension) is generated using the information provided in
spline_design
, producing a q
-dimensional cubic
B
-spline basis with equally spaced knots.
The (q \times d
) latent process basis coordinates W_i
for each node are generated as q
iid Dirichlet
random variables with d
-dimensional parameter
process_options$alpha_coord
or
rep(process_options$alpha_coord,d)
depending on the dimension
of process_options$alpha_coord
.
Roughly, smaller values of process_options$alpha_coord
will
tend to generate latent positions closer to the corners of the simplex.
W_i
is then rescaled so the overall network density is approximately
process_options$density
, and the Euclidean norm of z_i(x)
never exceeds 1
.
If the density requested is too high, it will revert to the maximum density
under this model (1/d
).
Then each latent process is given by
z_{i}(x) = W_i^{T}B(x).
The n \times n
symmetric adjacency matrix for
snapshot k=1,...,m
has independent Bernoulli entries
with mean
E([A_k]_{ij}) = z_i(x_k)^{T}z_j(x_k)
for i \leq j
(or i < j
with no self loops).
Value
A list is returned with the realizations of the basis coordinates, spline design, and the multiplex network snapshots:
A |
An array of dimension |
W |
An array of dimension |
spline_design |
A list, describing the
|
Examples
# Bernoulli edge data with B-spline latent processes, Dirichlet coordinates
# NOTE: for B-splines, x_max and x_min do not need to coincide with the
# max and min snapshot times.
data <- rdpg_snapshot_bs(n=100,d=10,
self_loops=FALSE,
spline_design=list(q=8,
x_vec=seq(-1,1,length.out=50),
x_min=-1.1,x_max=1.1),
process_options=list(alpha_coord=.2,
density=1/10))