Skip to content

Commit

Permalink
use '<-' for assignment instead of '='. for good practice
Browse files Browse the repository at this point in the history
  • Loading branch information
qinyun-lin committed Aug 9, 2024
1 parent 7a8bde8 commit 8fa7f8f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/test_sensitivity.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,18 @@ test_sensitivity <- function(est_eff,

## verify results
if (est_eff * beta_threshold < 0 & index == "IT") {
perc_to_change = 101
recase = n_obs + 1
perc_to_change <- 101
recase <- n_obs + 1
if (to_return == "raw_output") {
warning("Ignore the following elements beta_threshold, beta_threshold_verify, perc_bias_to_change,\n RIR_primary and RIR_perc in the raw_output.")
}
}

if (abs(est_eff) > abs(beta_threshold)) {
beta_threshold_verify = perc_to_change / 100 * 0 + (1 - perc_to_change / 100) * est_eff
beta_threshold_verify <- perc_to_change / 100 * 0 + (1 - perc_to_change / 100) * est_eff
}
if (abs(est_eff) < abs(beta_threshold)) {
beta_threshold_verify = est_eff / (1 - perc_to_change / 100)
beta_threshold_verify <- est_eff / (1 - perc_to_change / 100)
}
## compare beta_threshold_verify with beta_threshold

Expand Down

0 comments on commit 8fa7f8f

Please sign in to comment.