Learn R Programming

blvim (version 0.1.1)

summary.sim_list: Summary of a collection of spatial interaction models

Description

This function computes summary statistics on a collection of spatial interaction models (in a sim_list).

Usage

# S3 method for sim_list
summary(object, ...)

# S3 method for summary_sim_list print(x, ...)

Value

an object of class summary_sim_list and list with a set of summary statistics computed on the collection of spatial interaction models

Arguments

object

a collection of spatial interaction models, an object of class sim_list summary.sim_list()

...

additional parameters (not used currently)

x

an object of class summary_sim_list produced by

Details

The list returned by the function contains the following elements:

  • median: the median of the collection, as return by the median.sim_list() function

  • distortion: the average distance of all elements of the collection to the median model

  • withinss: the sum of all pairwise distances between the elements of the collection

  • nb_sims: the size of the collection

In addition, if the collection contains non bipartite models, the result has another element, nb_configurations which gives the number of distinct terminal sets in the collection, where the terminals are computed by terminals(), using the "RW" definition.

See Also

median.sim_list(), terminals()

Examples

Run this code
positions <- matrix(rnorm(15 * 2), ncol = 2)
distances <- as.matrix(dist(positions))
production <- rep(1, 15)
attractiveness <- rep(1, 15)
all_flows <- grid_blvim(distances,
  production,
  c(1.1, 1.25, 1.5),
  c(1, 2, 3),
  attractiveness,
  epsilon = 0.1,
  bipartite = FALSE,
)
summary(all_flows)

Run the code above in your browser using DataLab