Skip to content

Commit

Permalink
update signITCV to cover more scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
qinyun-lin committed Oct 10, 2023
1 parent b07bf9b commit d690abb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions R/test_sensitivity.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,19 @@ test_sensitivity <- function(est_eff,
}

# now determine the sign of ITCV
## signITCV may not be a function of whether nu > 0
if ((est_eff >= nu) & (nu >= 0) & (est_eff > beta_threshold)) {signITCV = 1}
if ((est_eff >= nu) & (nu < 0) & (est_eff > beta_threshold)) {signITCV = 1}

if ((est_eff <= nu) & (nu <= 0) & (est_eff < beta_threshold)) {signITCV = -1}
if ((est_eff <= nu) & (nu > 0) & (est_eff < beta_threshold)) {signITCV = -1}

if ((est_eff >= nu) & (nu >= 0) & (est_eff < beta_threshold)) {signITCV = -1}
if ((est_eff >= nu) & (nu < 0) & (est_eff < beta_threshold)) {signITCV = -1}

if ((est_eff <= nu) & (nu <= 0) & (est_eff > beta_threshold)) {signITCV = 1}
if ((est_eff <= nu) & (nu > 0) & (est_eff > beta_threshold)) {signITCV = 1}


if ((est_eff >= 0) & (0 > nu) & (est_eff > beta_threshold)) {signITCV = 1}
if ((est_eff <= 0) & (0 < nu) & (est_eff < beta_threshold)) {signITCV = -1}
Expand Down

0 comments on commit d690abb

Please sign in to comment.