compare_networks: Compare statistics from two simulated networks

View source: R/compare.R

compare_networksR Documentation

Compare statistics from two simulated networks

Description

Generates summary statistics for two simulated networks of class NetSim.

Usage

compare_networks(net1, net2)

Arguments

net1

a NetSim object

net2

a NetSim object

Details

This function enables a quick comparison of two simulated networks of class NetSim. This allows the user to see how different a network simulated from a Halton sequence is from network simulated from a Poisson point process with the same number of points in the same geographical window. Similarly, it enables comparison of networks generated from different spatial interaction functions. The density, mean degree, mean closeness, mean betweenness, and the size of the largest connected component are computed for each network.

Value

A dataframe with two rows and five columns. The first row displays statistics from the first network and the second row displays statistics from the second network. The values in each column are as follows. Density: the density of the network. Mean Degree: the average degree of all nodes in the network. Mean Closeness: the average closeness centrality of all nodes in each network. Mean Betweenness: the average betweenness centrality for the nodes in a network. Largest Component Size: The number of nodes in the largest connected component of a network.

Author(s)

Darren Colby
Email: dscolby17@gmail.com

Examples

# load data
data("RI")

# Simulate point processes
points1 <- PointSim(10, RI)
points2 <- PointSim(20, RI)

# Create two networks
net1 <- NetSim(points1)
net2 <- NetSim(points2)

compare_networks(net1, net2)


spacejamr documentation built on April 2, 2022, 1:07 a.m.