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

Result of `Spatex.Regression.gm_combo/4`: the spatial lag model with spatially autocorrelated
errors, `y = rho W y + X beta + u`, `u = lambda W u + e` (`GM_Combo`, `GM_Combo_Het`,
`GM_Combo_Hom`; spreg 1.9.1) in snake_case.

Matrices are lists of rows. `betas` lists the constant, the exogenous and ordinary endogenous
regressors, `rho` and `lam` last, matching `name_x`. Non-finite numbers are the atoms `:nan`,
`:infinity` and `:neg_infinity`.

## Fields

  * `n`, `k` - observations and regressors (`rho` included, `lam` not).
  * `estimator` - `:kp98`, `:het` or `:hom`.
  * `betas`, `rho`, `lam`, `vm`, `std_err`, `z_stat` (`[{z, p}]`): with `:kp98` the covariance is
    `k x k` (no `lam` entry), with `:het` and `:hom` `(k + 1) x (k + 1)`.
  * `sig2` - `nil` for `:het`.
  * `u` (`y - Z beta`), `predy`, `predy_e` (reduced-form prediction, zeros when `|rho| >= 1`),
    `e_pred`, `e_filtered`, `pr2`, `pr2_e` (`nil` when `|rho| >= 1`).
  * `iteration`, `iter_stop`, `step1c`, `max_iter`, `epsilon`, `a1`, `lambdas` as in
    `Spatex.Regression.GMError`.
  * `w_lags`, `lag_q`, `name_x`, `name_y`, `name_yend`, `name_q`, `warnings`.

# `t`

```elixir
@type t() :: %Spatex.Regression.GMCombo{
  a1: :hom_sc | :hom | :het | nil,
  betas: [value()],
  e_filtered: [value()],
  e_pred: [value()],
  epsilon: float() | nil,
  estimator: :kp98 | :het | :hom,
  iter_stop: String.t() | nil,
  iteration: pos_integer() | nil,
  k: pos_integer(),
  lag_q: boolean(),
  lam: value(),
  lambdas: [value()],
  max_iter: pos_integer() | nil,
  n: pos_integer(),
  name_q: [String.t()],
  name_x: [String.t()],
  name_y: String.t(),
  name_yend: [String.t()],
  pr2: value(),
  pr2_e: value() | nil,
  predy: [value()],
  predy_e: [value()],
  rho: value(),
  sig2: value() | nil,
  std_err: [value()],
  step1c: boolean() | nil,
  u: [value()],
  vm: [[value()]],
  w_lags: pos_integer(),
  warnings: [String.t()],
  z_stat: [{value(), value()}]
}
```

# `value`

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

---

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