xtlsdvc
Corrects fixed-effects bias in dynamic panel regressions by estimating bias-corrected LSDV coefficients, with optional bootstrap standard errors, to produce reliable causal evidence for decisions.
Instructions
Bias-corrected LSDV (LSDVC) estimator for dynamic panels. Validation: certified parity evidence.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Strictly exogenous regressors. Accepts the same lag-operator syntax | |
| y | Yes | Dependent variable. Its first lag is added automatically -- do **not** pass a hand-built lag in ``x``. | |
| id | No | Unit and period identifiers. | id |
| seed | No | Seed for the bootstrap. | |
| time | No | Unit and period identifiers. | time |
| alpha | No | Significance level. | |
| 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 |
| initial | No | Consistent estimator used to evaluate the bias expression: Arellano-Bond, Anderson-Hsiao, or Blundell-Bond system GMM. The correction is only as good as this input, and the three can disagree materially on a persistent series -- ``'bb'`` is the safer choice there, for the same reason system GMM is. | ab |
| 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. | |
| bootstrap | No | Number of parametric-bootstrap replications for the standard errors. **The reported analytic standard errors are the LSDV ones and do not account for the bias correction**, exactly as in Stata's ``xtlsdvc``; set this to get honest ones. 0 skips the bootstrap and warns. | |
| 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. | |
| bias_order | No | How many terms of the Bun-Kiviet expansion to subtract: ``O(1/T)``, ``O(1/NT)``, or ``O(1/NT^2)``. Bun & Kiviet (2003) find diminishing returns beyond the second. | |
| 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 | |||