Spatex.PointPats.Quadrat (Spatex v0.2.1)

Copy Markdown View Source

Result of Spatex.PointPats.quadrat_test/2 (pointpats QStatistic).

  • shape - :rectangle or :hexagon; cell_ids and counts list the cells in pointpats' order (rows from the lower left); num_cells is the real number of cells.
  • chi2, chi2_pvalue, df, chi2_contrib - Pearson statistic against a uniform expectation, its chi-square p-value, num_cells - 1 and the per-cell contributions.
  • permutations, seed - the number of CSR realizations (the :permutations option) and the seed used.
  • chi2_realizations, chi2_r_pvalue - simulated statistics and (count + 1) / (permutations + 1) with count the simulated statistics at least chi2, nil when no realizations were requested.
  • Rectangles: count_column, count_row, rectangle_width, rectangle_height. Hexagons: count_column, count_row_even, count_row_odd, h_length.
  • mbb - {xmin, ymin, xmax, ymax} of the points.

pointpats' HexagonM.num is not exposed: its formula swaps the even and odd row counts and can disagree with the real number of cells (num_cells is always right).

Summary

Types

t()

@type t() :: %Spatex.PointPats.Quadrat{
  cell_ids: [non_neg_integer()],
  chi2: value(),
  chi2_contrib: [value()],
  chi2_pvalue: value(),
  chi2_r_pvalue: float() | nil,
  chi2_realizations: [value()] | nil,
  count_column: pos_integer(),
  count_row: pos_integer() | nil,
  count_row_even: pos_integer() | nil,
  count_row_odd: non_neg_integer() | nil,
  counts: [non_neg_integer()],
  df: non_neg_integer(),
  h_length: float() | nil,
  mbb: {float(), float(), float(), float()},
  num_cells: pos_integer(),
  permutations: non_neg_integer(),
  rectangle_height: float() | nil,
  rectangle_width: float() | nil,
  seed: non_neg_integer(),
  shape: :rectangle | :hexagon
}

value()

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