# `Spatex.ESDA.Losh`
[🔗](https://github.com/CountlinkX-Solutions/spatex/blob/v0.2.1/lib/spatex/esda/losh.ex#L1)

Result of `Spatex.ESDA.losh/3`: local spatial heteroscedasticity (`esda.LOSH`, Ord and Getis
2012).

Every per-site field is a list aligned with the graph's node order (`ids`). Field names are
PySAL's attributes in snake_case (`Hi` is `hi`, `yresid` is `yresid`, `VarHi` is `var_hi`).

  * `hi` - local heteroscedasticity; `ylag` - spatial mean of the neighbors; `yresid` -
    `|y - ylag|^a`; `var_hi` - variance of `hi`.
  * `pval` - chi-square p-values, only with `inference: :chi2` and `a == 2`, else `nil`.

Islands: esda turns every value `NaN` as soon as one site has no neighbors. Spatex computes
the statistic over the sites that have neighbors (equal to esda on the island-free graph)
and reports `:nan` for the islands themselves. Non-finite floats are the atoms `:nan`,
`:infinity` and `:neg_infinity`.

# `t`

```elixir
@type t() :: %Spatex.ESDA.Losh{
  a: float(),
  hi: [value()],
  ids: [term()] | nil,
  inference: :chi2 | nil,
  n: pos_integer(),
  pval: [value()] | nil,
  var_hi: [value()],
  ylag: [value()],
  yresid: [value()]
}
```

# `value`

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

---

*Consult [api-reference.md](api-reference.md) for complete listing*
