Skip to contents

Implements the post-stratified efficient estimator from the EIF theory. For binary surrogates, this estimates \(\theta = E[Y]\) using: $$\hat\theta_{EIF} = (1-\hat p)\hat\mu_0 + \hat p \hat\mu_1$$ where \(\hat\mu_0, \hat\mu_1\) are the conditional means of Y given \(\hat Y = 0, 1\) estimated from calibration data, and \(\hat p\) is the proportion of \(\hat Y = 1\) in the test sample.

Usage

eif_point_and_ci(Y_cal, Yhat_cal, Yhat_test, alpha = 0.1)

Arguments

Y_cal

Vector of true labels on the calibration set.

Yhat_cal

Vector of surrogate predictions (0/1) on the calibration set.

Yhat_test

Vector of surrogate predictions (0/1) on the test set.

alpha

Miscoverage level for the confidence interval.

Value

A list containing:

theta

Point estimate of the prevalence.

var

Estimated variance of the estimator.

ci_lower

Lower bound of the confidence interval.

ci_upper

Upper bound of the confidence interval.

mu0_hat

Estimated \(E[Y | \hat Y = 0]\).

mu1_hat

Estimated \(E[Y | \hat Y = 1]\).

p_hat

Proportion of \(\hat Y = 1\) in test set.

Details

This estimator is asymptotically efficient in Model A (surrogates are conditionally independent of outcomes given covariates).