Learn R Programming

PartialNetwork (version 1.1.2)

sim.dnetwork: Simulation of the distribution of the network for Breza et al. (2020)

Description

Compute the distribution of the network following McCormick and Zheng (2015) and Breza et al. (2020).

Usage

sim.dnetwork(nu, d, zeta, z)

Value

a matrix of linking probabilities.

Arguments

nu

is the vector of gregariousness.

d

is the vector of degrees.

zeta

is a scale parameter that captures the influence of the latent positions on the link probabilities.

z

is a matrix where each row is a spherical coordinate.

See Also

sim.network

Examples

Run this code
N       <- 500 
zeta    <- 1

# Generate the spherical coordinates
z       <- rvMF(N, c(0, 0, 0))

# Genetate the gregariousness
nu      <- rnorm(N, -1.35, 0.37)

# Generate degrees
d       <- runif(N, 0, 45)

dist    <- sim.dnetwork(nu, d, zeta, z)

Run the code above in your browser using DataLab