Skip to content

Commit

Permalink
Merge pull request #355 from poissonconsulting/dev
Browse files Browse the repository at this point in the history
- set default min_pboot to 0.95 for all functions.
  • Loading branch information
joethorley committed Mar 21, 2024
2 parents 1ca1321 + 78636e3 commit dd06e91
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion R/bcanz.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ssd_fit_bcanz <- function(data, left = "Conc", dists = ssd_dists_bcanz()) {
#' @examples
#' fits <- ssd_fit_bcanz(ssddata::ccme_boron)
#' ssd_hc_bcanz(fits, nboot = 100)
ssd_hc_bcanz <- function(x, nboot = 10000, delta = 10, min_pboot = 0.9) {
ssd_hc_bcanz <- function(x, nboot = 10000, delta = 10, min_pboot = 0.95) {
ssd_hc(x,
proportion = c(0.01, 0.05, 0.1, 0.2),
ci = TRUE,
Expand Down
2 changes: 1 addition & 1 deletion R/hc-burrlioz.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#'
#' @export
ssd_hc_burrlioz <- function(x, percent, proportion = 0.05, ci = FALSE, level = 0.95, nboot = 1000,
min_pboot = 0.99, parametric = FALSE) {
min_pboot = 0.95, parametric = FALSE) {
lifecycle::deprecate_warn("0.3.5", "ssd_hc_burrlioz()", "ssd_hc()")
chk_s3_class(x, "fitburrlioz")

Expand Down
4 changes: 2 additions & 2 deletions R/hc.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ ssd_hc.fitdists <- function(
ci = FALSE,
level = 0.95,
nboot = 1000,
min_pboot = 0.99,
min_pboot = 0.95,
multi_est = TRUE,
multi_ci = TRUE,
weighted = TRUE,
Expand Down Expand Up @@ -182,7 +182,7 @@ ssd_hc.fitburrlioz <- function(
ci = FALSE,
level = 0.95,
nboot = 1000,
min_pboot = 0.99,
min_pboot = 0.95,
parametric = FALSE,
samples = FALSE,
save_to = NULL,
Expand Down
4 changes: 2 additions & 2 deletions R/hp.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ssd_hp.fitdists <- function(
ci = FALSE,
level = 0.95,
nboot = 1000,
min_pboot = 0.99,
min_pboot = 0.95,
multi_est = TRUE,
multi_ci = TRUE,
weighted = TRUE,
Expand Down Expand Up @@ -91,7 +91,7 @@ ssd_hp.fitburrlioz <- function(
ci = FALSE,
level = 0.95,
nboot = 1000,
min_pboot = 0.99,
min_pboot = 0.95,
parametric = FALSE,
samples = FALSE,
save_to = NULL,
Expand Down
4 changes: 2 additions & 2 deletions R/predict.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ predict.fitdists <- function(
ci = FALSE,
level = 0.95,
nboot = 1000,
min_pboot = 0.99,
min_pboot = 0.95,
multi_est = TRUE,
multi_ci = TRUE,
weighted = TRUE,
Expand Down Expand Up @@ -96,7 +96,7 @@ predict.fitburrlioz <- function(
ci = FALSE,
level = 0.95,
nboot = 1000,
min_pboot = 0.99,
min_pboot = 0.95,
parametric = TRUE,
...) {
chk_unused(...)
Expand Down
2 changes: 1 addition & 1 deletion man/predict.fitburrlioz.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/predict.fitdists.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ssd_hc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ssd_hc_bcanz.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/ssd_hc_burrlioz.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ssd_hp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/testthat/test-zzz-unstable.R
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ test_that("ssd_hc cis with error", {
data <- data.frame(Conc = conc)
fit <- ssd_fit_dists(data, dists = "lnorm_lnorm", min_pmix = 0.1)
expect_identical(attr(fit, "min_pmix"), 0.1)
expect_warning(hc_err <- ssd_hc(fit, ci = TRUE, nboot = 100))
expect_warning(hc_err <- ssd_hc(fit, ci = TRUE, min_pboot = 0.99, nboot = 100))
expect_s3_class(hc_err, "tbl")
expect_snapshot_data(hc_err, "hc_err_na")
hc_err <- ssd_hc(fit, ci = TRUE, nboot = 100, min_pboot = 0.92, multi_ci = FALSE)
Expand Down Expand Up @@ -231,7 +231,7 @@ test_that("ssd_hp cis with error", {
data <- data.frame(Conc = conc)
fit <- ssd_fit_dists(data, dists = "lnorm_lnorm", min_pmix = 0.1)
expect_identical(attr(fit, "min_pmix"), 0.1)
expect_warning(hp_err <- ssd_hp(fit, conc = 1, ci = TRUE, nboot = 100))
expect_warning(hp_err <- ssd_hp(fit, conc = 1, ci = TRUE, nboot = 100, min_pboot = 0.99))
expect_s3_class(hp_err, "tbl")
expect_snapshot_data(hp_err, "hp_err_na")
hp_err <- ssd_hp(fit, conc = 1, ci = TRUE, nboot = 100, min_pboot = 0.92, multi_ci = FALSE, weighted = FALSE)
Expand Down

0 comments on commit dd06e91

Please sign in to comment.