find_delta {sensitivityCalibration} | R Documentation |
Estimate the maximum delta for fixed sensitivity parameters p and lambda.
Description
Estimate the maximum delta value for a given p and lambda, so that the estimated 95% confidence interval for the treatment effect is still significant. Note in order to run this function, optmatch package needs to be installed and loaded.
Usage
find_delta(q, u, p, lambda, start_value_low, start_value_high,
data_matched, n_boot = 200, tol = 0.01)
Arguments
q |
Number of matched covariates plus treatment. |
u |
Unmeasured confounder; u = c(1,0) if the unmeasured confounder is assumed to be binary. |
p |
The probability vector corresponding to u; p = c(0.5, 0.5) if the unmeasured confounder is assumed to be Bernoulli(0.5). |
lambda |
A lambda value. |
start_value_low |
Starting value for the binary search (the lower endpoint). |
start_value_high |
Starting value for the binary search (the higher endpoint). |
data_matched |
The dataset after matching. |
n_boot |
Number of boostrap samples used to approximate the CI. |
tol |
Tolerance for the binary search. |
Details
start_value_low and start_value_high are user supplied numbers to start the binary search.
Examples
data(NHANES_blood_lead_small_matched)
attach(NHANES_blood_lead_small_matched)
find_delta(9, c(1,0), c(0.5,0.5), 1, 1, 3,
NHANES_blood_lead_small_matched, n_boot = 1000)
detach(NHANES_blood_lead_small_matched)