cleverly.interventions.Support#
- class cleverly.interventions.Support(lower: float | Callable[[Any], Any], upper: float | Callable[[Any], Any])[source]#
The declared conditional support of a continuous dose:
[lower(h), upper(h)].Assumption 1 of Díaz, Williams, Hoffman and Schenck (2023) asks that a policy assign each unit a dose inside the support of \(A_t\) given the history. The analyst declares that support, because the data show only the doses that were recorded. The fit then refuses, before any learner, an observed dose outside the declared support and a policy that assigns a dose outside it. Each check reads the observed history, on which the estimator conditions, so it covers the histories the data record.
Support(0.0, lambda h: 6.0 + 2.0 * h["W2"])
- Parameters:
- lower
floatorcallable() The smallest dose a unit can take, or a function of the policy frame that returns one value per row.
- upper
floatorcallable() The largest dose, in the same form.
- lower
Methods#
- Support.bounds(frame: Callable[[], Any], n: int) tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]][source]#
The support on every row,
(lower, upper).- Parameters:
- frame
callable() Returns the policy frame. It is called only when a bound is a function.
- n
int The number of rows.
- frame
- Returns: