QteResult
unconfounded.QteResult(
qtt: pl.DataFrame,
att: pl.DataFrame,
outcome: ColumnName,
group: tuple [str , ...] | None ,
estimator: Estimator,
causal_target: CausalTarget,
propensity_score_formula: FormulaRhs | None = None ,
outcome_regression_formula: FormulaRhs | None = None ,
)
Result of a unconfounded quantile treatment effect estimation.
Use plot, tabulate, summarize or get_as_dataframe to present the estimates. Instances are returned by the estimate_* functions; the constructor is not part of the public API.
Attributes
qtt
polars.DataFrame
Quantile-specific effects, one row per quantile.
att
polars.DataFrame
Average treatment effects.
outcome
ColumnName
Outcome variable the effect was estimated for.
group
tuple[str, …] or None
Columns the estimates are grouped by.
estimator
Estimator
Estimator that produced the result.
causal_target
CausalTarget
Estimand that was targeted.
propensity_score_formula
(FormulaRhs, optional)
Propensity score formula, when applicable.
outcome_regression_formula
(FormulaRhs, optional)
Outcome regression formula, when applicable.
Methods
get_as_dataframe
Return the quantile effects with confidence interval columns.
plot
Plot the quantile and average effects with confidence intervals.
summarize
Render a rich text summary of the estimates.
tabulate
Build a Great Tables table of the estimates.
get_as_dataframe
unconfounded.QteResult.get_as_dataframe(alpha: float = 0.95 )
Return the quantile effects with confidence interval columns.
Parameters
alpha
float
Confidence level of the intervals.
0.95
Returns
polars.DataFrame
Quantile effects with ci_lb and ci_ub columns.
plot
unconfounded.QteResult.plot(
alpha: float = 0.95 ,
quantiles: ArrayLike | None = None ,
highlight_quantiles: Sequence[float ] | None = None ,
)
Plot the quantile and average effects with confidence intervals.
Parameters
alpha
float
Confidence level of the intervals.
0.95
quantiles
array_like
Quantiles to display. None shows all of them.
None
highlight_quantiles
array_like
Quantiles at which to draw point markers on the full quantile line. None draws markers at every displayed quantile.
None
Returns
altair.Chart
Altair chart of the estimates.
summarize
unconfounded.QteResult.summarize(
alpha: float = 0.95 ,
quantiles: ArrayLike | None = None ,
)
Render a rich text summary of the estimates.
Parameters
alpha
float
Confidence level of the intervals.
0.95
quantiles
array_like
Quantiles to display. None shows all of them.
None
Returns
rich.console.Group
Rich renderable for terminals and notebooks.
tabulate
unconfounded.QteResult.tabulate(
alpha: float = 0.95 ,
quantiles: ArrayLike | None = None ,
)
Build a Great Tables table of the estimates.
Parameters
alpha
float
Confidence level of the intervals.
0.95
quantiles
array_like
Quantiles to display. None shows all of them.
None
Returns
great_tables.GT
Formatted table of the estimates.