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

Result of `Spatex.Regression.gm_kkp/4` (`spreg.GM_ErrorRE`, formerly `GM_KKP`): the
Kapoor-Kelejian-Prucha GM estimator of a spatial error panel with random effects,
`y = X b + mu_i + u`, `u = lambda W u + e`.

  * `betas` - `"CONSTANT"`, the slopes, then `lambda`, `sigma2_v` and `sigma2_1`, as spreg
    (`name_x` lists them in that order, without the stray space spreg puts in front of
    `sigma2_v`). `lam`, `sig2_v` (the variance of `e`) and `sig2_1` (`sigma_v^2 + t sigma_mu^2`)
    repeat the last three.
  * `vm`, `std_err`, `z_stat` - for the `k` regression coefficients only, as spreg
    (`vm = s2 (X*' X*)^-1` of the feasible GLS regression, `s2` with `n t - k`).
  * `theta` - `1 - sigma_v / sigma_1`, the weight of the area means in the GLS transform;
    `first_step` - `[lambda, sigma_v^2, sigma_1^2]` of the first (unweighted) stage.
  * `pr2` - the squared correlation of `y` and `predy`.
  * `u`, `predy` - residuals `y - X b` and fitted values on the raw data, stacked by period
    (`n * t` values, period 1 first); `e_filtered` - `u - lambda W u` per period.

# `t`

```elixir
@type t() :: %Spatex.Regression.PanelGMKKP{
  betas: term(),
  e_filtered: term(),
  first_step: term(),
  full_weights: term(),
  lam: term(),
  n: term(),
  name_x: term(),
  name_y: term(),
  pr2: term(),
  predy: term(),
  sig2_1: term(),
  sig2_v: term(),
  std_err: term(),
  t: term(),
  theta: term(),
  time_effects: term(),
  u: term(),
  vm: term(),
  warnings: term(),
  z_stat: term()
}
```

---

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