dualbounds.lee.LeeDualBounds.compute_dual_variables

LeeDualBounds.compute_dual_variables(s0_probs, s1_probs, y1_dists=None, y1_vals=None, y1_probs=None, verbose=False, nvals=100, ymin=None, ymax=None, **kwargs)[source]

Estimates dual variables using the outcome model.

We generally recommend that the user call .fit() instead of calling this function directly.

Parameters:
s0_probs : np.array

n-length array where s0_probs[i] = \(P(S_i(0) = 1 | X_i)\).

s1_probs : np.array

n-length array where s1_probs[i] = \(P(S_i(1) = 1 | X_i)\).

y1_dists : list

The ith distribution of y1_dists represents the conditional law of \(Y_i(1) | X_i, S_i(1) =1\). There are two input formats:

  • batched scipy distribution of shape (n,)

  • list of scipy dists whose shapes add up to n.

y1_vals : np.array

(n, nvals1)-length array where y1_vals[i] is the support of \(Y_i(1)\). Ignored if y1_dists is provided.

y1_probs : np.array

(n, nvals1)-length array where y1_probs[i, j] is the estimated probability that \(Y_i(1)\) equals y1_vals[i, j].

verbose : bool

If True, prints progress reports.

nvals : int

Number of values to use when discretizing Y(1).

ymin : float

Minimum value of Y(1) to use numerically.

ymax : float

Maximum value of Y(1) to use numerically.

kwargs : dict

kwargs for _ensure_feasibility method. Includes ymin, ymax, grid_size.