Learn R Programming

wpa (version 1.9.0)

p2p_data_sim: Simulate a person-to-person query using a Watts-Strogatz model

Description

Generate an person-to-person query / edgelist based on the graph according to the Watts-Strogatz small-world network model. Organizational data fields are also simulated for Organization, LevelDesignation, and City.

Usage

p2p_data_sim(dim = 1, size = 300, nei = 5, p = 0.05)

Value

data frame with the same column structure as a person-to-person flexible query. This has an edgelist structure and can be used directly as an input to network_p2p().

Arguments

dim

Integer constant, the dimension of the starting lattice.

size

Integer constant, the size of the lattice along each dimension.

nei

Integer constant, the neighborhood within which the vertices of the lattice will be connected.

p

Real constant between zero and one, the rewiring probability.

Details

This is a wrapper around igraph::watts.strogatz.game(). See igraph documentation for details on methodology. Loop edges and multiple edges are disabled. Size of the network can be changing the arguments size and nei.

See Also

Other Data: dv_data, em_data, g2g_data, mt_data, sq_data

Other Network: external_network_plot(), g2g_data, internal_network_plot(), network_describe(), network_g2g(), network_p2p(), network_summary()

Examples

Run this code
# Simulate a p2p dataset with 800 edges
p2p_data_sim(size = 200, nei = 4)

Run the code above in your browser using DataLab