pointpats.QStatistic

class pointpats.QStatistic(pp, shape='rectangle', nx=3, ny=3, lh=10, realizations=0)[source]

Quadrat analysis of point pattern.

Parameters
ppPointPattern

Point Pattern instance.

shapestring

Grid structure. Either “rectangle” or “hexagon”. Default is “rectangle”.

nxinteger

Number of rectangles in the horizontal direction. Only when shape is specified as “rectangle” will nx be considered.

nyinteger

Number of rectangles in the vertical direction. Only when shape is specified as “rectangle” will ny be considered.

lhfloat

Hexagon length (hexagon). Only when shape is specified as “hexagon” will lh be considered. Incompatible with nx & ny.

realizationsPointProcess

Point process instance with more than 1 point pattern realizations which would be used for simulation based inference. Default is 0 where no simulation based inference is performed.

Attributes
ppPointPattern

Point Pattern instance.

mrRectangleM or HexagonM

RectangleM or HexagonM instance.

chi2float

Chi-squared test statistic for the observed point pattern pp.

dfinteger

Degree of freedom.

chi2_pvaluefloat

p-value based on analytical chi-squared distribution.

chi2_r_pvaluefloat

p-value based on simulated sampling distribution. Only available when realizations is correctly specified.

chi2_realizationsarray

Chi-squared test statistics calculated for all of the simulated csr point patterns.

Methods

plot(self[, title])

Plot quadrats as well as the number of points falling in each quadrat.

__init__(self, pp, shape='rectangle', nx=3, ny=3, lh=10, realizations=0)[source]

Initialize self. See help(type(self)) for accurate signature.