dualbounds.generic.plug_in_no_covariates¶
-
dualbounds.generic.plug_in_no_covariates(outcome: array, treatment: array, f: callable, propensities: array | None =
None, clusters: array | None =None, B: int =0, verbose: bool =True, alpha: float =0.05, max_nvals: int =1000, _which_bound='both') dict[source]¶ Computes plug-in bounds on \(E[f(Y(0),Y(1))]\) without using covariates.
- Parameters:¶
- outcome : np.array¶
n-length array of outcomes (y)
- treatment : np.array¶
n-length array of treatments (W).
- f : function¶
f(y0, y1, x) defines the objective.
- propensities : np.array¶
n-length array of propensity scores (pis). Default: all equal to treatment.mean().
- clusters : np.array¶
Optional n-length array of clusters, so
clusters[i] = jindicates that observation i is in cluster j.- B : int¶
Number of bootstrap replications to compute standard errors. Defaults to 0 (no standard errors).
- verbose : bool¶
Show progress bar while bootstrapping if verbose=True.
- alpha : float¶
nominal Type I error level.
- max_nvals : int¶
Maximum dimension of optimal transport problem.
- _which_bound : str¶
One of ‘both’, ‘lower’, ‘upper’.
- Returns:¶
results – Dictionary containing up to three keys:
estimates: 2-length array of lower/upper estimates.
ses: 2-length array of lower/upper standard errors.
cis: 2-length array of lower/upper confidence intervals.
These arrays will be length 1 (instead of 2) if which_bound != ‘both’.
- Return type:¶
dict