-
For bivariate data the intervention probability bounds,
p10low,p10upp,p11low,p11upp, and their monotonicity counterparts, are now clamped to [0, 1], so these and the causal risk ratio bounds derived from them can no longer fall outside their feasible ranges (matching the same change in the Stata package). The vectors of individual bound terms are returned unclamped. -
Fixed the ordering of the conditional probabilities passed to the constraint matrix for trivariate data with a 3-category instrument: the x=0,y=1 and x=1,y=0 cells within each category of Z were swapped. This could cause the IV inequality to be wrongly reported as violated on valid data (and, more rarely, vice versa) and could give incorrect ACE bounds. Consequently, the first example table from GitHub issue #3 is in fact compatible with the IV model, so
bpbounds()now correctly reports its IV inequality as satisfied (thanks to @rmtrane for reporting this in issue #3). -
Fixed two typos in the monotonicity ACE bounds for bivariate data with a binary instrument (
monolow4andmonoupp4usedg00whereg01was required), which could give monotonicity bounds that excluded the true ACE. -
Fixed the monotonicity ACE upper bound for trivariate data with a 3-category instrument, which is
1 - p100 - p012rather than1 - p100 - p110. -
Following these fixes, the bounds for all cases (trivariate and bivariate data, 2- and 3-category instruments, with and without monotonicity) have been verified to equal the sharp bounds computed by linear programming across simulated instrumental variable models. A new test covers the previously untested monotonicity bounds for trivariate data with a 3-category instrument.
-
Fixes to the Shiny app (
runExample()): the default values for the trivariate data with 3-category instrument example were transposed relative to their labels, and as labelled violated the IV inequality; the bivariate 3-category example is now correctly described as the Mendelian randomization example from the vignette in bivariate form rather than as hypothetical data; updated the contact email address; and refactored the server code to use a single reactiverenderPrint(). -
CRR bounds are now reported as
NAwhen the corresponding bound on P(Y|do(X=0)) is 0, since the causal risk ratio bound is then unbounded; the printed summary includes an explanatory note when this occurs.