# `Spatex.Regression.SURerrorGM`
[🔗](https://github.com/CountlinkX-Solutions/spatex/blob/v0.2.1/lib/spatex/regression/sur_error_gm.ex#L1)

Result of `Spatex.Regression.sur_error_gm/4` (`spreg.SURerrorGM`): seemingly unrelated
regressions with a spatial error process in every equation, estimated by generalized moments
and feasible GLS.

Per-equation fields are lists with one entry per equation, in order.

  * `n`, `n_eq`, `k` - observations, equations and, per equation, the number of coefficients.
  * `lam` - the spatial error parameter of every equation: the Kelejian-Prucha moment estimate
    (`gm_error/4`) of the OLS residuals of that equation. spreg reports no standard error for
    it, nor a covariance of `sig`.
  * `b_ols` - the equation-by-equation OLS coefficients that start the estimation.
  * `b_sur` - the SUR coefficients on the spatially filtered variables (the constant first,
    `"Constant_<eq>"`); `varb` - covariance of all coefficients stacked; `sur_inf` - per
    equation, one `{std_err, z, p}` per coefficient.
  * `sig`, `corr` - the cross-equation covariance `E'E / n` of the filtered OLS residuals
    (`e - lambda W e`) and its correlation matrix.
  * `chow` - with the same number of coefficients in every equation, one `{stat, df, p}` Wald
    test per coefficient of its equality across equations; `nil` otherwise.
  * `residuals`, `predicted` - one list of `n` values per equation (`y - X b`, on the original,
    unfiltered variables).
  * `name_y`, `name_x` - names, per equation (`name_x` starts with `"Constant_<eq>"`).
  * `warnings` - for example a degenerate moment scale, for which lambda is set to 0.

# `t`

```elixir
@type t() :: %Spatex.Regression.SURerrorGM{
  b_ols: term(),
  b_sur: term(),
  chow: term(),
  corr: term(),
  k: term(),
  lam: term(),
  n: term(),
  n_eq: term(),
  name_x: term(),
  name_y: term(),
  predicted: term(),
  residuals: term(),
  sig: term(),
  sur_inf: term(),
  varb: term(),
  warnings: term()
}
```

---

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