Result of Spatex.Regression.gm_lag/4: the spatial two-stage least squares model
y = rho W y + X beta + e (spreg.GM_Lag, spreg 1.9.1) in snake_case.
Matrices are lists of rows. betas, std_err and z_stat list the constant, the exogenous
and ordinary endogenous regressors, and rho last, matching name_x. Non-finite numbers are
the atoms :nan, :infinity and :neg_infinity.
Fields
n,k- observations and coefficients (rhoincluded).betas,rho,vm(sig2 * varb, or the White / HAC covariance),varb((Z'H (H'H)^-1 H'Z)^-1),std_err,z_stat([{z, p}], normal).sig2(u'u / n, oru'u / (n - k)withsig2n_k: true),u(structural residuals,y - Z betas),predy(Z betas),predy_e(reduced-form prediction(I - rho W)^-1 X beta, zeros when|rho| >= 1),e_pred(y - predy_e).pr2,pr2_e- squared correlations ofywithpredyandpredy_e(pr2_eisnilwhen|rho| >= 1).ak_test- Anselin-Kelejian test{statistic, p}for residual spatial dependence (nilwithspat_diag: falseorrobust: :hac).sp_multipliers-%{simple: {adi, aii, ati}, full: ..., power: ...}for the requestedspat_impacts;impacts- the same keys mapping to a list of%{name, direct, indirect, total}per exogenous non-constant regressor;power_terms.robust,w_lags,lag_q,name_x,name_y,name_yend(ordinary endogenous regressors),name_q(user instruments),warnings.
The instrument matrix h and regressor matrix z spreg stores are not returned.
Summary
Types
@type t() :: %Spatex.Regression.GMLag{ ak_test: {value(), value()} | nil, betas: [value()], e_pred: [value()], impacts: %{optional(atom()) => [map()]} | nil, k: pos_integer(), lag_q: boolean(), n: pos_integer(), name_q: [String.t()], name_x: [String.t()], name_y: String.t(), name_yend: [String.t()], power_terms: pos_integer() | nil, pr2: value(), pr2_e: value() | nil, predy: [value()], predy_e: [value()], rho: value(), robust: nil | :white | :hac, sig2: value(), sp_multipliers: %{optional(atom()) => multipliers()} | nil, std_err: [value()], u: [value()], varb: [[value()]], vm: [[value()]], w_lags: pos_integer(), warnings: [String.t()], z_stat: [{value(), value()}] }
@type value() :: float() | :nan | :infinity | :neg_infinity