gm_lag
Run a spatial 2SLS or GMM-IV spatial lag model on cross-sectional data. Get coefficients, standard errors, z/p-values, fit metrics, optional Anselin-Kelejian test, and data preview.
Instructions
Run spreg.GM_Lag (spatial 2SLS / GMM-IV spatial lag model) on a cross-section.
Returns coefficients with SE/z/p, fit metrics, (optional) AK test, and a small data preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shapefile_path | Yes | ||
| y_col | Yes | ||
| x_cols | Yes | ||
| target_crs | No | EPSG:4326 | |
| weights_method | No | queen | |
| distance_threshold | No | ||
| w_lags | No | ||
| lag_q | No | ||
| yend_cols | No | ||
| q_cols | No | ||
| robust | No | ||
| hac_bandwidth | No | ||
| spat_diag | No | ||
| sig2n_k | No | ||
| drop_na | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||