Spatex.Inequality.SpatialGini (Spatex v0.2.1)

Copy Markdown View Source

Result of Spatex.Inequality.spatial_gini/3 (inequality.gini.Gini_Spatial).

  • g - Gini coefficient; dtotal - the sum of absolute differences over all ordered pairs (g * den, den = 2 n^2 mean).
  • wg - the part of dtotal between neighbors, wcg = dtotal - wg between non-neighbors, wcg_share = wcg / den.
  • polarization - (wcg / wg) (neighbor pairs / non-neighbor pairs), expected 1 when inequality is spatially random.
  • With permutations: p_sim (folded pseudo p-value of wcg), e_wcg, s_wcg, z_wcg, p_z_sim = 1 - Phi(z_wcg), polarization_p_sim, and (with keep_simulations: true) the simulated values wcgp and polarization_sim. All nil otherwise. With keep_simulations: :tensor the two simulated vectors are {permutations} Nx.Tensors of type {:f, 64} instead of lists.

Summary

Types

t()

@type t() :: %Spatex.Inequality.SpatialGini{
  den: value(),
  dtotal: value(),
  e_wcg: value() | nil,
  g: value(),
  p_sim: value() | nil,
  p_z_sim: value() | nil,
  permutations: non_neg_integer(),
  polarization: value(),
  polarization_p_sim: value() | nil,
  polarization_sim: [value()] | Nx.Tensor.t() | nil,
  s_wcg: value() | nil,
  seed: non_neg_integer() | nil,
  wcg: value(),
  wcg_share: value(),
  wcgp: [float()] | Nx.Tensor.t() | nil,
  wg: value(),
  z_wcg: value() | nil
}

value()

@type value() :: float() | :nan | :infinity | :neg_infinity