ltmle_survival
Estimate causal effects of dynamic treatment regimes on discrete-time survival outcomes using LTMLE, adjusting for time-varying covariates and censoring.
Instructions
LTMLE for a discrete-time survival outcome under dynamic regimes. Validation: validated evidence tier (known-truth, reference, external-parity, or Monte Carlo artifact). Assumptions: Unconfoundedness (sequential exchangeability for longitudinal/LTMLE); Positivity / overlap of treatment given history; At least one nuisance (outcome or treatment) is estimated consistently; the targeting step gives double robustness. Pre-conditions: Covariates, treatment, and outcome (for survival/longitudinal variants: time-to-event and time-varying covariates); Enough data to fit a Super Learner / HAL nuisance library. Failure modes: Near-positivity violations create extreme clever-covariate weights -> Truncate weights, restrict the estimand, or report a positivity diagnostic. Alternatives: sp.dml, sp.ipw, sp.g_computation. Typical minimum N: 400.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| 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 |
| baseline | No | Time-invariant baseline covariates. | |
| 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. | |
| censoring | No | ``1`` if the subject is observed *through* interval k, ``0`` if right-censored at or before k. If omitted, no censoring. | |
| 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. | |
| treatments | Yes | Treatment column per interval. | |
| 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. | |
| regime_control | No | Treatment regimes, same semantics as :func:`ltmle`. | |
| regime_treated | No | Treatment regimes, same semantics as :func:`ltmle`. | |
| covariates_time | Yes | Time-varying covariates at each interval. | |
| event_indicators | Yes | Column names for the per-interval event indicator ``T_k`` (``1`` if the event occurs *in* interval k, ``0`` otherwise). | |
| propensity_bounds | No | propensity_bounds parameter (Tuple[float, float]). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||