Skip to content

Commit

Permalink
improve error message in case of small cells
Browse files Browse the repository at this point in the history
  • Loading branch information
qinyun-lin committed Jun 11, 2024
1 parent 68b8412 commit 13d96ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/test_sensitivity_ln.R
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ test_sensitivity_ln <- function(est_eff,
solution2 <- getswitch(table_bstart2, thr_t, switch_trm, n_obs)
}
if (!check1 && !check2) {
stop("Cannot generate a usable contingency table!")
stop("Cannot generate a usable contingency table! This may be due to small cell sizes (less than 5) implied by the quantities you entered, please verify your input values.")
}

# get the number of switches for solutions that satisfy the requirements
Expand Down

0 comments on commit 13d96ed

Please sign in to comment.