binary_thresh_attribute {doseSens} | R Documentation |
Separable algorithm for threshold attributable effect in a sensitivity analysis with at most one over-exposed unit in each matched set. For a greater than alternative, finds the 'a' matched sets that most decrease the mean and/or variance.
Description
Separable algorithm for threshold attributable effect in a sensitivity analysis with at most one over-exposed unit in each matched set. For a greater than alternative, finds the 'a' matched sets that most decrease the mean and/or variance.
Usage
binary_thresh_attribute(
Z,
Q,
index,
gamma,
thresh = 0,
a = 1,
trans = identity,
mc = 50000
)
Arguments
Z |
A length N vector of (nonnegative) observed doses. |
Q |
A length N vector of observed binary outcomes. |
index |
A length N vector of indices indicating matched set membership. |
gamma |
The nonnegative sensitivity parameter; gamma = 0 means no unmeasured confounding. |
thresh |
The dose threshold for the TAE. |
a |
The number of attributable effects to test for. |
trans |
The transformation of the doses to use for the test statistic. Default is the identity function. |
mc |
Number of monte-carlo samples if testing the sharp null, i.e. a = 0. |
Value
Either "reject" if the value a is deemed not plausible/compatible, "feasible" if the value a is deemed so, else a list containing a p-value and dataframe of matched sets that have contribution to the test statistic sorted in order of smallest mean reduction followed by smallest variance reduction.
Examples
# Load the data
data <- treat_out_match
# Solve by the separable algorithm
solution <- binary_thresh_attribute(data$treat, data$complain, data$match_ind,
gamma = 0, thresh = log(3.5), a = 5, trans = identity)