panel_fgls
Estimate panel regression models using FGLS, correcting for heteroskedasticity and autocorrelation to produce evidence for rollout, hold, or investigate verdicts.
Instructions
Panel FGLS (Feasible Generalized Least Squares). Validation: certified parity evidence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Regressors. | |
| y | Yes | Dependent variable. | |
| id | No | Panel identifier. | id |
| tol | No | Numerical convergence tolerance. | |
| corr | No | Within-panel correlation: 'independent', 'ar1' (panel-specific AR(1)), 'psar1' (common AR(1)). | independent |
| igls | No | Iterate the variance estimates to convergence (Stata's ``igls``). The default is the two-step estimator Stata's ``xtgls`` reports without that option. .. versionchanged:: 1.27.0 This function iterated unconditionally, so its default was Stata's ``igls`` while the docstring claimed equivalence to the plain command. On a balanced N=60, T=12 panel under ``panels(hetero)`` the two differ by 2.8% on the slope. Pass ``igls=True`` for the previous behaviour. | |
| time | No | Time identifier. | time |
| alpha | No | Significance level for confidence intervals and tests. | |
| detail | No | Payload depth: 'minimal' (~150 tokens) for sub-step calls where only the point estimate is needed; 'standard' (~1K tokens) for diagnostics + coefficient table; 'agent' (~2K tokens, default) adds violations / next_steps / suggested_functions so the LLM can plan its next call without another round-trip. | agent |
| panels | No | Error structure across panels: 'homoskedastic', 'heteroskedastic', 'correlated' (cross-sectional). | heteroskedastic |
| maxiter | No | maxiter parameter (int). | |
| as_handle | No | If true, cache the fitted result on the server and return result_id + result_uri alongside the JSON payload so a subsequent tools/call can chain without re-running. | |
| data_path | Yes | Absolute path or URL to a data file. Supported: .csv / .tsv / .txt (delimited), .parquet / .pq, .feather / .arrow, .xlsx / .xls, .dta (Stata), .json / .jsonl. Schemes: file://, s3://, gs://, https://. | |
| result_id | No | Optional handle to a previously-fitted result (returned by an earlier call when as_handle=true). Tools that operate on a fitted object accept this in place of re-supplying data_path + columns. | |
| data_columns | No | Optional column projection. Parquet/Feather/Stata loaders honour this for fast partial reads. | |
| data_sample_n | No | Optional uniform random subsample size (seed=0, deterministic) — useful on huge panels. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||