diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 99% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md index eb131c4a8..3ac34c82d 100644 --- a/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -59,7 +59,7 @@ representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at .github/. +reported to the community leaders responsible for enforcement at codeofconduct@posit.co. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 40074d5fa..58aedd389 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,14 +1,16 @@ # Workflow derived from https://github.com/r-lib/actions/tree/v2/examples # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help - +# on: push: - branches: [main, dev] + branches: [main, master] pull_request: - branches: [main, dev] + branches: [main, master, dev] name: R-CMD-check +permissions: read-all + jobs: R-CMD-check: runs-on: ${{ matrix.config.os }} @@ -23,19 +25,20 @@ jobs: - {os: windows-latest, r: 'release'} # use 4.1 to check with rtools40's older compiler - - {os: windows-latest, r: '4.1'} + - {os: windows-latest, r: 'oldrel-3'} - - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} - - {os: ubuntu-latest, r: 'release'} - - {os: ubuntu-latest, r: 'oldrel-1'} - - {os: ubuntu-latest, r: 'oldrel-2'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + - {os: ubuntu-latest, r: 'oldrel-2'} + - {os: ubuntu-latest, r: 'oldrel-3'} env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_KEEP_PKG_SOURCE: yes steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -53,3 +56,4 @@ jobs: - uses: r-lib/actions/check-r-package@v2 with: upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.github/workflows/paper.yaml b/.github/workflows/paper.yaml index 1e3f1519e..daf28c2c4 100644 --- a/.github/workflows/paper.yaml +++ b/.github/workflows/paper.yaml @@ -21,7 +21,7 @@ jobs: journal: joss paper-path: paper/paper.md - name: Upload - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v4 with: name: paper path: paper/paper.pdf diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index 0b5cf4893..93ef053b4 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -2,14 +2,16 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: main + branches: [main, master] pull_request: - branches: main + branches: [main, master, dev] release: types: [published] workflow_dispatch: -name: pkgdown +name: pkgdown.yaml + +permissions: read-all jobs: pkgdown: @@ -22,7 +24,7 @@ jobs: permissions: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-pandoc@v2 @@ -41,7 +43,7 @@ jobs: - name: Deploy to GitHub pages 🚀 if: github.event_name != 'pull_request' - uses: JamesIves/github-pages-deploy-action@v4.4.1 + uses: JamesIves/github-pages-deploy-action@v4.5.0 with: clean: false branch: gh-pages diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 689ae0ec7..9211f4b52 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -2,20 +2,22 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: main + branches: [main, master] pull_request: - branches: main + branches: [main, master, dev] -name: test-coverage +name: test-coverage.yaml + +permissions: read-all jobs: test-coverage: - runs-on: macos-latest + runs-on: ubuntu-latest env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: r-lib/actions/setup-r@v2 with: @@ -23,28 +25,37 @@ jobs: - uses: r-lib/actions/setup-r-dependencies@v2 with: - extra-packages: any::covr + extra-packages: any::covr, any::xml2 needs: coverage - name: Test coverage run: | - covr::codecov( + cov <- covr::package_coverage( quiet = FALSE, clean = FALSE, - install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package") + install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package") ) + covr::to_cobertura(cov) shell: Rscript {0} + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true + file: ./cobertura.xml + plugin: noop + disable_search: true + token: ${{ secrets.CODECOV_TOKEN }} + - name: Show testthat output if: always() run: | ## -------------------------------------------------------------------- - find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true + find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true shell: bash - name: Upload test results if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: coverage-test-failures path: ${{ runner.temp }}/package diff --git a/.gitignore b/.gitignore index e6c2c1366..3ed4cd642 100644 --- a/.gitignore +++ b/.gitignore @@ -10,9 +10,8 @@ *.html -docs/ -inst/docs/ -inst/doc -paper/paper.pdf -scripts/boron_samples1 -scripts/checks.md +/docs/ +/inst/docs/ +/paper/paper.pdf +/scripts/boron_samples1 +/scripts/checks.md diff --git a/DESCRIPTION b/DESCRIPTION index fdc2f0294..cf4f63e6a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ssdtools Title: Species Sensitivity Distributions -Version: 1.0.6.9016 +Version: 1.0.6.9018 Authors@R: c( person("Joe", "Thorley", , "joe@poissonconsulting.ca", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7683-4592")), @@ -15,9 +15,7 @@ Authors@R: c( person("Doug", "Spry", role = "ctb"), person("Rick", "van Dam", role = "ctb"), person("Graham", "Batley", role = "ctb"), - person("Yulia", "Cuthbertson", role = "ctb"), person("Tony", "Bigwood", role = "ctb"), - person("Michael", "Antenucci", role = "ctb"), person("Ali", "Azizishirazi", role = "ctb"), person("Nadine", "Hussein", , "nadine@poissonconsulting.ca", role = "ctb", comment = c(ORCID = "0000-0003-4470-8361")), @@ -38,9 +36,9 @@ Description: Species sensitivity distributions are cumulative probability different species as described by Posthuma et al.(2001) . The ssdtools package uses Maximum Likelihood to fit distributions such as the gamma, log-logistic, log-normal and - log-normal log-normal mixture. Multiple distributions can - be averaged using Akaike Information Criteria. Confidence intervals - on hazard concentrations and proportions are produced by parametric + log-normal log-normal mixture. Multiple distributions can be averaged + using Akaike Information Criteria. Confidence intervals on hazard + concentrations and proportions are produced by parametric bootstrapping. License: Apache License (== 2.0) | file LICENSE URL: https://github.com/bcgov/ssdtools, https://bcgov.github.io/ssdtools/ @@ -53,6 +51,7 @@ Imports: furrr, generics, ggplot2, + glue, goftest, graphics, grid, @@ -61,6 +60,7 @@ Imports: plyr, purrr, Rcpp, + rlang, scales, ssddata, stats, @@ -69,7 +69,7 @@ Imports: TMB, universals, utils, - VGAM + withr Suggests: actuar, covr, @@ -80,22 +80,21 @@ Suggests: fitdistrplus, foreach, future, - glue, grDevices, knitr, + latex2exp, magrittr, mle.tools, patchwork, R.rsp, readr, reshape2, - rlang, rmarkdown, - testthat, + testthat (>= 3.0.0), tidyr, tidyselect, tinytex, - withr + VGAM LinkingTo: Rcpp, RcppEigen, diff --git a/NAMESPACE b/NAMESPACE index af9e9890d..f872e1e8f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -58,6 +58,7 @@ export(is_censored) export(logLik) export(nobs) export(npars) +export(params) export(pgompertz) export(plgumbel) export(plot) @@ -68,6 +69,7 @@ export(rgompertz) export(rlgumbel) export(scale_color_ssd) export(scale_colour_ssd) +export(ssd_censor_data) export(ssd_data) export(ssd_dists) export(ssd_dists_all) @@ -96,6 +98,7 @@ export(ssd_hc_burrlioz) export(ssd_hp) export(ssd_hp_bcanz) export(ssd_is_censored) +export(ssd_label_comma) export(ssd_licensing_md) export(ssd_match_moments) export(ssd_min_pmix) @@ -145,11 +148,10 @@ export(tidy) export(waiver) import(chk) import(ggplot2) +import(rlang) importFrom(Rcpp,sourceCpp) importFrom(TMB,MakeADFun) importFrom(TMB,sdreport) -importFrom(VGAM,gompertz) -importFrom(VGAM,vglm) importFrom(abind,abind) importFrom(furrr,furrr_options) importFrom(furrr,future_map) @@ -159,6 +161,7 @@ importFrom(generics,tidy) importFrom(ggplot2,autoplot) importFrom(ggplot2,sym) importFrom(ggplot2,waiver) +importFrom(glue,glue) importFrom(goftest,ad.test) importFrom(goftest,cvm.test) importFrom(graphics,par) @@ -173,15 +176,16 @@ importFrom(grid,segmentsGrob) importFrom(lifecycle,deprecate_soft) importFrom(lifecycle,deprecate_stop) importFrom(lifecycle,deprecate_warn) +importFrom(lifecycle,deprecated) +importFrom(lifecycle,expect_defunct) importFrom(lifecycle,expect_deprecated) importFrom(parallel,nextRNGStream) importFrom(parallel,nextRNGSubStream) importFrom(plyr,summarise) importFrom(purrr,list_assign) importFrom(purrr,transpose) -importFrom(scales,comma) +importFrom(scales,label_percent) importFrom(scales,manual_pal) -importFrom(scales,percent) importFrom(scales,trans_breaks) importFrom(ssddata,gm_mean) importFrom(stats,coef) diff --git a/NEWS.md b/NEWS.md index 866e9df32..43b7f091e 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,6 @@ -# ssdtools 1.0.6.9016 +# ssdtools 1.0.6.9018 ## Additions @@ -11,14 +11,20 @@ - `samples` argument to include bootstrap samples as list of numeric vector(s). - `save_to` argument to specify a directory in which to save the bootstrap datasets as csv files and parameter estimates as rds files. The files are named `data_000000001_xx.csv` and `estimates_000000001_xx.rds` etc where `xx` is the distribution. The parent data set and estimates are named `boot_000000000_xx.csv` and `estimates_000000000_xx.csv`. - Added `ssd_hp_bcanz()` and `ssd_hp.fitburrlioz()` function to get hazard proportions. +- Added `ssd_label_comma()` for x-axis labels. - Added `trans = "log10"` and `add_x = 0` arguments to `ssd_plot()` and `ssd_plot_data()`. - Added `ssd_pmulti()`, `ssd_qmulti()` and `ssd_rmulti()` for combined mixture distributions. - Added `ssd_exx()` functions to get default parameter estimates for distributions. +- Added `ssd_censor_data()` to censor data. - Added David Fox and Rebecca Fisher as co-authors. - Added `npars` argument to `ssd_dists_bcanz()`. +- Added `big.mark = ","` for x-axis labels and `suffix = "%"` to y-axis labels to plotting functions. ## Modifications +- Only non-parametric bootstrap for censored data. +- Changed `at_boundary_ok = TRUE` to ensure `lnorm_lnorm` mixture distribution included. +- Changed `computable = TRUE` to as not required for bootstrapping. - Changed to `min_pboot = 0.95` for all functions. - Changed `min_pmix = 0` to `min_pmix = ssd_min_pmix(nrow(data))` to by default give set min_pmix to be `0.1` or `3/nrow(data)` if greater to improve convergence of mixture models. @@ -43,11 +49,13 @@ give set min_pmix to be `0.1` or `3/nrow(data)` if greater to improve convergenc ## Deprecation +- Soft-deprecated `comma_signif()`. - Soft-deprecated argument `percent = 5` for `proportion = 0.05` for `ssd_hc()` and `predict()`. -- `is_censored()`, `ssd_plot_cf()` and `comma_signif(...)` now warn deprecated unconditionally. -- `plot.fitdists()` now defunct. -- Removed defunct `ssd_cfplot()` +- `is_censored()`, `plot.fitdists()`, `ssd_plot_cf()` `geom_ssd()`, `stat_ssd()`, `xgompertz()`, `xlgumbel`, `ssd_hc_burrlioz()` now defunct. +- Deprecated `ssd_wqg_bc()` and `ssd_wqg_burrlioz()`. (#75). +- Deprecated `ssd_fit_bcanz()` and `ssd_hp_bcanz()`. - Removed `ccme_data` and `ccme_boron` data set. +- Removed `pearson1000` data set (now in `ssdtests` data). # ssdtools 1.0.6 @@ -91,7 +99,7 @@ ssdtools version 1.0.0 is the first major release of `ssdtools` with some import ## Fitting -An important change to the functionality of `ssd_fit_dists()` was to switch from model fitting using [`fitdistrplus`](https://github.com/aursiber/fitdistrplus) to [`TMB`](https://github.com/kaskr/adcomp) which has resulted in improved handling of censored data. +An important change to the functionality of `ssd_fit_dists()` was to switch from model fitting using [`fitdistrplus`](https://github.com/lbbe-software/fitdistrplus) to [`TMB`](https://github.com/kaskr/adcomp) which has resulted in improved handling of censored data. Although it was hoped that model fitting would be faster this is currently not the case. As a result of the change the `fitdists` objects returned by `ssd_fit_dists()` from previous versions of `ssdtools` are not compatible with the major release and should be regenerated. diff --git a/R/bcanz.R b/R/bcanz.R index c7e0ab75b..f9ddcf484 100644 --- a/R/bcanz.R +++ b/R/bcanz.R @@ -32,7 +32,7 @@ ssd_dists_bcanz <- function(npars = c(2L, 5L)) { chk_unique(npars) check_dim(npars, values = 1:2) chk_subset(npars, c(2L, 5L)) - + ssd_dists(bcanz = TRUE, npars = npars) } @@ -50,8 +50,8 @@ ssd_dists_bcanz <- function(npars = c(2L, 5L)) { #' ssd_fit_bcanz(ssddata::ccme_boron) ssd_fit_bcanz <- function(data, left = "Conc", dists = ssd_dists_bcanz()) { ssd_fit_dists(data, - left = left, - dists = dists + left = left, + dists = dists ) } @@ -72,10 +72,10 @@ ssd_fit_bcanz <- function(data, left = "Conc", dists = ssd_dists_bcanz()) { #' ssd_hc_bcanz(fits, nboot = 100) ssd_hc_bcanz <- function(x, nboot = 10000, min_pboot = 0.95) { ssd_hc(x, - proportion = c(0.01, 0.05, 0.1, 0.2), - ci = TRUE, - nboot = nboot, - min_pboot = min_pboot + proportion = c(0.01, 0.05, 0.1, 0.2), + ci = TRUE, + nboot = nboot, + min_pboot = min_pboot ) } @@ -95,9 +95,9 @@ ssd_hc_bcanz <- function(x, nboot = 10000, min_pboot = 0.95) { #' ssd_hp_bcanz(fits, nboot = 100) ssd_hp_bcanz <- function(x, conc = 1, nboot = 10000, min_pboot = 0.95) { ssd_hp(x, - conc = conc, - ci = TRUE, - nboot = nboot, - min_pboot = min_pboot + conc = conc, + ci = TRUE, + nboot = nboot, + min_pboot = min_pboot ) } diff --git a/R/boot.R b/R/boot.R index 001aa4cf7..d537b21a7 100644 --- a/R/boot.R +++ b/R/boot.R @@ -58,14 +58,14 @@ sample_parameters <- function(i, dist, fun, data, args, pars, weighted, censorin parametric = parametric ) - if(!is.null(save_to)) { + if (!is.null(save_to)) { readr::write_csv(new_data, boot_filepath(i, dist, save_to)) } if (dist == "lnorm_lnorm") { pars <- slnorm_lnorm(new_data) } - if(dist == "multi") { + if (dist == "multi") { dist2 <- names(pars) } else { dist2 <- dist @@ -76,17 +76,17 @@ sample_parameters <- function(i, dist, fun, data, args, pars, weighted, censorin range_shape2 = range_shape2, control = control, pars = pars, hessian = FALSE, censoring = censoring, weighted = weighted )$result - + if (is.null(fit)) { return(NULL) } est <- estimates(fit, all_estimates = TRUE) - - if(!is.null(save_to)) { + + if (!is.null(save_to)) { saveRDS(est, boot_filepath(i, dist, save_to, prefix = "estimates", ext = ".rds")) } - - if(!is.null(wts)) { + + if (!is.null(wts)) { est[names(wts)] <- unname(wts) } est @@ -99,23 +99,23 @@ boot_estimates <- function(fun, dist, estimates, pars, nboot, data, weighted, ce args <- c(args, estimates) data <- data[c("left", "right", "weight")] - + seeds <- seed_streams(nboot) - - if(fix_weights) { + + if (fix_weights) { wts <- estimates[stringr::str_detect(names(estimates), "\\.weight$")] } else { wts <- NULL } - - if(!is.null(save_to)) { - if(!requireNamespace("readr", quietly = TRUE)) { + + if (!is.null(save_to)) { + if (!requireNamespace("readr", quietly = TRUE)) { err("Package 'readr' must be installed.") } readr::write_csv(data, boot_filepath(0, dist, save_to)) saveRDS(estimates, boot_filepath(0, dist, save_to, prefix = "estimates", ext = ".rds")) } - + estimates <- future_map(1:nboot, sample_parameters, dist = dist, fun = sfun, data = data, args = args, pars = pars, @@ -125,7 +125,9 @@ boot_estimates <- function(fun, dist, estimates, pars, nboot, data, weighted, ce wts = wts, .options = furrr::furrr_options(seed = seeds) ) - names(estimates) <- boot_filename(1:length(estimates), prefix = "", sep = "", - dist = paste0("_", dist)) + names(estimates) <- boot_filename(1:length(estimates), + prefix = "", sep = "", + dist = paste0("_", dist) + ) estimates[!vapply(estimates, is.null, TRUE)] } diff --git a/R/censor.R b/R/censor.R index 6ca98f309..4070e0f35 100644 --- a/R/censor.R +++ b/R/censor.R @@ -12,6 +12,32 @@ # See the License for the specific language governing permissions and # limitations under the License. + +#' Censor Data +#' +#' @inheritParams params +#' +#' @return A tibble of the censored data. +#' @export +#' +#' @examples +#' ssd_censor_data(ssddata::ccme_boron, censoring = c(2.5, Inf)) +ssd_censor_data <- function(data, left = "Conc", ..., right = left, censoring = c(0, Inf)) { + .chk_data(data, left, right) + chk_unused(...) + + if(left == right) { + right <- "right" + data$right <- data[[left]] + } + + processed <- process_data(data, left, right) + censored <- censor_data(processed, censoring) + data[[left]] <- censored$left + data[[right]] <- censored$right + data +} + .is_censored <- function(x) { !identical(x, c(0, Inf)) } @@ -31,58 +57,43 @@ censoring_text <- function(x) { censoring } -#' Is Censored -#' `r lifecycle::badge('deprecated')` -#' -#' Deprecated for [`ssd_is_censored()`]. -#' -#' @param x A fitdists object. -#' -#' @return A flag indicating if the data is censored. -#' @export -#' @seealso [`ssd_is_censored()`] -#' -#' @examples -#' fits <- ssd_fit_dists(ssddata::ccme_boron) -#' is_censored(fits) -is_censored <- function(x) { - lifecycle::deprecate_warn("0.3.7", "is_censored()", "ssd_is_censored()") - chk_s3_class(x, "fitdists") - ssd_is_censored(x) -} - censor_data <- function(data, censoring) { if (!.is_censored(censoring)) { return(data) } chk_not_any_na(censoring) - + + data$right[data$left < censoring[1]] <- censoring[1] data$left[data$left < censoring[1]] <- 0 + data$left[data$right > censoring[2]] <- censoring[2] data$right[data$right > censoring[2]] <- Inf data } censoring <- function(data) { censoring <- c(0, Inf) - data <- data[data$left != data$right, ] + + censored <- data[data$left != data$right, ] + data <- data[data$left == data$right, ] - if (!nrow(data)) { + if (!nrow(censored)) { return(censoring) } - left <- data$left == 0 - right <- is.infinite(data$right) - - if (any(!left & !right)) { + if (any(censored$left != 0 & !is.infinite(censored$right))) { return(c(NA_real_, NA_real_)) } - censoring[1] <- max(0, data$right[data$left == 0]) - censoring[2] <- min(Inf, censoring[2], data$left[is.infinite(data$right)]) + censoring[1] <- max(0, censored$right[censored$left == 0]) + censoring[2] <- min(Inf, censored$left[is.infinite(censored$right)]) if (censoring[1] >= censoring[2]) { return(c(NA_real_, NA_real_)) } + + if(any(data$right < censoring[1]) || any(data$left > censoring[2])) { + return(c(NA_real_, NA_real_)) + } censoring } diff --git a/R/censored.R b/R/censored.R index 23c5e46f4..93ed2fa15 100644 --- a/R/censored.R +++ b/R/censored.R @@ -54,3 +54,19 @@ ssd_is_censored.fitdists <- function(x, ...) { chk_unused(...) .is_censored(.censoring_fitdists(x)) } + +#' Is Censored +#' `r lifecycle::badge('deprecated')` +#' +#' Deprecated for [`ssd_is_censored()`]. +#' +#' @param x A fitdists object. +#' +#' @return A flag indicating if the data is censored. +#' @export +#' @seealso [`ssd_is_censored()`] +is_censored <- function(x) { + lifecycle::deprecate_stop("0.3.7", "is_censored()", "ssd_is_censored()") + chk_s3_class(x, "fitdists") + ssd_is_censored(x) +} diff --git a/R/cis.R b/R/cis.R index c5eaff383..9ab182b26 100644 --- a/R/cis.R +++ b/R/cis.R @@ -21,7 +21,7 @@ xcis_estimates <- function(x, args, n, what, level, samples) { ests <- do.call(what, args) names(ests) <- n quantile <- quantile(ests, probs = probs(level)) - samples <- if(samples) ests else numeric(0) + samples <- if (samples) ests else numeric(0) data.frame( se = sd(ests), lcl = quantile[1], ucl = quantile[2], samples = I(list(samples)), diff --git a/R/data.R b/R/data.R index 01c0ef7cd..8824fe65a 100644 --- a/R/data.R +++ b/R/data.R @@ -42,20 +42,5 @@ #' } #' @family dists #' @examples -#' dist +#' dist_data "dist_data" - -#' Pearson 1000 Data -#' -#' An example tibble of 1000 values simulated using a Pearson distribution -#' with a #FIXME of #FIXME and a #FIXME of #FIXME. -#' -#' The data is released under $FIXME -#' -#' @format A tbl data frame that includes: -#' \describe{ -#' \item{Conc}{A numeric vector of the simulate concentrations.} -#' } -#' @examples -#' head(pearson1000) -"pearson1000" diff --git a/R/devtools-helpers.R b/R/devtools-helpers.R index f0ed48eb1..62a924d82 100644 --- a/R/devtools-helpers.R +++ b/R/devtools-helpers.R @@ -1,4 +1,4 @@ -# Copyright 2023 Province of British Columbia +# Copyright 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,9 @@ release_questions <- function() { c( "Have you confirmed Apache 2.0 license at the top of all code files?", - "Have you confirmed Creative Commons license for all non-code files?" + "Have you confirmed Creative Commons license for all non-code files?", + "Have you run `data-raw/data-raw.R`?", + "Have you tested using `ssdtests` package?", + "Have you updated `small-sample-bias.pdf` using `ssdtests` package?" ) } diff --git a/R/dists.R b/R/dists.R index b2b95ba29..9ddfe24b2 100644 --- a/R/dists.R +++ b/R/dists.R @@ -29,11 +29,11 @@ ssd_dists <- function(bcanz = NULL, tails = NULL, npars = 2:5) { chk_null_or(bcanz, vld = vld_flag) chk_null_or(tails, vld = vld_flag) - + chk_whole_numeric(npars) chk_not_any_na(npars) chk_range(npars, c(2L, 5L)) - + dists <- ssdtools::dist_data if (!is.null(bcanz)) { dists <- dists[dists$bcanz == bcanz, ] @@ -42,7 +42,7 @@ ssd_dists <- function(bcanz = NULL, tails = NULL, npars = 2:5) { dists <- dists[dists$tails == tails, ] } dists <- dists[dists$npars %in% npars, ] - + dists$dist } diff --git a/R/estimates.R b/R/estimates.R index 9d275822e..13198433d 100644 --- a/R/estimates.R +++ b/R/estimates.R @@ -43,11 +43,14 @@ estimates.fitdists <- function(x, all_estimates = FALSE, ...) { wt <- glance(x)$weight y <- purrr::map2(y, wt, function(a, b) c(list(weight = b), a)) names(y) <- names(x) - if(!all_estimates) { + if (!all_estimates) { return(y) } all <- emulti_ssd() - wall <- purrr::map(all, function(x) {x$weight <- 0; x}) + wall <- purrr::map(all, function(x) { + x$weight <- 0 + x + }) args <- y args$.x <- wall do.call("list_assign", args) diff --git a/R/fit-burrlioz.R b/R/fit-burrlioz.R index 73020d013..a5366995e 100644 --- a/R/fit-burrlioz.R +++ b/R/fit-burrlioz.R @@ -27,12 +27,13 @@ #' @examples #' ssd_fit_burrlioz(ssddata::ccme_boron) ssd_fit_burrlioz <- function(data, left = "Conc", rescale = FALSE, + control = list(), silent = FALSE) { if (nrow(data) <= 8) { fit <- ssd_fit_dists(data, left = left, dists = "llogis", computable = FALSE, nrow = 5L, - rescale = rescale, silent = silent + rescale = rescale, silent = silent, control = control, ) class(fit) <- c("fitburrlioz", class(fit)) return(fit) @@ -46,6 +47,7 @@ ssd_fit_burrlioz <- function(data, left = "Conc", rescale = FALSE, left = left, dists = "burrIII3", rescale = rescale, computable = FALSE, at_boundary_ok = TRUE, silent = TRUE, + control = control, range_shape1 = range_shape1, range_shape2 = range_shape2 ), diff --git a/R/fit.R b/R/fit.R index a80c0f972..b8068eb12 100644 --- a/R/fit.R +++ b/R/fit.R @@ -17,9 +17,9 @@ nullify_nonfit <- function(fit, dist, data, rescale, computable, min_pmix, range_shape1, range_shape2, at_boundary_ok, silent) { error <- fit$error fit <- fit$result - + rescale <- if (rescale == 1) " (try rescaling data)" else NULL - + if (!is.null(error)) { if (!silent) { wrn( @@ -38,7 +38,7 @@ nullify_nonfit <- function(fit, dist, data, rescale, computable, } return(NULL) } - + if (!optimizer_converged(fit)) { message <- optimizer_message(fit) if (!silent) { @@ -66,58 +66,58 @@ nullify_nonfit <- function(fit, dist, data, rescale, computable, remove_nonfits <- function(fits, data, rescale, computable, min_pmix, range_shape1, range_shape2, at_boundary_ok, silent) { fits <- mapply(nullify_nonfit, fits, names(fits), - MoreArgs = list( - data = data, rescale = rescale, computable = computable, - min_pmix = min_pmix, - range_shape1 = range_shape1, range_shape2 = range_shape2, - at_boundary_ok = at_boundary_ok, silent = silent - ), SIMPLIFY = FALSE + MoreArgs = list( + data = data, rescale = rescale, computable = computable, + min_pmix = min_pmix, + range_shape1 = range_shape1, range_shape2 = range_shape2, + at_boundary_ok = at_boundary_ok, silent = silent + ), SIMPLIFY = FALSE ) fits <- fits[!vapply(fits, is.null, TRUE)] fits } -fit_dists <- function(data, dists, min_pmix, range_shape1, range_shape2, control, at_boundary_ok= TRUE, silent = TRUE, rescale = FALSE, computable = FALSE, pars = NULL, hessian = TRUE) { +fit_dists <- function(data, dists, min_pmix, range_shape1, range_shape2, control, at_boundary_ok = TRUE, silent = TRUE, rescale = FALSE, computable = FALSE, pars = NULL, hessian = TRUE) { data <- data[c("left", "right", "weight")] safe_fit_dist <- safely(fit_tmb) names(dists) <- dists - if(!is.null(pars)) { + if (!is.null(pars)) { pars <- pars[dists] } else { pars <- rep(list(NULL), length(dists)) } - - fits <- purrr::map2(dists, pars, .f = safe_fit_dist, - data = data, min_pmix = min_pmix, - range_shape1 = range_shape1, range_shape2 = range_shape2, control = control, - hessian = hessian + + fits <- purrr::map2(dists, pars, + .f = safe_fit_dist, + data = data, min_pmix = min_pmix, + range_shape1 = range_shape1, range_shape2 = range_shape2, control = control, + hessian = hessian ) fits <- remove_nonfits(fits, - data = data, rescale = rescale, - computable = computable, min_pmix = min_pmix, - range_shape1 = range_shape1, range_shape2 = range_shape2, - at_boundary_ok = at_boundary_ok, silent = silent + data = data, rescale = rescale, + computable = computable, min_pmix = min_pmix, + range_shape1 = range_shape1, range_shape2 = range_shape2, + at_boundary_ok = at_boundary_ok, silent = silent ) - + class(fits) <- "fitdists" fits } fits_dists <- function(data, dists, min_pmix, range_shape1, range_shape2, control, censoring, weighted, all_dists = TRUE, - at_boundary_ok= TRUE, silent = TRUE, rescale = FALSE, computable = FALSE, pars = NULL, hessian = TRUE) { + at_boundary_ok = TRUE, silent = TRUE, rescale = FALSE, computable = FALSE, pars = NULL, hessian = TRUE) { fits <- fit_dists(data, dists, - min_pmix = min_pmix, range_shape1 = range_shape1, - range_shape2 = range_shape2, - at_boundary_ok = at_boundary_ok, - control = control, silent = silent, - rescale = rescale, computable = computable - + min_pmix = min_pmix, range_shape1 = range_shape1, + range_shape2 = range_shape2, + at_boundary_ok = at_boundary_ok, + control = control, silent = silent, + rescale = rescale, computable = computable ) if (!length(fits)) { err("All distributions failed to fit.") } - if(all_dists && length(fits) != length(dists)) { + if (all_dists && length(fits) != length(dists)) { err("One or more distributions failed to fit.") } @@ -130,7 +130,7 @@ fits_dists <- function(data, dists, min_pmix, range_shape1, range_shape2, contro attrs$min_pmix <- min_pmix attrs$range_shape1 <- range_shape1 attrs$range_shape2 <- range_shape2 - + .attrs_fitdists(fits) <- attrs fits } @@ -139,15 +139,18 @@ fits_dists <- function(data, dists, min_pmix, range_shape1, range_shape2, contro #' #' Fits one or more distributions to species sensitivity data. #' -#' By default the 'llogis', 'gamma' and 'lnorm' -#' distributions are fitted to the data. -#' For a complete list of the implemented distributions see [`ssd_dists_all()`]. +#' By default the 'gamma', 'lgumbel', 'llogis', 'lnorm', 'lnorm_lnorm' and +#' 'weibull' distributions are fitted to the data. +#' For a complete list of the distributions that are currently implemented in +#' `ssdtools` see [`ssd_dists_all()`]. #' #' If weight specifies a column in the data frame with positive numbers, #' weighted estimation occurs. #' However, currently only the resultant parameter estimates are available. #' -#' If the `right` argument is different to the `left` argument then the data are considered to be censored. +#' If the `right` argument is different to the `left` argument +#' then the data are considered to be censored. +#' #' #' @inheritParams params #' @return An object of class fitdists. @@ -165,8 +168,8 @@ ssd_fit_dists <- function( nrow = 6L, rescale = FALSE, reweight = FALSE, - computable = TRUE, - at_boundary_ok = FALSE, + computable = FALSE, + at_boundary_ok = TRUE, all_dists = FALSE, min_pmix = ssd_min_pmix(nrow(data)), range_shape1 = c(0.05, 20), @@ -178,13 +181,13 @@ ssd_fit_dists <- function( check_dim(dists, values = TRUE) chk_not_any_na(dists) chk_unique(dists) - + chk_subset(dists, ssd_dists_all()) - + chk_whole_number(nrow) chk_gte(nrow, 4L) .chk_data(data, left, right, weight, nrow) - + chk_flag(rescale) chk_flag(reweight) chk_flag(computable) @@ -206,7 +209,7 @@ ssd_fit_dists <- function( chk_sorted(range_shape2) chk_list(control) chk_flag(silent) - + org_data <- as_tibble(data) data <- process_data(data, left, right, weight) attrs <- adjust_data(data, rescale = rescale, reweight = reweight, silent = silent) @@ -214,16 +217,18 @@ ssd_fit_dists <- function( if (any(is.infinite(attrs$data$right))) { err("Distributions cannot currently be fitted to right censored data.") } + fits <- fits_dists(attrs$data, dists, - min_pmix = min_pmix, range_shape1 = range_shape1, - range_shape2 = range_shape2, - all_dists = all_dists, - at_boundary_ok = at_boundary_ok, - control = control, silent = silent, - rescale = attrs$rescale, computable = computable, - censoring = attrs$censoring, - weighted = attrs$weighted) - + min_pmix = min_pmix, range_shape1 = range_shape1, + range_shape2 = range_shape2, + all_dists = all_dists, + at_boundary_ok = at_boundary_ok, + control = control, silent = silent, + rescale = attrs$rescale, computable = computable, + censoring = attrs$censoring, + weighted = attrs$weighted + ) + .org_data_fitdists(fits) <- org_data .cols_fitdists(fits) <- list(left = left, right = right, weight = weight) .unequal_fitdists(fits) <- attrs$unequal diff --git a/R/ggplot.R b/R/ggplot.R index 8766f9f13..34ccebe08 100644 --- a/R/ggplot.R +++ b/R/ggplot.R @@ -48,7 +48,7 @@ scale_color_ssd <- function(...) { } #' Species Sensitivity Data Points -#' +#' #' Uses the empirical cumulative distribution to create scatterplot of points `x`. #' #' @inheritParams ggplot2::layer @@ -182,9 +182,9 @@ geom_xribbon <- function(mapping = NULL, #' Species Sensitivity Data Points #' `r lifecycle::badge('deprecated')` -#' +#' #' `geom_ssd()` has been deprecated for `geom_ssdpoint()`. -#' +#' #' @inheritParams ggplot2::layer #' @inheritParams ggplot2::geom_point #' @export @@ -201,7 +201,7 @@ geom_ssd <- function(mapping = NULL, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE) { - lifecycle::deprecate_warn("0.3.5", "geom_ssd()", "geom_ssdpoint()") + lifecycle::deprecate_stop("0.3.5", "geom_ssd()", "geom_ssdpoint()") geom_ssdpoint( mapping = mapping, data = data, stat = stat, @@ -233,7 +233,7 @@ stat_ssd <- function(mapping = NULL, na.rm = FALSE, show.legend = NA, inherit.aes = TRUE) { - lifecycle::deprecate_warn("0.3.5", "stat_ssd()") + lifecycle::deprecate_stop("0.3.5", "stat_ssd()") layer( stat = StatSsdpoint, data = data, mapping = mapping, geom = geom, diff --git a/R/gompertz.R b/R/gompertz.R index 7b01b9cf6..3d8a13f84 100644 --- a/R/gompertz.R +++ b/R/gompertz.R @@ -20,7 +20,7 @@ #' @return A numeric vector. #' @export dgompertz <- function(x, llocation = 0, lshape = 0, log = FALSE) { - lifecycle::deprecate_warn("1.0.0", "dgompertz()") + lifecycle::deprecate_stop("1.0.0", "dgompertz()") ddist("gompertz", x, location = exp(llocation), shape = exp(lshape), log = log @@ -44,7 +44,7 @@ ssd_pgompertz <- function(q, location = 1, shape = 1, lower.tail = TRUE, log.p = #' @inheritParams params #' @export pgompertz <- function(q, llocation = 0, lshape = 0, lower.tail = TRUE, log.p = FALSE) { - lifecycle::deprecate_warn("1.0.0", "pgompertz()", "ssd_pgompertz()") + lifecycle::deprecate_stop("1.0.0", "pgompertz()", "ssd_pgompertz()") ssd_pgompertz(q, location = exp(llocation), shape = exp(lshape), lower.tail = lower.tail, log.p = log.p @@ -68,7 +68,7 @@ ssd_qgompertz <- function(p, location = 1, shape = 1, lower.tail = TRUE, log.p = #' @inheritParams params #' @export qgompertz <- function(p, llocation = 0, lshape = 0, lower.tail = TRUE, log.p = FALSE) { - lifecycle::deprecate_warn("1.0.0", "qgompertz()", "ssd_qgompertz()") + lifecycle::deprecate_stop("1.0.0", "qgompertz()", "ssd_qgompertz()") ssd_qgompertz( p = p, location = exp(llocation), shape = exp(lshape), lower.tail = lower.tail, log.p = log.p @@ -99,18 +99,19 @@ ssd_egompertz <- function() { #' @inheritParams params #' @export rgompertz <- function(n, llocation = 0, lshape = 0) { - lifecycle::deprecate_warn("1.0.0", "rgompertz()", "ssd_rgompertz()") + lifecycle::deprecate_stop("1.0.0", "rgompertz()", "ssd_rgompertz()") ssd_rgompertz(n = n, location = exp(llocation), shape = exp(lshape)) } sgompertz <- function(data, pars = NULL) { + rlang::check_installed("VGAM") x <- mean_weighted_values(data) if (!is.null(pars)) { pars <- rev(unlist(pars)) } data <- data.frame(x = x) - fit <- suppressWarnings(vglm(x ~ 1, gompertz, coefstart = pars, data = data)) + fit <- suppressWarnings(VGAM::vglm(x ~ 1, VGAM::gompertz, coefstart = pars, data = data)) list( log_location = unname(coef(fit)[2]) * (1 + 1e-3), log_shape = unname(coef(fit)[1]) * (1 - 1e-3) diff --git a/R/hc-burrlioz.R b/R/hc-burrlioz.R index e6ac31819..77e091750 100644 --- a/R/hc-burrlioz.R +++ b/R/hc-burrlioz.R @@ -14,30 +14,25 @@ #' Hazard Concentrations for Burrlioz Fit #' `r lifecycle::badge('deprecated')` -#' +#' #' Deprecated for [`ssd_hc()`]. #' #' @inheritParams params #' @return A tibble of corresponding hazard concentrations. #' @export -#' @examples -#' fit <- ssd_fit_burrlioz(ssddata::ccme_boron) -#' ssd_hc_burrlioz(fit) -#' -#' @export ssd_hc_burrlioz <- function(x, percent, proportion = 0.05, ci = FALSE, level = 0.95, nboot = 1000, min_pboot = 0.95, parametric = FALSE) { - lifecycle::deprecate_warn("0.3.5", "ssd_hc_burrlioz()", "ssd_hc()") + lifecycle::deprecate_stop("0.3.5", "ssd_hc_burrlioz()", "ssd_hc()") chk_s3_class(x, "fitburrlioz") - - if(lifecycle::is_present(percent)) { - lifecycle::deprecate_soft("1.0.6.9009", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") + + if (lifecycle::is_present(percent)) { + lifecycle::deprecate_soft("2.0.0", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") chk_vector(percent) chk_numeric(percent) chk_range(percent, c(0, 100)) proportion <- percent / 100 } - + chk_vector(proportion) chk_numeric(proportion) chk_range(proportion) diff --git a/R/hc.R b/R/hc.R index fb5752750..2a3cbfa11 100644 --- a/R/hc.R +++ b/R/hc.R @@ -14,36 +14,36 @@ #' Hazard Concentrations for Species Sensitivity Distributions #' -#' Calculates concentration(s) with bootstrap confidence intervals -#' that protect specified proportion(s) of species for +#' Calculates concentration(s) with bootstrap confidence intervals +#' that protect specified proportion(s) of species for #' individual or model-averaged distributions #' using parametric or non-parametric bootstrapping. -#' -#' Model-averaged estimates and/or confidence intervals (including standard error) -#' can be calculated by treating the distributions as +#' +#' Model-averaged estimates and/or confidence intervals (including standard error) +#' can be calculated by treating the distributions as #' constituting a single mixture distribution #' versus 'taking the mean'. #' When calculating the model averaged estimates treating the -#' distributions as constituting a single mixture distribution +#' distributions as constituting a single mixture distribution #' ensures that `ssd_hc()` is the inverse of `ssd_hp()`. -#' +#' #' If treating the distributions as constituting a single mixture distribution #' when calculating model average confidence intervals then #' `weighted` specifies whether to use the original model weights versus -#' re-estimating for each bootstrap sample unless 'taking the mean' in which case +#' re-estimating for each bootstrap sample unless 'taking the mean' in which case #' `weighted` specifies -#' whether to take bootstrap samples from each distribution proportional to -#' its weight (so that they sum to `nboot`) versus -#' calculating the weighted arithmetic means of the lower +#' whether to take bootstrap samples from each distribution proportional to +#' its weight (so that they sum to `nboot`) versus +#' calculating the weighted arithmetic means of the lower #' and upper confidence limits based on `nboot` samples for each distribution. -#' -#' Distributions with an absolute AIC difference greater +#' +#' Distributions with an absolute AIC difference greater #' than a delta of by default 7 have considerably less support (weight < 0.01) #' and are excluded #' prior to calculation of the hazard concentrations to reduce the run time. -#' +#' #' @references -#' +#' #' Burnham, K.P., and Anderson, D.R. 2002. Model Selection and Multimodel Inference. Springer New York, New York, NY. doi:10.1007/b97636. #' #' @inheritParams params @@ -71,38 +71,38 @@ ssd_hc <- function(x, ...) { #' @describeIn ssd_hc Hazard Concentrations for Distributional Estimates #' @export #' @examples -#' +#' #' ssd_hc(ssd_match_moments()) ssd_hc.list <- function( - x, - percent, - proportion = 0.05, + x, + percent, + proportion = 0.05, ...) { chk_list(x) chk_named(x) chk_unique(names(x)) chk_unused(...) - - if(lifecycle::is_present(percent)) { - lifecycle::deprecate_soft("1.0.6.9009", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") + + if (lifecycle::is_present(percent)) { + lifecycle::deprecate_soft("2.0.0", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") chk_vector(percent) chk_numeric(percent) chk_range(percent, c(0, 100)) proportion <- percent / 100 } - + chk_vector(proportion) chk_numeric(proportion) chk_range(proportion) - + if (!length(x)) { hc <- no_hcp() hc <- dplyr::rename(hc, proportion = "value") return(hc) } hc <- mapply(.ssd_hc_dist, x, names(x), - MoreArgs = list(proportion = proportion), - SIMPLIFY = FALSE + MoreArgs = list(proportion = proportion), + SIMPLIFY = FALSE ) bind_rows(hc) } @@ -110,32 +110,30 @@ ssd_hc.list <- function( #' @describeIn ssd_hc Hazard Concentrations for fitdists Object #' @export #' @examples -#' +#' #' fits <- ssd_fit_dists(ssddata::ccme_boron) #' ssd_hc(fits) ssd_hc.fitdists <- function( - x, - percent, + x, + percent, proportion = 0.05, average = TRUE, - ci = FALSE, - level = 0.95, + ci = FALSE, + level = 0.95, nboot = 1000, min_pboot = 0.95, multi_est = TRUE, ci_method = "weighted_samples", - parametric = TRUE, - delta = 9.21, + parametric = TRUE, + delta = 9.21, samples = FALSE, save_to = NULL, control = NULL, - ... -) { - + ...) { chk_unused(...) - - if(lifecycle::is_present(percent)) { - lifecycle::deprecate_soft("1.0.6.9009", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") + + if (lifecycle::is_present(percent)) { + lifecycle::deprecate_soft("2.0.0", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") chk_vector(percent) chk_numeric(percent) chk_range(percent, c(0, 100)) @@ -147,12 +145,12 @@ ssd_hc.fitdists <- function( chk_range(proportion) chk_string(ci_method) chk_subset(ci_method, c("weighted_samples", "weighted_arithmetic", "multi_free", "multi_fixed")) - + fix_weights <- ci_method %in% c("weighted_samples", "multi_fixed") multi_ci <- ci_method %in% c("multi_free", "multi_fixed") hcp <- ssd_hcp_fitdists( - x = x, + x = x, value = proportion, ci = ci, level = level, @@ -167,8 +165,9 @@ ssd_hc.fitdists <- function( control = control, samples = samples, save_to = save_to, - hc = TRUE) - + hc = TRUE + ) + hcp <- dplyr::rename(hcp, proportion = "value") hcp } @@ -176,43 +175,43 @@ ssd_hc.fitdists <- function( #' @describeIn ssd_hc Hazard Concentrations for fitburrlioz Object #' @export #' @examples -#' +#' #' fit <- ssd_fit_burrlioz(ssddata::ccme_boron) #' ssd_hc(fit) ssd_hc.fitburrlioz <- function( - x, - percent, + x, + percent, proportion = 0.05, - ci = FALSE, - level = 0.95, + ci = FALSE, + level = 0.95, nboot = 1000, - min_pboot = 0.95, - parametric = FALSE, - samples = FALSE, - save_to = NULL, + min_pboot = 0.95, + parametric = FALSE, + samples = FALSE, + save_to = NULL, ...) { chk_length(x, upper = 1L) chk_named(x) chk_subset(names(x), c("burrIII3", "invpareto", "llogis", "lgumbel")) chk_unused(...) - - if(lifecycle::is_present(percent)) { - lifecycle::deprecate_soft("1.0.6.9009", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") + + if (lifecycle::is_present(percent)) { + lifecycle::deprecate_soft("2.0.0", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") chk_vector(percent) chk_numeric(percent) chk_range(percent, c(0, 100)) proportion <- percent / 100 } - + chk_vector(proportion) chk_numeric(proportion) chk_range(proportion) - fun <- if(names(x) == "burrIII3") fit_burrlioz else fit_tmb + fun <- if (names(x) == "burrIII3") fit_burrlioz else fit_tmb - hcp <- ssd_hcp_fitdists ( + hcp <- ssd_hcp_fitdists( x = x, - value = proportion, + value = proportion, ci = ci, level = level, nboot = nboot, @@ -227,8 +226,9 @@ ssd_hc.fitburrlioz <- function( control = NULL, hc = TRUE, fix_weights = FALSE, - fun = fun) - + fun = fun + ) + hcp <- dplyr::rename(hcp, proportion = "value") hcp } diff --git a/R/hcp.R b/R/hcp.R index caf5a4442..c48e5c998 100644 --- a/R/hcp.R +++ b/R/hcp.R @@ -1,4 +1,4 @@ -# Copyright 2023 Australian Government Department of +# Copyright 2023 Australian Government Department of # Climate Change, Energy, the Environment and Water # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -30,7 +30,7 @@ no_hcp <- function(hc) { no_ci_hcp <- function(value, dist, est, rescale, hc) { na <- rep(NA_real_, length(value)) - multiplier <- if(hc) rescale else 100 + multiplier <- if (hc) rescale else 100 hcp <- tibble( dist = rep(dist, length(value)), value = value, @@ -47,17 +47,17 @@ no_ci_hcp <- function(value, dist, est, rescale, hc) { } ci_hcp <- function(cis, estimates, value, dist, est, rescale, nboot, hc) { - multiplier <- if(hc) rescale else 100 - + multiplier <- if (hc) rescale else 100 + hcp <- tibble( dist = dist, - value = value, + value = value, est = est * multiplier, - se = cis$se * multiplier, - lcl = cis$lcl * multiplier, + se = cis$se * multiplier, + lcl = cis$lcl * multiplier, ucl = cis$ucl * multiplier, wt = rep(1, length(value)), - nboot = nboot, + nboot = nboot, pboot = length(estimates) / nboot, samples = I(lapply(cis$samples, function(x) x * multiplier)) ) @@ -65,46 +65,48 @@ ci_hcp <- function(cis, estimates, value, dist, est, rescale, nboot, hc) { } .ssd_hcp <- function( - x, dist, estimates, + x, dist, estimates, fun, pars, value, ci, level, nboot, min_pboot, data, rescale, weighted, censoring, min_pmix, range_shape1, range_shape2, parametric, control, save_to, samples, hc, fix_weights = FALSE) { - args <- estimates - - if(hc) { + + if (hc) { args$p <- value what <- paste0("ssd_q", dist) } else { args$q <- value / rescale what <- paste0("ssd_p", dist) } - + est <- do.call(what, args) if (!ci) { return(no_ci_hcp(value = value, dist = dist, est = est, rescale = rescale, hc = hc)) } - + censoring <- censoring / rescale - - ests <- boot_estimates(fun = fun, dist = dist, estimates = estimates, - pars = pars, nboot = nboot, data = data, weighted = weighted, - censoring = censoring, min_pmix = min_pmix, - range_shape1 = range_shape1, - range_shape2 = range_shape2, - parametric = parametric, - control = control, - save_to = save_to, - fix_weights = fix_weights + + ests <- boot_estimates( + fun = fun, dist = dist, estimates = estimates, + pars = pars, nboot = nboot, data = data, weighted = weighted, + censoring = censoring, min_pmix = min_pmix, + range_shape1 = range_shape1, + range_shape2 = range_shape2, + parametric = parametric, + control = control, + save_to = save_to, + fix_weights = fix_weights ) x <- value - if(!hc) { + if (!hc) { x <- x / rescale } cis <- cis_estimates(ests, what, level = level, x = x, samples = samples) - hcp <- ci_hcp(cis, estimates = ests, value = value, dist = dist, - est = est, rescale = rescale, nboot = nboot, hc = hc) + hcp <- ci_hcp(cis, + estimates = ests, value = value, dist = dist, + est = est, rescale = rescale, nboot = nboot, hc = hc + ) replace_min_pboot_na(hcp, min_pboot) } @@ -116,17 +118,19 @@ ci_hcp <- function(cis, estimates, value, dist, est, rescale, nboot, hc) { estimates <- estimates(x) dist <- .dist_tmbfit(x) pars <- .pars_tmbfit(x) - if(fix_weights && average) { + if (fix_weights && average) { nboot <- round(nboot * weight) } - .ssd_hcp(x, dist = dist, estimates = estimates, - fun = fun, pars = pars, - value = value, ci = ci, level = level, nboot = nboot, - min_pboot = min_pboot, - data = data, rescale = rescale, weighted = weighted, censoring = censoring, - min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, - parametric = parametric, control = control, save_to = save_to, samples = samples, - hc = hc) + .ssd_hcp(x, + dist = dist, estimates = estimates, + fun = fun, pars = pars, + value = value, ci = ci, level = level, nboot = nboot, + min_pboot = min_pboot, + data = data, rescale = rescale, weighted = weighted, censoring = censoring, + min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, + parametric = parametric, control = control, save_to = save_to, samples = samples, + hc = hc + ) } hcp_ind <- function(hcp, weight, method) { @@ -163,7 +167,7 @@ replace_estimates <- function(hcp, est) { hcp_average <- function(hcp, weight, value, method, nboot) { samples <- group_samples(hcp) - + hcp <- lapply(hcp, function(x) x[c("value", "est", "se", "lcl", "ucl", "pboot")]) hcp <- lapply(hcp, as.matrix) hcp <- Reduce(function(x, y) { @@ -183,7 +187,6 @@ hcp_average <- function(hcp, weight, value, method, nboot) { } hcp_weighted <- function(hcp, level, samples, min_pboot) { - quantiles <- purrr::map(hcp$samples, stats::quantile, probs = probs(level)) quantiles <- purrr::transpose(quantiles) hcp$lcl <- unlist(quantiles[[1]]) @@ -194,49 +197,52 @@ hcp_weighted <- function(hcp, level, samples, min_pboot) { hcp$lcl[fail] <- NA_real_ hcp$ucl[fail] <- NA_real_ hcp$se[fail] <- NA_real_ - if(!samples) { + if (!samples) { hcp$samples <- I(list(numeric(0))) } hcp } -.ssd_hcp_ind <- function(x, value, ci, level, nboot, min_pboot, estimates, - data, rescale, - weighted, censoring, min_pmix, range_shape1, +.ssd_hcp_ind <- function(x, value, ci, level, nboot, min_pboot, estimates, + data, rescale, + weighted, censoring, min_pmix, range_shape1, range_shape2, parametric, control, hc, save_to, samples, fun) { weight <- purrr::map_dbl(estimates, function(x) x$weight) - hcp <- purrr::map2(x, weight, .ssd_hcp_tmbfit, - value = value, ci = ci, level = level, nboot = nboot, - min_pboot = min_pboot, - data = data, rescale = rescale, weighted = weighted, censoring = censoring, - min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, - parametric = parametric, fix_weights = FALSE, average = FALSE, control = control, - hc = hc, save_to = save_to, samples = samples, fun = fun) + hcp <- purrr::map2(x, weight, .ssd_hcp_tmbfit, + value = value, ci = ci, level = level, nboot = nboot, + min_pboot = min_pboot, + data = data, rescale = rescale, weighted = weighted, censoring = censoring, + min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, + parametric = parametric, fix_weights = FALSE, average = FALSE, control = control, + hc = hc, save_to = save_to, samples = samples, fun = fun + ) method <- if (parametric) "parametric" else "non-parametric" - + hcp_ind(hcp, weight, method) } .ssd_hcp_multi <- function(x, value, ci, level, nboot, min_pboot, data, rescale, weighted, censoring, min_pmix, - range_shape1, range_shape2, parametric, control, + range_shape1, range_shape2, parametric, control, save_to, samples, fix_weights, hc) { estimates <- estimates(x, all_estimates = TRUE) dist <- "multi" fun <- fits_dists pars <- pars_fitdists(x) - - hcp <- .ssd_hcp(x, dist = dist, estimates = estimates, - fun = fun, pars = pars, - value = value, ci = ci, level = level, nboot = nboot, - min_pboot = min_pboot, - data = data, rescale = rescale, weighted = weighted, censoring = censoring, - min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, - parametric = parametric, control = control, save_to = save_to, - samples = samples, - hc = hc, fix_weights = fix_weights) + + hcp <- .ssd_hcp(x, + dist = dist, estimates = estimates, + fun = fun, pars = pars, + value = value, ci = ci, level = level, nboot = nboot, + min_pboot = min_pboot, + data = data, rescale = rescale, weighted = weighted, censoring = censoring, + min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, + parametric = parametric, control = control, save_to = save_to, + samples = samples, + hc = hc, fix_weights = fix_weights + ) hcp$dist <- "average" method <- if (parametric) "parametric" else "non-parametric" hcp$method <- method @@ -246,28 +252,29 @@ hcp_weighted <- function(hcp, level, samples, min_pboot) { .ssd_hcp_conventional <- function(x, value, ci, level, nboot, min_pboot, estimates, data, rescale, weighted, censoring, min_pmix, - range_shape1, range_shape2, parametric, control, + range_shape1, range_shape2, parametric, control, save_to, samples, fix_weights, hc, fun) { - if(ci & fix_weights) { + if(ci && fix_weights) { atleast1 <- round(glance(x)$weight * nboot) >= 1L x <- subset(x, names(x)[atleast1]) estimates <- estimates[atleast1] } weight <- purrr::map_dbl(estimates, function(x) x$weight) - hcp <- purrr::map2(x, weight, .ssd_hcp_tmbfit, - value = value, ci = ci, level = level, nboot = nboot, - min_pboot = min_pboot, - data = data, rescale = rescale, weighted = weighted, censoring = censoring, - min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, - parametric = parametric, fix_weights = fix_weights, average = TRUE, control = control, - hc = hc, save_to = save_to, samples = samples || fix_weights, fun = fun) - + hcp <- purrr::map2(x, weight, .ssd_hcp_tmbfit, + value = value, ci = ci, level = level, nboot = nboot, + min_pboot = min_pboot, + data = data, rescale = rescale, weighted = weighted, censoring = censoring, + min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, + parametric = parametric, fix_weights = fix_weights, average = TRUE, control = control, + hc = hc, save_to = save_to, samples = samples || fix_weights, fun = fun + ) + method <- if (parametric) "parametric" else "non-parametric" - - hcp <- hcp_average(hcp, weight, value, method, nboot) - if(!fix_weights) { - if(!samples) { + + hcp <- hcp_average(hcp, weight, value, method, nboot) + if (!fix_weights) { + if (!samples) { hcp$samples <- I(list(numeric(0))) } return(hcp) @@ -276,31 +283,30 @@ hcp_weighted <- function(hcp, level, samples, min_pboot) { } .ssd_hcp_fitdists <- function( - x, - value, - ci, - level, + x, + value, + ci, + level, nboot, - average, + average, multi_est, - min_pboot, - parametric, - multi_ci, + min_pboot, + parametric, + multi_ci, fix_weights, control, hc, save_to, samples, fun) { - if (!length(x) || !length(value)) { return(no_hcp()) } - + if (is.null(control)) { control <- .control_fitdists(x) } - + data <- .data_fitdists(x) rescale <- .rescale_fitdists(x) censoring <- .censoring_fitdists(x) @@ -311,97 +317,109 @@ hcp_weighted <- function(hcp, level, samples, min_pboot) { unequal <- .unequal_fitdists(x) estimates <- .list_estimates(x, all_estimates = FALSE) - if (parametric && ci && identical(censoring, c(NA_real_, NA_real_))) { - wrn("Parametric CIs cannot be calculated for inconsistently censored data.") + if (parametric && ci && !identical(censoring, c(0, Inf))) { + wrn("Parametric CIs cannot be calculated for censored data.") ci <- FALSE } - + if (parametric && ci && unequal) { wrn("Parametric CIs cannot be calculated for unequally weighted data.") ci <- FALSE } - + if (!ci) { nboot <- 0L } - - if(!average) { + + if (!average) { hcp <- .ssd_hcp_ind( - x, value = value, ci = ci, level = level, nboot = nboot, + x, + value = value, ci = ci, level = level, nboot = nboot, min_pboot = min_pboot, estimates = estimates, data = data, rescale = rescale, weighted = weighted, censoring = censoring, min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, parametric = parametric, control = control, - hc = hc, save_to = save_to, samples = samples, fun = fun) + hc = hc, save_to = save_to, samples = samples, fun = fun + ) return(hcp) } - if(.is_censored(censoring) & !identical_parameters(x)) { + if(.is_censored(censoring) && !identical_parameters(x)) { wrn("Model averaged estimates cannot be calculated for censored data when the distributions have different numbers of parameters.") } - - if(multi_ci) { + + if (multi_ci) { hcp <- .ssd_hcp_multi( - x, value, ci = ci, level = level, nboot = nboot, + x, value, + ci = ci, level = level, nboot = nboot, min_pboot = min_pboot, data = data, rescale = rescale, weighted = weighted, censoring = censoring, min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, parametric = parametric, control = control, save_to = save_to, samples = samples, - fix_weights = fix_weights, hc = hc) - - if(multi_est) { + fix_weights = fix_weights, hc = hc + ) + + if (multi_est) { return(hcp) } - + est <- .ssd_hcp_conventional( - x, value, ci = FALSE, level = level, nboot = nboot, + x, value, + ci = FALSE, level = level, nboot = nboot, min_pboot = min_pboot, estimates = estimates, data = data, rescale = rescale, weighted = weighted, censoring = censoring, min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, parametric = parametric, control = control, save_to = save_to, samples = samples, - fix_weights = fix_weights, hc = hc, fun = fun) - + fix_weights = fix_weights, hc = hc, fun = fun + ) + hcp <- replace_estimates(hcp, est) - + return(hcp) } - + hcp <- .ssd_hcp_conventional( - x, value, ci = ci, level = level, nboot = nboot, + x, value, + ci = ci, level = level, nboot = nboot, min_pboot = min_pboot, estimates = estimates, data = data, rescale = rescale, weighted = weighted, censoring = censoring, min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, parametric = parametric, control = control, save_to = save_to, samples = samples, - fix_weights = fix_weights, hc = hc, fun = fun) + fix_weights = fix_weights, hc = hc, fun = fun + ) - if(!multi_est) { - if(!fix_weights) { + if (!multi_est) { + if (!fix_weights) { return(hcp) } est <- .ssd_hcp_conventional( - x, value, ci = FALSE, level = level, nboot = nboot, + x, value, + ci = FALSE, level = level, nboot = nboot, min_pboot = min_pboot, estimates = estimates, data = data, rescale = rescale, weighted = weighted, censoring = censoring, min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, parametric = parametric, control = control, save_to = save_to, samples = samples, - fix_weights = fix_weights, hc = hc, fun = fun) + fix_weights = fix_weights, hc = hc, fun = fun + ) } else { est <- .ssd_hcp_multi( - x, value, ci = FALSE, level = level, nboot = nboot, + x, value, + ci = FALSE, level = level, nboot = nboot, min_pboot = min_pboot, data = data, rescale = rescale, weighted = weighted, censoring = censoring, min_pmix = min_pmix, range_shape1 = range_shape1, range_shape2 = range_shape2, parametric = parametric, control = control, save_to = save_to, samples = samples, - fix_weights = fix_weights, hc = hc) + fix_weights = fix_weights, hc = hc + ) } hcp <- replace_estimates(hcp, est) - + hcp } ssd_hcp_fitdists <- function( - x, - value, - ci, + x, + value, + ci, level, nboot, average, @@ -416,7 +434,6 @@ ssd_hcp_fitdists <- function( hc, fix_weights, fun = fit_tmb) { - chk_vector(value) chk_numeric(value) chk_flag(ci) @@ -437,16 +454,16 @@ ssd_hcp_fitdists <- function( chk_null_or(control, vld = vld_list) chk_null_or(save_to, vld = vld_dir) chk_flag(samples) - + x <- subset(x, delta = delta) - + hcp <- .ssd_hcp_fitdists( - x, + x, value = value, - ci = ci, - level = level, + ci = ci, + level = level, nboot = nboot, - average = average, + average = average, multi_est = multi_est, min_pboot = min_pboot, parametric = parametric, diff --git a/R/helpers.R b/R/helpers.R index d897e9be3..7a51d4b26 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -124,7 +124,9 @@ is_at_boundary <- function(fit, data, min_pmix = 0.5, range_shape1 = c(0.05, 20) geomid <- function(x) { x <- x[is.finite(x)] x <- x[x > 0] - if(!length(x)) return(1) + if (!length(x)) { + return(1) + } exp(mean(log(range(x)))) } diff --git a/R/hp.R b/R/hp.R index 528ba68da..6493b5cdf 100644 --- a/R/hp.R +++ b/R/hp.R @@ -15,7 +15,7 @@ #' Hazard Proportion #' #' Calculates proportion of species affected at specified concentration(s) -#' with quantile based bootstrap confidence intervals for +#' with quantile based bootstrap confidence intervals for #' individual or model-averaged distributions #' using parametric or non-parametric bootstrapping. #' For more information see the inverse function [`ssd_hc()`]. @@ -34,49 +34,47 @@ ssd_hp <- function(x, ...) { #' @describeIn ssd_hp Hazard Proportions for fitdists Object #' @export ssd_hp.fitdists <- function( - x, - conc = 1, + x, + conc = 1, average = TRUE, - ci = FALSE, - level = 0.95, + ci = FALSE, + level = 0.95, nboot = 1000, min_pboot = 0.95, multi_est = TRUE, ci_method = "weighted_samples", - parametric = TRUE, - delta = 9.21, + parametric = TRUE, + delta = 9.21, samples = FALSE, save_to = NULL, control = NULL, - ... -) { - + ...) { chk_vector(conc) chk_numeric(conc) chk_subset(ci_method, c("weighted_samples", "weighted_arithmetic", "multi_free", "multi_fixed")) - + chk_unused(...) - + fix_weights <- ci_method %in% c("weighted_samples", "multi_fixed") multi_ci <- ci_method %in% c("multi_free", "multi_fixed") - + hcp <- ssd_hcp_fitdists( - x = x, - value = conc, - ci = ci, - level = level, + x = x, + value = conc, + ci = ci, + level = level, nboot = nboot, - average = average, - multi_est = multi_est, - delta = delta, + average = average, + multi_est = multi_est, + delta = delta, min_pboot = min_pboot, - parametric = parametric, - multi_ci = multi_ci, + parametric = parametric, + multi_ci = multi_ci, fix_weights = fix_weights, - control = control, - save_to = save_to, - samples = samples, + control = control, + save_to = save_to, + samples = samples, hc = FALSE ) hcp <- dplyr::rename(hcp, conc = "value") @@ -87,19 +85,19 @@ ssd_hp.fitdists <- function( #' @describeIn ssd_hp Hazard Proportions for fitburrlioz Object #' @export #' @examples -#' +#' #' fit <- ssd_fit_burrlioz(ssddata::ccme_boron) #' ssd_hp(fit) ssd_hp.fitburrlioz <- function( - x, - conc = 1, - ci = FALSE, - level = 0.95, + x, + conc = 1, + ci = FALSE, + level = 0.95, nboot = 1000, - min_pboot = 0.95, - parametric = FALSE, + min_pboot = 0.95, + parametric = FALSE, samples = FALSE, - save_to = NULL, + save_to = NULL, ...) { chk_length(x, upper = 1L) chk_named(x) @@ -108,12 +106,12 @@ ssd_hp.fitburrlioz <- function( chk_numeric(conc) chk_flag(ci) chk_unused(...) - - fun <- if(names(x) == "burrIII3") fit_burrlioz else fit_tmb - - hcp <- ssd_hcp_fitdists ( + + fun <- if (names(x) == "burrIII3") fit_burrlioz else fit_tmb + + hcp <- ssd_hcp_fitdists( x = x, - value = conc, + value = conc, ci = ci, level = level, nboot = nboot, @@ -128,8 +126,9 @@ ssd_hp.fitburrlioz <- function( samples = samples, hc = FALSE, fix_weights = FALSE, - fun = fun) - + fun = fun + ) + hcp <- dplyr::rename(hcp, conc = "value") hcp } diff --git a/R/internal.R b/R/internal.R index d5fd5b785..7d38cd7bc 100644 --- a/R/internal.R +++ b/R/internal.R @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -identical_parameters <- function(x){ +identical_parameters <- function(x) { length(unique(npars(x))) < 2 } @@ -35,7 +35,7 @@ pow <- function(x, y) x^y root <- function(p, f) { q <- rep(NA_real_, length(p)) - for(i in seq_along(p)) { + for (i in seq_along(p)) { q[i] <- stats::uniroot(f, p = p[i], lower = 0, upper = 1, extendInt = "upX", tol = .Machine$double.eps)$root } q diff --git a/R/lgumbel.R b/R/lgumbel.R index 7d8a973b0..d18486b3a 100644 --- a/R/lgumbel.R +++ b/R/lgumbel.R @@ -20,7 +20,7 @@ #' @return A numeric vector. #' @export dlgumbel <- function(x, locationlog = 0, scalelog = 1, log = FALSE) { - lifecycle::deprecate_warn("1.0.0", "dlgumbel()") + lifecycle::deprecate_stop("1.0.0", "dlgumbel()") ddist("gumbel", x = x, location = locationlog, scale = scalelog, log = log, .lgt = TRUE @@ -53,7 +53,7 @@ ssd_elgumbel <- function() { #' @inheritParams params #' @export plgumbel <- function(q, locationlog = 0, scalelog = 1, lower.tail = TRUE, log.p = FALSE) { - lifecycle::deprecate_warn("1.0.0", "plgumbel()", "ssd_plgumbel()") + lifecycle::deprecate_stop("1.0.0", "plgumbel()", "ssd_plgumbel()") ssd_plgumbel(q, locationlog = locationlog, scalelog = scalelog, lower.tail = lower.tail, log.p = log.p @@ -77,7 +77,7 @@ ssd_qlgumbel <- function(p, locationlog = 0, scalelog = 1, lower.tail = TRUE, lo #' @inheritParams params #' @export qlgumbel <- function(p, locationlog = 0, scalelog = 1, lower.tail = TRUE, log.p = FALSE) { - lifecycle::deprecate_warn("1.0.0", "qlgumbel()", "ssd_qlgumbel()") + lifecycle::deprecate_stop("1.0.0", "qlgumbel()", "ssd_qlgumbel()") ssd_qlgumbel(p, locationlog = locationlog, scalelog = scalelog, lower.tail = lower.tail, log.p = log.p @@ -108,7 +108,7 @@ ssd_elgumbel <- function() { #' @inheritParams params #' @export rlgumbel <- function(n, locationlog = 0, scalelog = 1) { - lifecycle::deprecate_warn("1.0.0", "rlgumbel()", "ssd_rlgumbel()") + lifecycle::deprecate_stop("1.0.0", "rlgumbel()", "ssd_rlgumbel()") ssd_rlgumbel(n, locationlog = locationlog, scalelog = scalelog) } diff --git a/R/licensing.R b/R/licensing.R index aa42b2a25..9e01f0e5f 100644 --- a/R/licensing.R +++ b/R/licensing.R @@ -1,19 +1,19 @@ #' Licensing Markdown -#' -#' A string of markdown code indicating the licensing of the code +#' +#' A string of markdown code indicating the licensing of the code #' and documentation #' @export #' @examples #' ssd_licensing_md() ssd_licensing_md <- function() { -"## Licensing + "## Licensing Copyright 2018-2024 Province of British Columbia\\ Copyright 2021 Environment and Climate Change Canada\\ Copyright 2023-2024 Australian Government Department of Climate Change, Energy, the Environment and Water - + The documentation is released under the [CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/) - + The code is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) " diff --git a/R/llogis-llogis.R b/R/llogis-llogis.R index e69da6969..7167f9c9b 100644 --- a/R/llogis-llogis.R +++ b/R/llogis-llogis.R @@ -62,8 +62,10 @@ ssd_rllogis_llogis <- function(n, locationlog1 = 0, scalelog1 = 1, #' #' ssd_ellogis_llogis() ssd_ellogis_llogis <- function() { - list(locationlog1 = 0, scalelog1 = 1, - locationlog2 = 1, scalelog2 = 1, pmix = 0.5) + list( + locationlog1 = 0, scalelog1 = 1, + locationlog2 = 1, scalelog2 = 1, pmix = 0.5 + ) } sllogis_llogis <- function(data, pars = NULL) { @@ -123,12 +125,16 @@ rlogis_logis_ssd <- function(n, location1, scale1, location2, scale2, pmix) { pllogis_llogis_ssd <- function(q, locationlog1, scalelog1, locationlog2, scalelog2, pmix) { - plogis_logis_ssd(log(q), location1 = locationlog1, scale1 = scalelog1, - location2 = locationlog2, scale2 = scalelog2, pmix = pmix) + plogis_logis_ssd(log(q), + location1 = locationlog1, scale1 = scalelog1, + location2 = locationlog2, scale2 = scalelog2, pmix = pmix + ) } qllogis_llogis_ssd <- function(p, locationlog1, scalelog1, locationlog2, scalelog2, pmix) { - exp(qlogis_logis_ssd(p, location1 = locationlog1, scale1 = scalelog1, - location2 = locationlog2, scale2 = scalelog2, pmix = pmix)) + exp(qlogis_logis_ssd(p, + location1 = locationlog1, scale1 = scalelog1, + location2 = locationlog2, scale2 = scalelog2, pmix = pmix + )) } diff --git a/R/lnorm-lnorm.R b/R/lnorm-lnorm.R index 6a145483c..98410caa0 100644 --- a/R/lnorm-lnorm.R +++ b/R/lnorm-lnorm.R @@ -21,9 +21,9 @@ ssd_plnorm_lnorm <- function(q, meanlog1 = 0, sdlog1 = 1, meanlog2 = 1, sdlog2 = 1, pmix = 0.5, lower.tail = TRUE, log.p = FALSE) { pdist("lnorm_lnorm", - q = q, meanlog1 = meanlog1, sdlog1 = sdlog1, - meanlog2 = meanlog2, sdlog2 = sdlog2, pmix = pmix, - lower.tail = lower.tail, log.p = log.p + q = q, meanlog1 = meanlog1, sdlog1 = sdlog1, + meanlog2 = meanlog2, sdlog2 = sdlog2, pmix = pmix, + lower.tail = lower.tail, log.p = log.p ) } @@ -36,9 +36,9 @@ ssd_qlnorm_lnorm <- function(p, meanlog1 = 0, sdlog1 = 1, meanlog2 = 1, sdlog2 = 1, pmix = 0.5, lower.tail = TRUE, log.p = FALSE) { qdist("lnorm_lnorm", - p = p, meanlog1 = meanlog1, sdlog1 = sdlog1, - meanlog2 = meanlog2, sdlog2 = sdlog2, pmix = pmix, - lower.tail = lower.tail, log.p = log.p + p = p, meanlog1 = meanlog1, sdlog1 = sdlog1, + meanlog2 = meanlog2, sdlog2 = sdlog2, pmix = pmix, + lower.tail = lower.tail, log.p = log.p ) } @@ -51,8 +51,8 @@ ssd_qlnorm_lnorm <- function(p, meanlog1 = 0, sdlog1 = 1, ssd_rlnorm_lnorm <- function(n, meanlog1 = 0, sdlog1 = 1, meanlog2 = 1, sdlog2 = 1, pmix = 0.5, chk = TRUE) { rdist("lnorm_lnorm", - n = n, meanlog1 = meanlog1, sdlog1 = sdlog1, - meanlog2 = meanlog2, sdlog2 = sdlog2, pmix = pmix, chk = chk + n = n, meanlog1 = meanlog1, sdlog1 = sdlog1, + meanlog2 = meanlog2, sdlog2 = sdlog2, pmix = pmix, chk = chk ) } @@ -62,17 +62,19 @@ ssd_rlnorm_lnorm <- function(n, meanlog1 = 0, sdlog1 = 1, #' #' ssd_elnorm_lnorm() ssd_elnorm_lnorm <- function() { - list(meanlog1 = 0, sdlog1 = 1, - meanlog2 = 1, sdlog2 = 1, pmix = 0.5) + list( + meanlog1 = 0, sdlog1 = 1, + meanlog2 = 1, sdlog2 = 1, pmix = 0.5 + ) } slnorm_lnorm <- function(data, pars = NULL) { if (!is.null(pars)) { return(pars) } - + x <- mean_weighted_values(data) - + x <- sort(x) n <- length(x) n2 <- floor(n / 2) @@ -104,7 +106,7 @@ qlnorm_lnorm_ssd <- function(p, meanlog1, sdlog1, meanlog2, sdlog2, pmix) { if (sdlog1 <= 0 || sdlog2 <= 0 || pmix <= 0 || pmix >= 1) { return(NaN) } - + f <- function(x, p) { plnorm_lnorm_ssd(x, meanlog1, sdlog1, meanlog2, sdlog2, pmix) - p } diff --git a/R/lnorm.R b/R/lnorm.R index 2ded3da59..6ea4b4482 100644 --- a/R/lnorm.R +++ b/R/lnorm.R @@ -63,8 +63,8 @@ slnorm <- function(data, pars = NULL) { x <- mean_weighted_values(data) list( - meanlog = mean(log(x), na.rm = TRUE) * (1 + 1e-3), - log_sdlog = log(sd(log(x), na.rm = TRUE)) * (1 - 1e-3) + meanlog = mean(log(x), na.rm = TRUE) * (1 + 1e-2), + log_sdlog = log(sd(log(x), na.rm = TRUE)) * (1 - 1e-2) ) } diff --git a/R/min-pmix.R b/R/min-pmix.R index 7dc351bee..9d9ec748a 100644 --- a/R/min-pmix.R +++ b/R/min-pmix.R @@ -12,5 +12,5 @@ ssd_min_pmix <- function(n) { chk_whole_number(n) chk_gt(n) - max(min(3/n, 0.5), 0.1) + max(min(3 / n, 0.5), 0.1) } diff --git a/R/multi.R b/R/multi.R index 25fc0003b..6bb5d999f 100644 --- a/R/multi.R +++ b/R/multi.R @@ -1,4 +1,4 @@ -# Copyright 2023 Australian Government Department of +# Copyright 2023 Australian Government Department of # Climate Change, Energy, the Environment and Water # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,271 +16,271 @@ #' @describeIn ssd_p Cumulative Distribution Function for Multiple Distributions #' @export #' @examples -#' -#' # multi +#' +#' # multi #' ssd_pmulti(1) ssd_pmulti <- function( - q, - burrIII3.weight = 0, - burrIII3.shape1 = 1, - burrIII3.shape2 = 1, - burrIII3.scale = 1, - gamma.weight = 0, - gamma.shape = 1, - gamma.scale = 1, - gompertz.weight = 0, - gompertz.location = 1, - gompertz.shape = 1, - invpareto.weight = 0, - invpareto.shape = 3, - invpareto.scale = 1, - lgumbel.weight = 0, - lgumbel.locationlog = 0, - lgumbel.scalelog = 1, - llogis.weight = 0, - llogis.locationlog = 0, - llogis.scalelog = 1, - llogis_llogis.weight = 0, - llogis_llogis.locationlog1 = 0, - llogis_llogis.scalelog1 = 1, - llogis_llogis.locationlog2 = 1, - llogis_llogis.scalelog2 = 1, - llogis_llogis.pmix = 0.5, - lnorm.weight = 1, - lnorm.meanlog = 0, - lnorm.sdlog = 1, - lnorm_lnorm.weight = 0, - lnorm_lnorm.meanlog1 = 0, - lnorm_lnorm.sdlog1 = 1, - lnorm_lnorm.meanlog2 = 1, - lnorm_lnorm.sdlog2 = 1, - lnorm_lnorm.pmix = 0.5, - weibull.weight = 0, - weibull.shape = 1, - weibull.scale = 1, + q, + burrIII3.weight = 0, + burrIII3.shape1 = 1, + burrIII3.shape2 = 1, + burrIII3.scale = 1, + gamma.weight = 0, + gamma.shape = 1, + gamma.scale = 1, + gompertz.weight = 0, + gompertz.location = 1, + gompertz.shape = 1, + invpareto.weight = 0, + invpareto.shape = 3, + invpareto.scale = 1, + lgumbel.weight = 0, + lgumbel.locationlog = 0, + lgumbel.scalelog = 1, + llogis.weight = 0, + llogis.locationlog = 0, + llogis.scalelog = 1, + llogis_llogis.weight = 0, + llogis_llogis.locationlog1 = 0, + llogis_llogis.scalelog1 = 1, + llogis_llogis.locationlog2 = 1, + llogis_llogis.scalelog2 = 1, + llogis_llogis.pmix = 0.5, + lnorm.weight = 1, + lnorm.meanlog = 0, + lnorm.sdlog = 1, + lnorm_lnorm.weight = 0, + lnorm_lnorm.meanlog1 = 0, + lnorm_lnorm.sdlog1 = 1, + lnorm_lnorm.meanlog2 = 1, + lnorm_lnorm.sdlog2 = 1, + lnorm_lnorm.pmix = 0.5, + weibull.weight = 0, + weibull.shape = 1, + weibull.scale = 1, lower.tail = TRUE, log.p = FALSE) { pdist("multi", - q = q, - burrIII3.weight = burrIII3.weight, - burrIII3.shape1 = burrIII3.shape1, - burrIII3.shape2 = burrIII3.shape2, - burrIII3.scale = burrIII3.scale, - gamma.weight = gamma.weight, - gamma.shape = gamma.shape, - gamma.scale = gamma.scale, - gompertz.weight = gompertz.weight, - gompertz.location = gompertz.location, - gompertz.shape = gompertz.shape, - invpareto.weight = invpareto.weight, - invpareto.shape = invpareto.shape, - invpareto.scale = invpareto.scale, - lgumbel.weight = lgumbel.weight, - lgumbel.locationlog = lgumbel.locationlog, - lgumbel.scalelog = lgumbel.scalelog, - llogis.weight = llogis.weight, - llogis.locationlog = llogis.locationlog, - llogis.scalelog = llogis.scalelog, - llogis_llogis.weight = llogis_llogis.weight, - llogis_llogis.locationlog1 = llogis_llogis.locationlog1, - llogis_llogis.scalelog1 = llogis_llogis.scalelog1, - llogis_llogis.locationlog2 = llogis_llogis.locationlog2, - llogis_llogis.scalelog2 = llogis_llogis.scalelog2, - llogis_llogis.pmix = llogis_llogis.pmix, - lnorm.weight = lnorm.weight, - lnorm.meanlog = lnorm.meanlog, - lnorm.sdlog = lnorm.sdlog, - lnorm_lnorm.weight = lnorm_lnorm.weight, - lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, - lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, - lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, - lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, - lnorm_lnorm.pmix = lnorm_lnorm.pmix, - weibull.weight = weibull.weight, - weibull.shape = weibull.shape, - weibull.scale = weibull.scale, - lower.tail = lower.tail, log.p = log.p + q = q, + burrIII3.weight = burrIII3.weight, + burrIII3.shape1 = burrIII3.shape1, + burrIII3.shape2 = burrIII3.shape2, + burrIII3.scale = burrIII3.scale, + gamma.weight = gamma.weight, + gamma.shape = gamma.shape, + gamma.scale = gamma.scale, + gompertz.weight = gompertz.weight, + gompertz.location = gompertz.location, + gompertz.shape = gompertz.shape, + invpareto.weight = invpareto.weight, + invpareto.shape = invpareto.shape, + invpareto.scale = invpareto.scale, + lgumbel.weight = lgumbel.weight, + lgumbel.locationlog = lgumbel.locationlog, + lgumbel.scalelog = lgumbel.scalelog, + llogis.weight = llogis.weight, + llogis.locationlog = llogis.locationlog, + llogis.scalelog = llogis.scalelog, + llogis_llogis.weight = llogis_llogis.weight, + llogis_llogis.locationlog1 = llogis_llogis.locationlog1, + llogis_llogis.scalelog1 = llogis_llogis.scalelog1, + llogis_llogis.locationlog2 = llogis_llogis.locationlog2, + llogis_llogis.scalelog2 = llogis_llogis.scalelog2, + llogis_llogis.pmix = llogis_llogis.pmix, + lnorm.weight = lnorm.weight, + lnorm.meanlog = lnorm.meanlog, + lnorm.sdlog = lnorm.sdlog, + lnorm_lnorm.weight = lnorm_lnorm.weight, + lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, + lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, + lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, + lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, + lnorm_lnorm.pmix = lnorm_lnorm.pmix, + weibull.weight = weibull.weight, + weibull.shape = weibull.shape, + weibull.scale = weibull.scale, + lower.tail = lower.tail, log.p = log.p ) } #' @describeIn ssd_q Quantile Function for Multiple Distributions #' @export #' @examples -#' -#' # multi +#' +#' # multi #' ssd_qmulti(0.5) ssd_qmulti <- function( - p, - burrIII3.weight = 0, - burrIII3.shape1 = 1, - burrIII3.shape2 = 1, - burrIII3.scale = 1, - gamma.weight = 0, - gamma.shape = 1, - gamma.scale = 1, - gompertz.weight = 0, - gompertz.location = 1, - gompertz.shape = 1, - invpareto.weight = 0, - invpareto.shape = 3, - invpareto.scale = 1, - lgumbel.weight = 0, - lgumbel.locationlog = 0, - lgumbel.scalelog = 1, - llogis.weight = 0, - llogis.locationlog = 0, - llogis.scalelog = 1, - llogis_llogis.weight = 0, - llogis_llogis.locationlog1 = 0, - llogis_llogis.scalelog1 = 1, - llogis_llogis.locationlog2 = 1, - llogis_llogis.scalelog2 = 1, - llogis_llogis.pmix = 0.5, - lnorm.weight = 1, - lnorm.meanlog = 0, - lnorm.sdlog = 1, - lnorm_lnorm.weight = 0, - lnorm_lnorm.meanlog1 = 0, - lnorm_lnorm.sdlog1 = 1, - lnorm_lnorm.meanlog2 = 1, - lnorm_lnorm.sdlog2 = 1, - lnorm_lnorm.pmix = 0.5, - weibull.weight = 0, - weibull.shape = 1, - weibull.scale = 1, + p, + burrIII3.weight = 0, + burrIII3.shape1 = 1, + burrIII3.shape2 = 1, + burrIII3.scale = 1, + gamma.weight = 0, + gamma.shape = 1, + gamma.scale = 1, + gompertz.weight = 0, + gompertz.location = 1, + gompertz.shape = 1, + invpareto.weight = 0, + invpareto.shape = 3, + invpareto.scale = 1, + lgumbel.weight = 0, + lgumbel.locationlog = 0, + lgumbel.scalelog = 1, + llogis.weight = 0, + llogis.locationlog = 0, + llogis.scalelog = 1, + llogis_llogis.weight = 0, + llogis_llogis.locationlog1 = 0, + llogis_llogis.scalelog1 = 1, + llogis_llogis.locationlog2 = 1, + llogis_llogis.scalelog2 = 1, + llogis_llogis.pmix = 0.5, + lnorm.weight = 1, + lnorm.meanlog = 0, + lnorm.sdlog = 1, + lnorm_lnorm.weight = 0, + lnorm_lnorm.meanlog1 = 0, + lnorm_lnorm.sdlog1 = 1, + lnorm_lnorm.meanlog2 = 1, + lnorm_lnorm.sdlog2 = 1, + lnorm_lnorm.pmix = 0.5, + weibull.weight = 0, + weibull.shape = 1, + weibull.scale = 1, lower.tail = TRUE, log.p = FALSE) { qdist("multi", - p = p, - burrIII3.weight = burrIII3.weight, - burrIII3.shape1 = burrIII3.shape1, - burrIII3.shape2 = burrIII3.shape2, - burrIII3.scale = burrIII3.scale, - gamma.weight = gamma.weight, - gamma.shape = gamma.shape, - gamma.scale = gamma.scale, - gompertz.weight = gompertz.weight, - gompertz.location = gompertz.location, - gompertz.shape = gompertz.shape, - invpareto.weight = invpareto.weight, - invpareto.shape = invpareto.shape, - invpareto.scale = invpareto.scale, - lgumbel.weight = lgumbel.weight, - lgumbel.locationlog = lgumbel.locationlog, - lgumbel.scalelog = lgumbel.scalelog, - llogis.weight = llogis.weight, - llogis.locationlog = llogis.locationlog, - llogis.scalelog = llogis.scalelog, - llogis_llogis.weight = llogis_llogis.weight, - llogis_llogis.locationlog1 = llogis_llogis.locationlog1, - llogis_llogis.scalelog1 = llogis_llogis.scalelog1, - llogis_llogis.locationlog2 = llogis_llogis.locationlog2, - llogis_llogis.scalelog2 = llogis_llogis.scalelog2, - llogis_llogis.pmix = llogis_llogis.pmix, - lnorm.weight = lnorm.weight, - lnorm.meanlog = lnorm.meanlog, - lnorm.sdlog = lnorm.sdlog, - lnorm_lnorm.weight = lnorm_lnorm.weight, - lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, - lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, - lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, - lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, - lnorm_lnorm.pmix = lnorm_lnorm.pmix, - weibull.weight = weibull.weight, - weibull.shape = weibull.shape, - weibull.scale = weibull.scale, - lower.tail = lower.tail, log.p = log.p + p = p, + burrIII3.weight = burrIII3.weight, + burrIII3.shape1 = burrIII3.shape1, + burrIII3.shape2 = burrIII3.shape2, + burrIII3.scale = burrIII3.scale, + gamma.weight = gamma.weight, + gamma.shape = gamma.shape, + gamma.scale = gamma.scale, + gompertz.weight = gompertz.weight, + gompertz.location = gompertz.location, + gompertz.shape = gompertz.shape, + invpareto.weight = invpareto.weight, + invpareto.shape = invpareto.shape, + invpareto.scale = invpareto.scale, + lgumbel.weight = lgumbel.weight, + lgumbel.locationlog = lgumbel.locationlog, + lgumbel.scalelog = lgumbel.scalelog, + llogis.weight = llogis.weight, + llogis.locationlog = llogis.locationlog, + llogis.scalelog = llogis.scalelog, + llogis_llogis.weight = llogis_llogis.weight, + llogis_llogis.locationlog1 = llogis_llogis.locationlog1, + llogis_llogis.scalelog1 = llogis_llogis.scalelog1, + llogis_llogis.locationlog2 = llogis_llogis.locationlog2, + llogis_llogis.scalelog2 = llogis_llogis.scalelog2, + llogis_llogis.pmix = llogis_llogis.pmix, + lnorm.weight = lnorm.weight, + lnorm.meanlog = lnorm.meanlog, + lnorm.sdlog = lnorm.sdlog, + lnorm_lnorm.weight = lnorm_lnorm.weight, + lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, + lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, + lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, + lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, + lnorm_lnorm.pmix = lnorm_lnorm.pmix, + weibull.weight = weibull.weight, + weibull.shape = weibull.shape, + weibull.scale = weibull.scale, + lower.tail = lower.tail, log.p = log.p ) } #' @describeIn ssd_r Random Generation for Multiple Distributions #' @export #' @examples -#' -#' # multi +#' +#' # multi #' set.seed(50) #' hist(ssd_rmulti(1000), breaks = 100) -#' +#' #' fits <- ssd_fit_dists(ssddata::ccme_boron) #' do.call("ssd_rmulti", c(n = 10, estimates(fits))) ssd_rmulti <- function( - n, - burrIII3.weight = 0, - burrIII3.shape1 = 1, - burrIII3.shape2 = 1, - burrIII3.scale = 1, - gamma.weight = 0, - gamma.shape = 1, - gamma.scale = 1, - gompertz.weight = 0, - gompertz.location = 1, - gompertz.shape = 1, - invpareto.weight = 0, - invpareto.shape = 3, - invpareto.scale = 1, - lgumbel.weight = 0, - lgumbel.locationlog = 0, - lgumbel.scalelog = 1, - llogis.weight = 0, - llogis.locationlog = 0, - llogis.scalelog = 1, - llogis_llogis.weight = 0, - llogis_llogis.locationlog1 = 0, - llogis_llogis.scalelog1 = 1, - llogis_llogis.locationlog2 = 1, - llogis_llogis.scalelog2 = 1, - llogis_llogis.pmix = 0.5, - lnorm.weight = 1, - lnorm.meanlog = 0, - lnorm.sdlog = 1, - lnorm_lnorm.weight = 0, - lnorm_lnorm.meanlog1 = 0, - lnorm_lnorm.sdlog1 = 1, - lnorm_lnorm.meanlog2 = 1, - lnorm_lnorm.sdlog2 = 1, - lnorm_lnorm.pmix = 0.5, - weibull.weight = 0, - weibull.shape = 1, - weibull.scale = 1, + n, + burrIII3.weight = 0, + burrIII3.shape1 = 1, + burrIII3.shape2 = 1, + burrIII3.scale = 1, + gamma.weight = 0, + gamma.shape = 1, + gamma.scale = 1, + gompertz.weight = 0, + gompertz.location = 1, + gompertz.shape = 1, + invpareto.weight = 0, + invpareto.shape = 3, + invpareto.scale = 1, + lgumbel.weight = 0, + lgumbel.locationlog = 0, + lgumbel.scalelog = 1, + llogis.weight = 0, + llogis.locationlog = 0, + llogis.scalelog = 1, + llogis_llogis.weight = 0, + llogis_llogis.locationlog1 = 0, + llogis_llogis.scalelog1 = 1, + llogis_llogis.locationlog2 = 1, + llogis_llogis.scalelog2 = 1, + llogis_llogis.pmix = 0.5, + lnorm.weight = 1, + lnorm.meanlog = 0, + lnorm.sdlog = 1, + lnorm_lnorm.weight = 0, + lnorm_lnorm.meanlog1 = 0, + lnorm_lnorm.sdlog1 = 1, + lnorm_lnorm.meanlog2 = 1, + lnorm_lnorm.sdlog2 = 1, + lnorm_lnorm.pmix = 0.5, + weibull.weight = 0, + weibull.shape = 1, + weibull.scale = 1, chk = TRUE) { rdist("multi", - n = n, - burrIII3.weight = burrIII3.weight, - burrIII3.shape1 = burrIII3.shape1, - burrIII3.shape2 = burrIII3.shape2, - burrIII3.scale = burrIII3.scale, - gamma.weight = gamma.weight, - gamma.shape = gamma.shape, - gamma.scale = gamma.scale, - gompertz.weight = gompertz.weight, - gompertz.location = gompertz.location, - gompertz.shape = gompertz.shape, - invpareto.weight = invpareto.weight, - invpareto.shape = invpareto.shape, - invpareto.scale = invpareto.scale, - lgumbel.weight = lgumbel.weight, - lgumbel.locationlog = lgumbel.locationlog, - lgumbel.scalelog = lgumbel.scalelog, - llogis.weight = llogis.weight, - llogis.locationlog = llogis.locationlog, - llogis.scalelog = llogis.scalelog, - llogis_llogis.weight = llogis_llogis.weight, - llogis_llogis.locationlog1 = llogis_llogis.locationlog1, - llogis_llogis.scalelog1 = llogis_llogis.scalelog1, - llogis_llogis.locationlog2 = llogis_llogis.locationlog2, - llogis_llogis.scalelog2 = llogis_llogis.scalelog2, - llogis_llogis.pmix = llogis_llogis.pmix, - lnorm.weight = lnorm.weight, - lnorm.meanlog = lnorm.meanlog, - lnorm.sdlog = lnorm.sdlog, - lnorm_lnorm.weight = lnorm_lnorm.weight, - lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, - lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, - lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, - lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, - lnorm_lnorm.pmix = lnorm_lnorm.pmix, - weibull.weight = weibull.weight, - weibull.shape = weibull.shape, - weibull.scale = weibull.scale, - chk = chk + n = n, + burrIII3.weight = burrIII3.weight, + burrIII3.shape1 = burrIII3.shape1, + burrIII3.shape2 = burrIII3.shape2, + burrIII3.scale = burrIII3.scale, + gamma.weight = gamma.weight, + gamma.shape = gamma.shape, + gamma.scale = gamma.scale, + gompertz.weight = gompertz.weight, + gompertz.location = gompertz.location, + gompertz.shape = gompertz.shape, + invpareto.weight = invpareto.weight, + invpareto.shape = invpareto.shape, + invpareto.scale = invpareto.scale, + lgumbel.weight = lgumbel.weight, + lgumbel.locationlog = lgumbel.locationlog, + lgumbel.scalelog = lgumbel.scalelog, + llogis.weight = llogis.weight, + llogis.locationlog = llogis.locationlog, + llogis.scalelog = llogis.scalelog, + llogis_llogis.weight = llogis_llogis.weight, + llogis_llogis.locationlog1 = llogis_llogis.locationlog1, + llogis_llogis.scalelog1 = llogis_llogis.scalelog1, + llogis_llogis.locationlog2 = llogis_llogis.locationlog2, + llogis_llogis.scalelog2 = llogis_llogis.scalelog2, + llogis_llogis.pmix = llogis_llogis.pmix, + lnorm.weight = lnorm.weight, + lnorm.meanlog = lnorm.meanlog, + lnorm.sdlog = lnorm.sdlog, + lnorm_lnorm.weight = lnorm_lnorm.weight, + lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, + lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, + lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, + lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, + lnorm_lnorm.pmix = lnorm_lnorm.pmix, + weibull.weight = weibull.weight, + weibull.shape = weibull.shape, + weibull.scale = weibull.scale, + chk = chk ) } @@ -306,7 +306,7 @@ ssd_emulti <- function() { args <- estimates(fitdists, all_estimates = TRUE) args$p <- p args$lower.tail <- lower.tail - args$log.p <- log.p + args$log.p <- log.p do.call("ssd_qmulti", args) } @@ -324,8 +324,11 @@ emulti_ssd <- function() { names(es) <- dists es <- purrr::map(es, function(x) c(list(weight = 0), x)) dists_bcanz <- ssd_dists_bcanz() - wt <- 1/length(dists_bcanz) - purrr::map_if(es, dists %in% dists_bcanz, function(x) {x$weight <- wt; x}) + wt <- 1 / length(dists_bcanz) + purrr::map_if(es, dists %in% dists_bcanz, function(x) { + x$weight <- wt + x + }) } value_args <- function(x) { @@ -349,12 +352,15 @@ pmulti_fun <- function(list) { normalize_weights <- function(list) { dlist <- purrr::keep(list, function(x) !is.na(x$weight) && x$weight > 0) - if(!length(dlist)) { + if (!length(dlist)) { err("At least one distribution must have a positive weight.") } weights <- purrr::map_dbl(dlist, function(x) x$weight) wts <- weights / sum(weights) - wlist <- purrr::map2(dlist, wts, function(x, wt) { x$weight <- wt; x}) + wlist <- purrr::map2(dlist, wts, function(x, wt) { + x$weight <- wt + x + }) wlist } @@ -366,14 +372,14 @@ pmulti_list <- function(q, list) { qmulti_list <- function(p, list) { nlist <- normalize_weights(list) - + f <- pmulti_fun(nlist) root(p, f) } pmulti_ssd <- function( q, - burrIII3.weight, + burrIII3.weight, burrIII3.shape1, burrIII3.shape2, burrIII3.scale, @@ -411,50 +417,53 @@ pmulti_ssd <- function( weibull.shape, weibull.scale) { list <- .relist_estimates( - list(burrIII3.weight = burrIII3.weight, - burrIII3.shape1 = burrIII3.shape1, - burrIII3.shape2 = burrIII3.shape2, - burrIII3.scale = burrIII3.scale, - gamma.weight = gamma.weight, - gamma.shape = gamma.shape, - gamma.scale = gamma.scale, - gompertz.weight = gompertz.weight, - gompertz.location = gompertz.location, - gompertz.shape = gompertz.shape, - invpareto.weight = invpareto.weight, - invpareto.shape = invpareto.shape, - invpareto.scale = invpareto.scale, - lgumbel.weight = lgumbel.weight, - lgumbel.locationlog = lgumbel.locationlog, - lgumbel.scalelog = lgumbel.scalelog, - llogis.weight = llogis.weight, - llogis.locationlog = llogis.locationlog, - llogis.scalelog = llogis.scalelog, - llogis_llogis.weight = llogis_llogis.weight, - llogis_llogis.locationlog1 = llogis_llogis.locationlog1, - llogis_llogis.scalelog1 = llogis_llogis.scalelog1, - llogis_llogis.locationlog2 = llogis_llogis.locationlog2, - llogis_llogis.scalelog2 = llogis_llogis.scalelog2, - llogis_llogis.pmix = llogis_llogis.pmix, - lnorm.weight = lnorm.weight, - lnorm.meanlog = lnorm.meanlog, - lnorm.sdlog = lnorm.sdlog, - lnorm_lnorm.weight = lnorm_lnorm.weight, - lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, - lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, - lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, - lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, - lnorm_lnorm.pmix = lnorm_lnorm.pmix, - weibull.weight = weibull.weight, - weibull.shape = weibull.shape, - weibull.scale = weibull.scale)) - + list( + burrIII3.weight = burrIII3.weight, + burrIII3.shape1 = burrIII3.shape1, + burrIII3.shape2 = burrIII3.shape2, + burrIII3.scale = burrIII3.scale, + gamma.weight = gamma.weight, + gamma.shape = gamma.shape, + gamma.scale = gamma.scale, + gompertz.weight = gompertz.weight, + gompertz.location = gompertz.location, + gompertz.shape = gompertz.shape, + invpareto.weight = invpareto.weight, + invpareto.shape = invpareto.shape, + invpareto.scale = invpareto.scale, + lgumbel.weight = lgumbel.weight, + lgumbel.locationlog = lgumbel.locationlog, + lgumbel.scalelog = lgumbel.scalelog, + llogis.weight = llogis.weight, + llogis.locationlog = llogis.locationlog, + llogis.scalelog = llogis.scalelog, + llogis_llogis.weight = llogis_llogis.weight, + llogis_llogis.locationlog1 = llogis_llogis.locationlog1, + llogis_llogis.scalelog1 = llogis_llogis.scalelog1, + llogis_llogis.locationlog2 = llogis_llogis.locationlog2, + llogis_llogis.scalelog2 = llogis_llogis.scalelog2, + llogis_llogis.pmix = llogis_llogis.pmix, + lnorm.weight = lnorm.weight, + lnorm.meanlog = lnorm.meanlog, + lnorm.sdlog = lnorm.sdlog, + lnorm_lnorm.weight = lnorm_lnorm.weight, + lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, + lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, + lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, + lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, + lnorm_lnorm.pmix = lnorm_lnorm.pmix, + weibull.weight = weibull.weight, + weibull.shape = weibull.shape, + weibull.scale = weibull.scale + ) + ) + pmulti_list(q, list) } qmulti_ssd <- function( q, - burrIII3.weight, + burrIII3.weight, burrIII3.shape1, burrIII3.shape2, burrIII3.scale, @@ -491,52 +500,54 @@ qmulti_ssd <- function( weibull.weight, weibull.shape, weibull.scale) { - list <- .relist_estimates( - list(burrIII3.weight = burrIII3.weight, - burrIII3.shape1 = burrIII3.shape1, - burrIII3.shape2 = burrIII3.shape2, - burrIII3.scale = burrIII3.scale, - gamma.weight = gamma.weight, - gamma.shape = gamma.shape, - gamma.scale = gamma.scale, - gompertz.weight = gompertz.weight, - gompertz.location = gompertz.location, - gompertz.shape = gompertz.shape, - invpareto.weight = invpareto.weight, - invpareto.shape = invpareto.shape, - invpareto.scale = invpareto.scale, - lgumbel.weight = lgumbel.weight, - lgumbel.locationlog = lgumbel.locationlog, - lgumbel.scalelog = lgumbel.scalelog, - llogis.weight = llogis.weight, - llogis.locationlog = llogis.locationlog, - llogis.scalelog = llogis.scalelog, - llogis_llogis.weight = llogis_llogis.weight, - llogis_llogis.locationlog1 = llogis_llogis.locationlog1, - llogis_llogis.scalelog1 = llogis_llogis.scalelog1, - llogis_llogis.locationlog2 = llogis_llogis.locationlog2, - llogis_llogis.scalelog2 = llogis_llogis.scalelog2, - llogis_llogis.pmix = llogis_llogis.pmix, - lnorm.weight = lnorm.weight, - lnorm.meanlog = lnorm.meanlog, - lnorm.sdlog = lnorm.sdlog, - lnorm_lnorm.weight = lnorm_lnorm.weight, - lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, - lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, - lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, - lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, - lnorm_lnorm.pmix = lnorm_lnorm.pmix, - weibull.weight = weibull.weight, - weibull.shape = weibull.shape, - weibull.scale = weibull.scale)) - + list( + burrIII3.weight = burrIII3.weight, + burrIII3.shape1 = burrIII3.shape1, + burrIII3.shape2 = burrIII3.shape2, + burrIII3.scale = burrIII3.scale, + gamma.weight = gamma.weight, + gamma.shape = gamma.shape, + gamma.scale = gamma.scale, + gompertz.weight = gompertz.weight, + gompertz.location = gompertz.location, + gompertz.shape = gompertz.shape, + invpareto.weight = invpareto.weight, + invpareto.shape = invpareto.shape, + invpareto.scale = invpareto.scale, + lgumbel.weight = lgumbel.weight, + lgumbel.locationlog = lgumbel.locationlog, + lgumbel.scalelog = lgumbel.scalelog, + llogis.weight = llogis.weight, + llogis.locationlog = llogis.locationlog, + llogis.scalelog = llogis.scalelog, + llogis_llogis.weight = llogis_llogis.weight, + llogis_llogis.locationlog1 = llogis_llogis.locationlog1, + llogis_llogis.scalelog1 = llogis_llogis.scalelog1, + llogis_llogis.locationlog2 = llogis_llogis.locationlog2, + llogis_llogis.scalelog2 = llogis_llogis.scalelog2, + llogis_llogis.pmix = llogis_llogis.pmix, + lnorm.weight = lnorm.weight, + lnorm.meanlog = lnorm.meanlog, + lnorm.sdlog = lnorm.sdlog, + lnorm_lnorm.weight = lnorm_lnorm.weight, + lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, + lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, + lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, + lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, + lnorm_lnorm.pmix = lnorm_lnorm.pmix, + weibull.weight = weibull.weight, + weibull.shape = weibull.shape, + weibull.scale = weibull.scale + ) + ) + qmulti_list(q, list) } rmulti_ssd <- function( - n, - burrIII3.weight, + n, + burrIII3.weight, burrIII3.shape1, burrIII3.shape2, burrIII3.scale, @@ -574,44 +585,47 @@ rmulti_ssd <- function( weibull.shape, weibull.scale) { p <- runif(n) - + list <- .relist_estimates( - list(burrIII3.weight = burrIII3.weight, - burrIII3.shape1 = burrIII3.shape1, - burrIII3.shape2 = burrIII3.shape2, - burrIII3.scale = burrIII3.scale, - gamma.weight = gamma.weight, - gamma.shape = gamma.shape, - gamma.scale = gamma.scale, - gompertz.weight = gompertz.weight, - gompertz.location = gompertz.location, - gompertz.shape = gompertz.shape, - invpareto.weight = invpareto.weight, - invpareto.shape = invpareto.shape, - invpareto.scale = invpareto.scale, - lgumbel.weight = lgumbel.weight, - lgumbel.locationlog = lgumbel.locationlog, - lgumbel.scalelog = lgumbel.scalelog, - llogis.weight = llogis.weight, - llogis.locationlog = llogis.locationlog, - llogis.scalelog = llogis.scalelog, - llogis_llogis.weight = llogis_llogis.weight, - llogis_llogis.locationlog1 = llogis_llogis.locationlog1, - llogis_llogis.scalelog1 = llogis_llogis.scalelog1, - llogis_llogis.locationlog2 = llogis_llogis.locationlog2, - llogis_llogis.scalelog2 = llogis_llogis.scalelog2, - llogis_llogis.pmix = llogis_llogis.pmix, - lnorm.weight = lnorm.weight, - lnorm.meanlog = lnorm.meanlog, - lnorm.sdlog = lnorm.sdlog, - lnorm_lnorm.weight = lnorm_lnorm.weight, - lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, - lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, - lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, - lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, - lnorm_lnorm.pmix = lnorm_lnorm.pmix, - weibull.weight = weibull.weight, - weibull.shape = weibull.shape, - weibull.scale = weibull.scale)) + list( + burrIII3.weight = burrIII3.weight, + burrIII3.shape1 = burrIII3.shape1, + burrIII3.shape2 = burrIII3.shape2, + burrIII3.scale = burrIII3.scale, + gamma.weight = gamma.weight, + gamma.shape = gamma.shape, + gamma.scale = gamma.scale, + gompertz.weight = gompertz.weight, + gompertz.location = gompertz.location, + gompertz.shape = gompertz.shape, + invpareto.weight = invpareto.weight, + invpareto.shape = invpareto.shape, + invpareto.scale = invpareto.scale, + lgumbel.weight = lgumbel.weight, + lgumbel.locationlog = lgumbel.locationlog, + lgumbel.scalelog = lgumbel.scalelog, + llogis.weight = llogis.weight, + llogis.locationlog = llogis.locationlog, + llogis.scalelog = llogis.scalelog, + llogis_llogis.weight = llogis_llogis.weight, + llogis_llogis.locationlog1 = llogis_llogis.locationlog1, + llogis_llogis.scalelog1 = llogis_llogis.scalelog1, + llogis_llogis.locationlog2 = llogis_llogis.locationlog2, + llogis_llogis.scalelog2 = llogis_llogis.scalelog2, + llogis_llogis.pmix = llogis_llogis.pmix, + lnorm.weight = lnorm.weight, + lnorm.meanlog = lnorm.meanlog, + lnorm.sdlog = lnorm.sdlog, + lnorm_lnorm.weight = lnorm_lnorm.weight, + lnorm_lnorm.meanlog1 = lnorm_lnorm.meanlog1, + lnorm_lnorm.sdlog1 = lnorm_lnorm.sdlog1, + lnorm_lnorm.meanlog2 = lnorm_lnorm.meanlog2, + lnorm_lnorm.sdlog2 = lnorm_lnorm.sdlog2, + lnorm_lnorm.pmix = lnorm_lnorm.pmix, + weibull.weight = weibull.weight, + weibull.shape = weibull.shape, + weibull.scale = weibull.scale + ) + ) qmulti_list(p, list) } diff --git a/R/params.R b/R/params.R index 95f0565be..2afead853 100644 --- a/R/params.R +++ b/R/params.R @@ -19,13 +19,15 @@ #' @param at_boundary_ok A flag specifying whether a model with one or more #' parameters at the boundary should be considered to have converged (default = FALSE). #' @param average A flag specifying whether to provide model averaged values as opposed to a value for each distribution. -#' @param bcanz A flag or NULL specifying whether to only include distributions in the set that is approved by BC, Canada, Australia and New Zealand for official guidelines. +#' @param bcanz A flag or NULL specifying whether to only include distributions in the set that is approved by BC, Canada, Australia and New Zealand for official guidelines. +#' @param big.mark A string specifying used between every 3 digits to separate thousands on the x-axis. #' @param breaks A character vector #' @param bounds A named non-negative numeric vector of the left and right bounds for #' uncensored missing (0 and Inf) data in terms of the orders of magnitude #' relative to the extremes for non-missing values. #' @param chk A flag specifying whether to check the arguments. #' @param ci A flag specifying whether to estimate confidence intervals (by bootstrapping). +#' @param censoring A numeric vector of the left and right censoring values. #' @param color A string of the column in data for the color aesthetic. #' @param computable A flag specifying whether to only return fits with numerically computable standard errors. #' @param conc A numeric vector of concentrations to calculate the hazard proportions for. @@ -56,17 +58,17 @@ #' @param meanlog mean on log scale parameter. #' @param meanlog1 mean on log scale parameter. #' @param meanlog2 mean on log scale parameter. -#' @param min_pboot A number between 0 and 1 of the minimum -#' proportion of bootstrap samples that must successfully fit (return a likelihood) +#' @param min_pboot A number between 0 and 1 of the minimum +#' proportion of bootstrap samples that must successfully fit (return a likelihood) #' to report the confidence intervals. #' @param min_pmix A number between 0 and 0.5 specifying the minimum proportion in mixture models. #' @param n A whole number of the effective number of rows of data. #' @param npars A whole numeric vector specifying which distributions to include based on the number of parameters. #' @param all_estimates A flag specifying whether to calculate estimates for all implemented distributions. -#' @param ci_method A string specifying which method to use for estimating the bootstrap values. +#' @param ci_method A string specifying which method to use for estimating the bootstrap values. #' Possible values are "multi_free" and "multi_fixed" which treat the distributions as constituting a single distribution but differ in whether the model weights are fixed and "weighted_samples" and "weighted_arithmetic" take bootstrap samples from each distribution proportional to its weight versus calculating the weighted arithmetic means of the lower and upper confidence limits. #' @param multi_est A flag specifying whether to treat the distributions as constituting a single distribution (as opposed to taking the mean) when calculating model averaged estimates. -#' @param na.rm A flag specifying whether to silently remove missing values or +#' @param na.rm A flag specifying whether to silently remove missing values or #' remove them with a warning. #' @param n positive number of observations. #' @param nboot A count of the number of bootstrap samples to use to estimate the confidence limits. A value of 10,000 is recommended for official guidelines. @@ -89,7 +91,7 @@ #' @param ribbon A flag indicating whether to plot the confidence interval as a grey ribbon as opposed to green solid lines. #' @param right A string of the column in data with the right concentration values. #' @param save_to NULL or a string specifying a directory to save where the bootstrap datasets and parameter estimates (when successfully converged) to. -#' @param samples A flag specfying whether to include a numeric vector of the bootstrap samples as a list column in the output. +#' @param samples A flag specfying whether to include a numeric vector of the bootstrap samples as a list column in the output. #' @param scale scale parameter. #' @param scalelog1 scalelog1 parameter. #' @param scalelog2 scalelog2 parameter. @@ -104,6 +106,7 @@ #' @param shift_x The value to multiply the label x values by (after adding `add_x`). #' @param silent A flag indicating whether fits should fail silently. #' @param size A number for the size of the labels. +#' @param suffix Additional text to display after the number on the y-axis. #' @param tails A flag or NULL specifying whether to only include distributions with both tails. #' @param trans A string which transformation to use by default `"log10"`. #' @param weight A string of the numeric column in data with positive weights less than or equal to 1,000 or NULL. @@ -154,6 +157,9 @@ #' @param weibull.shape shape parameter for the Weibull distribution. #' @param weibull.scale scale parameter for the Weibull distribution. #' @param ... Unused. -#' @keywords internal -#' @name params -NULL +#' @aliases parameters arguments args +#' @usage NULL +#' @export +# nocov start +params <- function(...) NULL +# nocov end diff --git a/R/plot-cdf.R b/R/plot-cdf.R index c3c56f498..58f92b6df 100644 --- a/R/plot-cdf.R +++ b/R/plot-cdf.R @@ -35,12 +35,12 @@ ssd_plot_cdf <- function(x, ...) { ssd_plot_cdf.fitdists <- function(x, average = FALSE, delta = 9.21, ...) { chk_scalar(average) chk_logical(average) - - if(!is.na(average)) { - pred <- ssd_hc(x, proportion = 1:99/100, average = average, delta = delta) + + if (!is.na(average)) { + pred <- ssd_hc(x, proportion = 1:99 / 100, average = average, delta = delta) } else { - pred <- ssd_hc(x, proportion = 1:99/100, average = FALSE, delta = delta) - pred_ave <- ssd_hc(x, proportion = 1:99/100, average = TRUE, delta = delta) + pred <- ssd_hc(x, proportion = 1:99 / 100, average = FALSE, delta = delta) + pred_ave <- ssd_hc(x, proportion = 1:99 / 100, average = TRUE, delta = delta) pred <- dplyr::bind_rows(pred, pred_ave) } data <- ssd_data(x) @@ -67,7 +67,7 @@ ssd_plot_cdf.fitdists <- function(x, average = FALSE, delta = 9.21, ...) { #' lnorm = c(meanlog = 2, sdlog = 2) #' )) ssd_plot_cdf.list <- function(x, ...) { - pred <- ssd_hc(x, proportion = 1:99/100) + pred <- ssd_hc(x, proportion = 1:99 / 100) data <- data.frame(Conc = numeric(0)) linetype <- if (length(unique(pred$dist)) > 1) "dist" else NULL diff --git a/R/plot-cf.R b/R/plot-cf.R index 17a78884e..cdbfa84a3 100644 --- a/R/plot-cf.R +++ b/R/plot-cf.R @@ -14,7 +14,7 @@ #' Cullen and Frey Plot #' `r lifecycle::badge('deprecated')` -#' +#' #' Plots a Cullen and Frey graph of the skewness and kurtosis #' for non-censored data. #' @@ -27,7 +27,7 @@ ssd_plot_cf <- function(data, left = "Conc") { err("Package 'fitdistrplus' is required to produce Cullen and Frey plots.") } - lifecycle::deprecate_warn("0.3.5", "ssd_plot_cf()", "fitdistrplus::descdist()", + lifecycle::deprecate_stop("0.3.5", "ssd_plot_cf()", "fitdistrplus::descdist()", details = "Please use fitdistrplus::descdist(data$Conc, boot = 100L)." ) diff --git a/R/plot-data.R b/R/plot-data.R index f5fb95bb9..2090915ae 100644 --- a/R/plot-data.R +++ b/R/plot-data.R @@ -22,23 +22,26 @@ #' @export #' @examples #' ssd_plot_data(ssddata::ccme_boron, label = "Species", shape = "Group") -ssd_plot_data <- function(data, left = "Conc", right = left, +ssd_plot_data <- function(data, left = "Conc", right = left, ..., label = NULL, shape = NULL, color = NULL, size = 2.5, xlab = "Concentration", ylab = "Species Affected", shift_x = 3, add_x = 0, + big.mark = ",", suffix = "%", bounds = c(left = 1, right = 1), trans = "log10", xbreaks = waiver()) { .chk_data(data, left, right, weight = NULL, missing = TRUE) + chk_unused(...) chk_null_or(label, vld = vld_string) chk_null_or(shape, vld = vld_string) check_names(data, c(unique(c(left, right)), label, shape)) chk_number(shift_x) chk_range(shift_x, c(1, 1000)) - + chk_number(add_x) chk_range(add_x, c(-1000, 1000)) - + chk_string(big.mark) + .chk_bounds(bounds) data <- process_data(data, left, right, weight = NULL) @@ -84,8 +87,10 @@ ssd_plot_data <- function(data, left = "Conc", right = left, ), stat = "identity") } - gp <- gp + plot_coord_scale(data, xlab = xlab, ylab = ylab, - trans = trans, xbreaks = xbreaks) + gp <- gp + plot_coord_scale(data, + xlab = xlab, ylab = ylab, big.mark = big.mark, suffix = suffix, + trans = trans, xbreaks = xbreaks + ) if (!is.null(label)) { data$right <- (data$right + add_x) * shift_x diff --git a/R/predict.R b/R/predict.R index fdff26f2c..bd62f0563 100644 --- a/R/predict.R +++ b/R/predict.R @@ -29,45 +29,45 @@ stats::predict #' fits <- ssd_fit_dists(ssddata::ccme_boron) #' predict(fits) predict.fitdists <- function( - object, - percent, - proportion = 1:99/100, + object, + percent, + proportion = 1:99 / 100, average = TRUE, - ci = FALSE, - level = 0.95, + ci = FALSE, + level = 0.95, nboot = 1000, min_pboot = 0.95, multi_est = TRUE, ci_method = "weighted_samples", - parametric = TRUE, - delta = 9.21, + parametric = TRUE, + delta = 9.21, control = NULL, ...) { chk_unused(...) - - - if(lifecycle::is_present(percent)) { - lifecycle::deprecate_soft("1.0.6.9009", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") + + + if (lifecycle::is_present(percent)) { + lifecycle::deprecate_soft("2.0.0", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") chk_vector(percent) chk_numeric(percent) chk_range(percent, c(0, 100)) proportion <- percent / 100 } - + chk_vector(proportion) chk_numeric(proportion) chk_range(proportion) - + ssd_hc( object, - proportion = proportion, - ci = ci, + proportion = proportion, + ci = ci, level = level, - nboot = nboot, + nboot = nboot, min_pboot = min_pboot, multi_est = multi_est, - average = average, - delta = delta, + average = average, + delta = delta, parametric = parametric, ci_method = ci_method, control = control @@ -88,34 +88,34 @@ predict.fitdists <- function( #' fits <- ssd_fit_burrlioz(ssddata::ccme_boron) #' predict(fits) predict.fitburrlioz <- function( - object, - percent, - proportion = 1:99/100, + object, + percent, + proportion = 1:99 / 100, ci = FALSE, - level = 0.95, + level = 0.95, nboot = 1000, min_pboot = 0.95, parametric = TRUE, ...) { chk_unused(...) - - if(lifecycle::is_present(percent)) { - lifecycle::deprecate_soft("1.0.6.9009", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") + + if (lifecycle::is_present(percent)) { + lifecycle::deprecate_soft("2.0.0", "ssd_hc(percent)", "ssd_hc(proportion)", id = "hc") chk_vector(percent) chk_numeric(percent) chk_range(percent, c(0, 100)) proportion <- percent / 100 } - + chk_vector(proportion) chk_numeric(proportion) chk_range(proportion) - + ssd_hc(object, - proportion = proportion, - ci = ci, + proportion = proportion, + ci = ci, level = level, - nboot = nboot, + nboot = nboot, min_pboot = min_pboot, parametric = parametric ) diff --git a/R/scales.R b/R/scales.R new file mode 100644 index 000000000..f982a76cd --- /dev/null +++ b/R/scales.R @@ -0,0 +1,40 @@ +# Copyright 2023 Province of British Columbia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#' Label numbers with significant digits and comma +#' +#' @inheritParams params +#' +#' @return A "labelling" function that takes a vector x and +#' returns a character vector of `length(x)` giving a label for each input value. +#' @seealso [scales::label_comma()] +#' @export +#' +#' @examples +#' ggplot2::ggplot(data = ssddata::anon_e, ggplot2::aes(x = Conc / 10)) + +#' geom_ssdpoint() + +#' ggplot2::scale_x_log10(labels = ssd_label_comma()) +ssd_label_comma <- function(digits = 3, ..., big.mark = ",") { + chk_number(digits) + chk_string(big.mark) + chk_unused(...) + + function(x) { + x <- signif(x, digits = digits) + y <- as.character(x) + bol <- !is.na(x) & as.numeric(x) >= 1000 + y[bol] <- stringr::str_replace_all(y[bol], "(\\d{1,1})(\\d{3,3}(?<=\\.|$))", paste0("\\1", big.mark, "\\2")) + y + } +} diff --git a/R/ssd-plot.R b/R/ssd-plot.R index 5e4fbee4f..ee1245e9f 100644 --- a/R/ssd-plot.R +++ b/R/ssd-plot.R @@ -15,22 +15,22 @@ #' @export ggplot2::waiver -plot_coord_scale <- function(data, xlab, ylab, trans, xbreaks = waiver()) { +plot_coord_scale <- function(data, xlab, ylab, trans, big.mark, suffix, xbreaks = waiver()) { chk_string(xlab) chk_string(ylab) if (is.waive(xbreaks) & trans == "log10") { xbreaks <- trans_breaks("log10", function(x) 10^x) } - + list( coord_trans(x = trans), scale_x_continuous(xlab, breaks = xbreaks, - labels = comma_signif + labels = ssd_label_comma(big.mark = big.mark) ), scale_y_continuous(ylab, - labels = percent, limits = c(0, 1), + labels = label_percent(suffix = suffix), limits = c(0, 1), breaks = seq(0, 1, by = 0.2), expand = c(0, 0) ) ) @@ -46,15 +46,17 @@ plot_coord_scale <- function(data, xlab, ylab, trans, xbreaks = waiver()) { #' @export #' @examples #' ssd_plot(ssddata::ccme_boron, boron_pred, label = "Species", shape = "Group") -ssd_plot <- function(data, pred, left = "Conc", right = left, +ssd_plot <- function(data, pred, left = "Conc", right = left, ..., label = NULL, shape = NULL, color = NULL, size = 2.5, linetype = NULL, linecolor = NULL, xlab = "Concentration", ylab = "Species Affected", - ci = TRUE, ribbon = TRUE, hc = 0.05, + ci = TRUE, ribbon = TRUE, hc = 0.05, shift_x = 3, add_x = 0, bounds = c(left = 1, right = 1), + big.mark = ",", suffix = "%", trans = "log10", xbreaks = waiver()) { .chk_data(data, left, right, weight = NULL, missing = TRUE) + chk_unused(...) chk_null_or(label, vld = vld_string) chk_null_or(shape, vld = vld_string) chk_null_or(color, vld = vld_string) @@ -71,7 +73,7 @@ ssd_plot <- function(data, pred, left = "Conc", right = left, chk_range(shift_x, c(1, 1000)) chk_number(add_x) chk_range(add_x, c(-1000, 1000)) - + chk_flag(ci) chk_flag(ribbon) @@ -80,6 +82,8 @@ ssd_plot <- function(data, pred, left = "Conc", right = left, chk_gt(length(hc)) chk_subset(hc, pred$proportion) } + chk_string(big.mark) + chk_string(suffix) .chk_bounds(bounds) chk_string(trans) @@ -153,8 +157,10 @@ ssd_plot <- function(data, pred, left = "Conc", right = left, ), stat = "identity") } - gp <- gp + plot_coord_scale(data, xlab = xlab, ylab = ylab, - trans = trans, xbreaks = xbreaks) + gp <- gp + plot_coord_scale(data, + xlab = xlab, ylab = ylab, big.mark = big.mark, suffix = suffix, + trans = trans, xbreaks = xbreaks + ) if (!is.null(label)) { data$right <- (data$right + add_x) * shift_x diff --git a/R/ssdtools-package.R b/R/ssdtools-package.R index 31c7392f8..6edcc8c9e 100644 --- a/R/ssdtools-package.R +++ b/R/ssdtools-package.R @@ -19,19 +19,21 @@ utils::globalVariables("where") ## usethis namespace: start #' @import chk ggplot2 +#' @import rlang #' @importFrom abind abind #' @importFrom furrr future_map furrr_options #' @importFrom generics augment glance tidy #' @importFrom ggplot2 autoplot sym +#' @importFrom glue glue #' @importFrom goftest ad.test cvm.test #' @importFrom graphics par plot title #' @importFrom grid gList gpar grobName gTree polygonGrob segmentsGrob -#' @importFrom lifecycle expect_deprecated deprecate_soft deprecate_stop deprecate_warn +#' @importFrom lifecycle deprecated expect_defunct expect_deprecated deprecate_soft deprecate_stop deprecate_warn #' @importFrom parallel nextRNGStream nextRNGSubStream #' @importFrom plyr summarise #' @importFrom purrr list_assign transpose #' @importFrom Rcpp sourceCpp -#' @importFrom scales comma manual_pal percent trans_breaks +#' @importFrom scales manual_pal label_percent trans_breaks #' @importFrom ssddata gm_mean #' @importFrom stats coef complete.cases ks.test logLik nobs optim plogis predict qlogis runif sd setNames weighted.mean #' @importFrom stats uniroot @@ -40,6 +42,5 @@ utils::globalVariables("where") #' @importFrom TMB MakeADFun sdreport #' @importFrom universals estimates npars #' @importFrom utils capture.output relist -#' @importFrom VGAM gompertz vglm ## usethis namespace: end NULL diff --git a/R/test-helpers.R b/R/test-helpers.R index e5816bec0..e8e7a0d03 100644 --- a/R/test-helpers.R +++ b/R/test-helpers.R @@ -1,4 +1,4 @@ -# Copyright 2023 Environment and Climate Change Canada +# Copyright 2024 Environment and Climate Change Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ save_png <- function(x, width = 400, height = 400) { grDevices::png(path, width = width, height = height) on.exit(grDevices::dev.off()) print(x) - + path } @@ -38,7 +38,7 @@ save_csv <- function(x) { expect_snapshot_plot <- function(x, name) { testthat::skip_on_os("windows") testthat::skip_on_os("linux") - + path <- save_png(x) testthat::expect_snapshot_file(path, paste0(name, ".png")) } @@ -61,9 +61,10 @@ expect_snapshot_data <- function(x, name, digits = 6) { x <- dplyr::mutate(x, dplyr::across(where(is.list), lapply_fun)) path <- save_csv(x) testthat::expect_snapshot_file( - path, - paste0(name, ".csv"), - compare = testthat::compare_file_text) + path, + paste0(name, ".csv"), + compare = testthat::compare_file_text + ) } ep <- function(text) { @@ -71,7 +72,7 @@ ep <- function(text) { } test_dist <- function(dist, qroottolerance = 1.490116e-08, upadj = 0, multi = FALSE) { - if(!multi) { + if (!multi) { ep(glue::glue("expect_identical(ssd_p{dist}(numeric(0)), numeric(0))")) ep(glue::glue("expect_identical(ssd_p{dist}(NA), NA_real_)")) ep(glue::glue("expect_identical(ssd_p{dist}(NaN), NaN)")) @@ -79,11 +80,11 @@ test_dist <- function(dist, qroottolerance = 1.490116e-08, upadj = 0, multi = FA ep(glue::glue("expect_identical(ssd_p{dist}(-Inf), 0)")) ep(glue::glue("expect_identical(ssd_p{dist}(Inf), 1)")) ep(glue::glue("expect_gt(ssd_p{dist}(1.000001), ssd_p{dist}(1))")) - + ep(glue::glue("expect_equal(ssd_p{dist}(1, log.p = TRUE), log(ssd_p{dist}(1)))")) ep(glue::glue("expect_equal(ssd_p{dist}(1, lower.tail = FALSE), 1- ssd_p{dist}(1))")) ep(glue::glue("expect_equal(ssd_p{dist}(1, lower.tail = FALSE, log.p = TRUE), log(1 - ssd_p{dist}(1)))")) - + ep(glue::glue("expect_identical(p{}(c(NA, NaN, 0, Inf, -Inf)), c(NA, NaN, 0, Inf, -Inf))")) ep(glue::glue("expect_equal(ssd_p{dist}(1:2, 1:2, 3:4), @@ -91,7 +92,7 @@ test_dist <- function(dist, qroottolerance = 1.490116e-08, upadj = 0, multi = FA ep(glue::glue("expect_equal(ssd_p{dist}(1:2, c(1, NA), 3:4), c(ssd_p{dist}(1, 1, 3), NA_real_))")) } - + ep(glue::glue("expect_identical(ssd_q{dist}(numeric(0)), numeric(0))")) ep(glue::glue("expect_identical(ssd_q{dist}(NA), NA_real_)")) ep(glue::glue("expect_identical(ssd_q{dist}(NaN), NaN)")) @@ -106,10 +107,10 @@ test_dist <- function(dist, qroottolerance = 1.490116e-08, upadj = 0, multi = FA ep(glue::glue("expect_identical(ssd_q{dist}(log(0.75), log.p = TRUE), ssd_q{dist}(0.75))")) ep(glue::glue("expect_identical(ssd_q{dist}(0.75, lower.tail = FALSE), ssd_q{dist}(0.25))")) ep(glue::glue("expect_identical(ssd_q{dist}(log(0.75), lower.tail = FALSE, log.p = TRUE), ssd_q{dist}(0.25))")) - + ep(glue::glue("expect_identical(ssd_q{dist}(c(NA, NaN, 0, Inf, -Inf)), c(NA, NaN, 0, NaN, NaN))")) - - if(!multi) { + + if (!multi) { ep(glue::glue("expect_identical(ssd_q{dist}(c(0.25, 0.75), 1:2, 3:4), c(ssd_q{dist}(0.25, 1, 3), ssd_q{dist}(0.75, 2, 4)))")) ep(glue::glue("expect_identical(ssd_q{dist}(c(0.25, 0.75), c(1,NA), 3:4), c(ssd_q{dist}(0.25, 1, 3), NA_real_))")) ep(glue::glue("expect_equal(ssd_q{dist}(ssd_p{dist}(c(0, 0.1, 0.5, 0.9, 0.99))), c(0, 0.1, 0.5, 0.9, 0.99), tolerance = {qroottolerance})")) @@ -117,7 +118,7 @@ test_dist <- function(dist, qroottolerance = 1.490116e-08, upadj = 0, multi = FA ep(glue::glue("expect_identical(ssd_r{dist}(2, NA), c(NA, NA_real_))")) ep(glue::glue("expect_error(ssd_r{dist}(1, 1:2))")) } - + ep(glue::glue("expect_identical(ssd_r{dist}(numeric(0)), numeric(0))")) ep(glue::glue("expect_identical(ssd_r{dist}(0), numeric(0))")) ep(glue::glue("expect_error(ssd_r{dist}(NA))")) @@ -126,14 +127,14 @@ test_dist <- function(dist, qroottolerance = 1.490116e-08, upadj = 0, multi = FA ep(glue::glue("expect_identical(length(ssd_r{dist}(2)), 2L)")) ep(glue::glue("expect_identical(length(ssd_r{dist}(3:4)), 2L)")) ep(glue::glue("expect_identical(length(ssd_r{dist}(c(NA, 1))), 2L)")) - - if(!multi) { + + if (!multi) { ests <- ep(glue::glue("ssd_e{dist}()")) testthat::expect_true(vld_list(ests)) testthat::expect_true(vld_all(ests, vld_number)) testthat::expect_true(vld_length(ests, length = 2L, upper = 5L)) testthat::expect_true(vld_named(ests)) - + set.seed(97) data <- data.frame(Conc = ep(glue::glue("ssd_r{dist}(1000)"))) fits <- ssd_fit_dists(data = data, dists = dist) @@ -143,12 +144,12 @@ test_dist <- function(dist, qroottolerance = 1.490116e-08, upadj = 0, multi = FA testthat::expect_identical(tidy$dist[1], dist) tidy$lower <- tidy$est - tidy$se * 3 tidy$upper <- tidy$est + tidy$se * 3 - + default <- ep(glue::glue("formals(ssd_r{dist})")) default$n <- NULL default$chk <- NULL default <- data.frame(term = names(default), default = unlist(default)) - + tidy <- merge(tidy, default, by = "term", all = "TRUE") testthat::expect_true(all(tidy$default > tidy$lower - upadj)) testthat::expect_true(all(tidy$default < tidy$upper + upadj)) diff --git a/R/utils.R b/R/utils.R index 619a37e2d..1ffb7da24 100644 --- a/R/utils.R +++ b/R/utils.R @@ -14,27 +14,29 @@ #' Comma and Significance Formatter #' -#' By default the numeric vectors are first rounded to three significant figures. -#' Then scales::comma is only applied to values greater than or equal to 1000 -#' to ensure that labels are permitted to have different numbers of decimal places. -#' #' @param x A numeric vector to format. -#' @param ... Additional arguments passed to [scales::comma]. #' @inheritParams params #' @return A character vector. +#' @seealso [ssd_label_comma()] #' @export #' @examples -#' comma_signif(c(0.1, 1, 10, 1000)) -#' scales::comma(c(0.1, 1, 10, 1000)) -comma_signif <- function(x, digits = 3, ...) { - if (vld_used(...)) { - lifecycle::deprecate_warn("0.3.3", "comma_signif(...)") - } - +#' \dontrun{ +#' comma_signif(c(0.1, 1, 10, 1000, 10000)) +#' } +comma_signif <- function(x, digits = 3, ..., big.mark = ",") { + lifecycle::deprecate_soft( + "2.0.0", "comma_signif()", "ssd_label_comma()", + details = "Use `labels = ssd_label_comma()` instead of `labels = comma_signif` when constructing `ggplot` objects.") + + chk_numeric(x) + chk_number(digits) + chk_string(big.mark) + chk_unused(...) + x <- signif(x, digits = digits) y <- as.character(x) bol <- !is.na(x) & as.numeric(x) >= 1000 - y[bol] <- comma(x[bol], ...) + y[bol] <- stringr::str_replace_all(y[bol], "(\\d{1,1})(\\d{3,3}(?<=\\.|$))", paste0("\\1", big.mark, "\\2")) y } @@ -64,11 +66,11 @@ ssd_ecd_data <- function( data, left = "Conc", right = left, bounds = c(left = 1, right = 1)) { .chk_data(data, left, right) .chk_bounds(bounds) - + if (!nrow(data)) { return(double(0)) } - + data <- process_data(data, left = left, right = right) data <- bound_data(data, bounds) x <- rowMeans(log(data[c("left", "right")])) diff --git a/R/wqg.R b/R/wqg.R index 72453332a..0488ac3d9 100644 --- a/R/wqg.R +++ b/R/wqg.R @@ -37,6 +37,8 @@ #' ssd_wqg_bc(ssddata::ccme_boron) #' } ssd_wqg_bc <- function(data, left = "Conc") { + lifecycle::deprecate_warn("2.0.0", "ssd_wqg_bc()", "ssd_fit_bcanz()", + details = "Please use `ssd_fit_bcanz()` and `ssd_hc_bcanz()` instead.") fits <- ssd_fit_dists(data, left = left, rescale = FALSE) ssd_hc(fits, ci = TRUE, nboot = 10000) } @@ -66,6 +68,8 @@ ssd_wqg_bc <- function(data, left = "Conc") { #' ssd_wqg_burrlioz(ssddata::ccme_boron) #' } ssd_wqg_burrlioz <- function(data, left = "Conc") { + lifecycle::deprecate_warn("2.0.0", "ssd_wqg_burrlioz()", "ssd_fit_bcanz()", + details = "Please use `ssd_fit_burrlioz()` and `ssd_hc_burrlioz()` instead.") fit <- ssd_fit_burrlioz(data, left = left, rescale = FALSE) ssd_hc_burrlioz(fit, ci = TRUE, nboot = 10000) } diff --git a/README.Rmd b/README.Rmd index 68a82915c..3a40517eb 100644 --- a/README.Rmd +++ b/README.Rmd @@ -4,20 +4,21 @@ output: github_document -```{r setup, include = FALSE} +```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", - fig.path = "man/figures/README-" + fig.path = "man/figures/README-", + out.width = "100%" ) ``` # ssdtools -[![Lifecycle:Stable](https://img.shields.io/badge/Lifecycle-Stable-97ca00)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md) +[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R-CMD-check](https://github.com/bcgov/ssdtools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/bcgov/ssdtools/actions/workflows/R-CMD-check.yaml) -[![codecov](https://codecov.io/github/bcgov/ssdtools/graph/badge.svg?token=gVKHQQD1Jp)](https://codecov.io/github/bcgov/ssdtools) +[![Codecov test coverage](https://codecov.io/gh/bcgov/ssdtools/graph/badge.svg?token=gVKHQQD1Jp)](https://app.codecov.io/gh/bcgov/ssdtools) [![CRAN status](https://www.r-pkg.org/badges/version/ssdtools)](https://cran.r-project.org/package=ssdtools) ![CRAN downloads](https://cranlogs.r-pkg.org/badges/ssdtools) @@ -31,20 +32,25 @@ Confidence intervals on hazard concentrations and proportions are produced by bo ## Installation -To install the latest version from [CRAN](https://CRAN.R-project.org/package=ssdtools) -```{r, eval = FALSE} +To install the latest release version from [CRAN](https://CRAN.R-project.org/package=ssdtools). +```r install.packages("ssdtools") ``` -To install the latest development version from [GitHub](https://github.com/bcgov/ssdtools) -```{r, eval = FALSE} -# install.packages("remotes") -remotes::install_github("bcgov/ssdtools") +To install the latest development version from [r-universe](https://bcgov.r-universe.dev/ssdtools). +```r +install.packages("ssdtools", repos = c("https://bcgov.r-universe.dev", "https://cloud.r-project.org")) +``` + +or from [GitHub](https://github.com/bcgov/ssdtools) +```r +# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch)) +pak::pak("bcgov/ssdtools") ``` ## Introduction -The dependency [`ssddata`](https://cran.r-project.org/web/packages/ssddata/index.html) provides a example data sets for several chemicals including Boron. +The dependency [`ssddata`](https://cran.r-project.org/package=ssddata) provides a example data sets for several chemicals including Boron. ```{r, message=FALSE} library(ssdtools) ssddata::ccme_boron @@ -113,7 +119,7 @@ Get started with ssdtools at . -For the latest changes visit [NEWS](https://bcgov.github.io/ssdtools/news). +For the latest changes visit [NEWS](https://bcgov.github.io/ssdtools/news/). The citation for the shiny app: diff --git a/README.md b/README.md index a9a0c8ae5..e443add0d 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@ -[![Lifecycle:Stable](https://img.shields.io/badge/Lifecycle-Stable-97ca00)](https://github.com/bcgov/repomountie/blob/master/doc/lifecycle-badges.md) +[![Lifecycle: +stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R-CMD-check](https://github.com/bcgov/ssdtools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/bcgov/ssdtools/actions/workflows/R-CMD-check.yaml) -[![codecov](https://codecov.io/github/bcgov/ssdtools/graph/badge.svg?token=gVKHQQD1Jp)](https://codecov.io/github/bcgov/ssdtools) +[![Codecov test +coverage](https://codecov.io/gh/bcgov/ssdtools/graph/badge.svg?token=gVKHQQD1Jp)](https://app.codecov.io/gh/bcgov/ssdtools) [![CRAN status](https://www.r-pkg.org/badges/version/ssdtools)](https://cran.r-project.org/package=ssdtools) ![CRAN downloads](https://cranlogs.r-pkg.org/badges/ssdtools) @@ -27,25 +29,30 @@ are produced by bootstrapping. ## Installation -To install the latest version from -[CRAN](https://CRAN.R-project.org/package=ssdtools) +To install the latest release version from +[CRAN](https://CRAN.R-project.org/package=ssdtools). ``` r install.packages("ssdtools") ``` To install the latest development version from -[GitHub](https://github.com/bcgov/ssdtools) +[r-universe](https://bcgov.r-universe.dev/ssdtools). ``` r -# install.packages("remotes") -remotes::install_github("bcgov/ssdtools") +install.packages("ssdtools", repos = c("https://bcgov.r-universe.dev", "https://cloud.r-project.org")) +``` + +or from [GitHub](https://github.com/bcgov/ssdtools) + +``` r +# install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch)) +pak::pak("bcgov/ssdtools") ``` ## Introduction -The dependency -[`ssddata`](https://cran.r-project.org/web/packages/ssddata/index.html) +The dependency [`ssddata`](https://cran.r-project.org/package=ssddata) provides a example data sets for several chemicals including Boron. ``` r @@ -79,7 +86,7 @@ and can be quickly plotted using `autoplot` autoplot(fits) ``` -![](man/figures/README-unnamed-chunk-5-1.png) + The goodness of fit can be assessed using `ssd_gof` @@ -106,7 +113,7 @@ print(hc5) #> # A tibble: 1 × 11 #> dist proportion est se lcl ucl wt method nboot pboot samples #> -#> 1 average 0.05 1.26 0.781 0.407 3.29 1 parametr… 1000 0.999 +#> 1 average 0.05 1.26 0.782 0.407 3.29 1 parametr… 1000 1 ``` To bootstrap in parallel set `future::plan()`. For example: @@ -145,7 +152,7 @@ ssd_plot(ssddata::ccme_boron, boron_pred, scale_colour_ssd() ``` -![](man/figures/README-unnamed-chunk-10-1.png) + ## References @@ -161,7 +168,7 @@ A shiny app to allow non-R users to interface with ssdtools is available at . For the latest changes visit -[NEWS](https://bcgov.github.io/ssdtools/news). +[NEWS](https://bcgov.github.io/ssdtools/news/). The citation for the shiny app: @@ -208,8 +215,9 @@ By contributing to this project, you agree to abide by its terms. ## Licensing -Copyright 2024 Province of British Columbia, Environment and Climate -Change Canada, and Australian Government Department of Climate Change, +Copyright 2018-2024 Province of British Columbia +Copyright 2021 Environment and Climate Change Canada +Copyright 2023-2024 Australian Government Department of Climate Change, Energy, the Environment and Water The documentation is released under the [CC BY 4.0 diff --git a/_pkgdown.yml b/_pkgdown.yml index 0a103b72d..4766654e7 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,115 +1,119 @@ +url: ~ template: bootstrap: 5 authors: Joe Thorley: - href: "https://github.com/joethorley" + href: https://github.com/joethorley Rebecca Fisher: - href: "https://www.aims.gov.au/about/our-people/dr-rebecca-fisher" + href: https://www.aims.gov.au/about/our-people/dr-rebecca-fisher David Fox: - href: "https://training.ecotox.science/who-we-are/" + href: https://training.ecotox.science/who-we-are/ Carl Schwarz: - href: "https://www.sfu.ca/stat-actsci/department/profiles/carl-schwarz.html" + href: https://www.sfu.ca/stat-actsci/department/profiles/carl-schwarz.html Province of British Columbia: - href: "https://www2.gov.bc.ca/" + href: https://www2.gov.bc.ca/ Environment and Climate Change Canada: - href: "https://www.canada.ca/en/environment-climate-change.html" + href: https://www.canada.ca/en/environment-climate-change.html Australian Government Department of Climate Change, Energy, the Environment and Water: - href: "https://www.dcceew.gov.au/" - + href: https://www.dcceew.gov.au/ destination: docs - reference: - title: Distribution Names desc: Functions that return character vectors of distribution names contents: - - '`ssd_dists`' - - '`ssd_dists_all`' - - '`ssd_dists_bcanz`' + - ssd_dists + - ssd_dists_all + - ssd_dists_bcanz - title: Fit desc: Functions that fit distributions to data contents: - - '`ssd_fit_dists`' - - '`ssd_fit_bcanz`' - - '`ssd_fit_burrlioz`' + - ssd_fit_dists + - ssd_fit_bcanz + - ssd_fit_burrlioz - title: Hazard Concentrations desc: Functions that calculate hazard concentrations contents: - - '`ssd_hc`' - - '`ssd_hc_bcanz`' - - '`ssd_wqg_bc`' - - '`ssd_wqg_burrlioz`' + - ssd_hc + - ssd_hc_bcanz - title: Hazard Proportions desc: Functions that calculate hazard proportions contents: - - '`ssd_hp`' - - '`ssd_hp_bcanz`' + - ssd_hp + - ssd_hp_bcanz +- title: Manipulate Data + desc: Functions that manipulate data + contents: + - ssd_censor_data + - ssd_data + - ssd_sort_data - title: Manipulate Fits desc: Functions that manipulate fits of distributions contents: - - '`augment.fitdists`' - - '`coef.fitdists`' - - '`estimates.fitdists`' - - '`glance.fitdists`' - - '`predict.fitburrlioz`' - - '`predict.fitdists`' - - '`ssd_gof`' - - '`subset.fitdists`' - - '`tidy.fitdists`' + - augment.fitdists + - coef.fitdists + - estimates.fitdists + - glance.fitdists + - predict.fitburrlioz + - predict.fitdists + - ssd_gof + - subset.fitdists + - tidy.fitdists - title: Plots desc: Functions to Generate Plots contents: - - '`autoplot.fitdists`' - - '`geom_hcintersect`' - - '`geom_ssdpoint`' - - '`geom_ssdsegment`' - - '`geom_xribbon`' - - '`scale_colour_ssd`' - - '`ssd_pal`' - - '`ssd_plot`' - - '`ssd_plot_cdf`' - - '`ssd_plot_data`' - - '`ssdtools-ggproto`' + - autoplot.fitdists + - geom_hcintersect + - geom_ssdpoint + - geom_ssdsegment + - geom_xribbon + - scale_colour_ssd + - ssd_label_comma + - ssd_pal + - ssd_plot + - ssd_plot_cdf + - ssd_plot_data + - ssdtools-ggproto - title: Distributional Functions desc: Distribution, quantile, random functions contents: - - '`ssd_p`' - - '`ssd_q`' - - '`ssd_r`' - - '`ssd_e`' + - ssd_p + - ssd_q + - ssd_r + - ssd_e - title: Miscellaneous desc: Miscellaneous functions and data contents: - - '`boron_pred`' - - '`comma_signif`' - - '`dist_data`' - - '`is.fitdists`' - - '`ssd_licensing_md`' - - '`npars`' - - '`ssd_data`' - - '`ssd_ecd`' - - '`ssd_ecd_data`' - - '`ssd_exposure`' - - '`ssd_fit_dists`' - - '`ssd_is_censored`' - - '`ssd_match_moments`' - - '`ssd_sort_data`' - - '`pearson1000`' + - boron_pred + - dist_data + - is.fitdists + - ssd_licensing_md + - npars + - params + - ssd_ecd + - ssd_ecd_data + - ssd_exposure + - ssd_is_censored + - ssd_match_moments + - ssd_min_pmix - title: Deprecated desc: Deprecated functions which will become defunct in future versions contents: - - '`geom_ssd`' - - '`is_censored`' - - '`ssd_hc_burrlioz`' - - '`ssd_plot_cf`' - - '`stat_ssd`' - - '`dgompertz`' - - '`pgompertz`' - - '`qgompertz`' - - '`rgompertz`' - - '`dlgumbel`' - - '`plgumbel`' - - '`qlgumbel`' - - '`rlgumbel`' + - comma_signif + - geom_ssd + - is_censored + - ssd_wqg_bc + - ssd_wqg_burrlioz + - ssd_hc_burrlioz + - ssd_plot_cf + - stat_ssd + - dgompertz + - pgompertz + - qgompertz + - rgompertz + - dlgumbel + - plgumbel + - qlgumbel + - rlgumbel articles: - title: All vignettes diff --git a/cran-comments.md b/cran-comments.md index 90e332251..dbffa79e1 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,14 +1,3 @@ -## Test environments - -release 4.3.1 - -* OSX (local) - release -* OSX (macbuilder) - release -* OSX (actions) - release -* Ubuntu (actions) - oldrel, release and devel -* Windows (actions) - release -* Windows (winbuilder) - devel - ## R CMD check results 0 errors | 0 warnings | 1 note diff --git a/data-raw/data-raw.R b/data-raw/data-raw.R index c863e6fe3..c87fb14b9 100644 --- a/data-raw/data-raw.R +++ b/data-raw/data-raw.R @@ -31,10 +31,21 @@ dist_data <- tibble::tribble( "weibull", TRUE, TRUE, 2L ) +stopifnot(identical(dist_data$dist, ssdtools::ssd_dists())) +stopifnot(identical(dist_data$dist[dist_data$bcanz], ssdtools::ssd_dists_bcanz())) +stopifnot(identical(dist_data$dist[dist_data$npars == 2], ssdtools::ssd_dists(npars = 2))) +stopifnot(identical(dist_data$dist[dist_data$npars == 3], ssdtools::ssd_dists(npars = 3))) +stopifnot(identical(dist_data$dist[dist_data$npars == 4], ssdtools::ssd_dists(npars = 4))) +stopifnot(identical(dist_data$dist[dist_data$npars == 5], ssdtools::ssd_dists(npars = 5))) +stopifnot(identical(dist_data$dist[dist_data$tails], ssdtools::ssd_dists(tails = TRUE))) +stopifnot(identical(dist_data$dist[!dist_data$tails], ssdtools::ssd_dists(tails = FALSE))) + use_data(dist_data, overwrite = TRUE) fits <- ssd_fit_dists(ssddata::ccme_boron) -set.seed(99) -boron_pred <- predict(fits, ci = TRUE, ci_method = "weighted bootstrap") +withr::with_seed(99, + boron_pred <- predict(fits, ci = TRUE, ci_method = "weighted_samples") +) + use_data(boron_pred, overwrite = TRUE) diff --git a/data/boron_pred.rda b/data/boron_pred.rda index 0f010c836..c7d3885b4 100644 Binary files a/data/boron_pred.rda and b/data/boron_pred.rda differ diff --git a/data/dist_data.rda b/data/dist_data.rda index ba4b4b869..486e00ac9 100644 Binary files a/data/dist_data.rda and b/data/dist_data.rda differ diff --git a/data/pearson1000.rda b/data/pearson1000.rda deleted file mode 100644 index e8572f759..000000000 Binary files a/data/pearson1000.rda and /dev/null differ diff --git a/man/comma_signif.Rd b/man/comma_signif.Rd index 5e0d90d0b..721719b2b 100644 --- a/man/comma_signif.Rd +++ b/man/comma_signif.Rd @@ -4,24 +4,28 @@ \alias{comma_signif} \title{Comma and Significance Formatter} \usage{ -comma_signif(x, digits = 3, ...) +comma_signif(x, digits = 3, ..., big.mark = ",") } \arguments{ \item{x}{A numeric vector to format.} \item{digits}{A whole number specifying the number of significant figures.} -\item{...}{Additional arguments passed to \link[scales:comma]{scales::comma}.} +\item{...}{Unused.} + +\item{big.mark}{A string specifying used between every 3 digits to separate thousands on the x-axis.} } \value{ A character vector. } \description{ -By default the numeric vectors are first rounded to three significant figures. -Then scales::comma is only applied to values greater than or equal to 1000 -to ensure that labels are permitted to have different numbers of decimal places. +Comma and Significance Formatter } \examples{ -comma_signif(c(0.1, 1, 10, 1000)) -scales::comma(c(0.1, 1, 10, 1000)) +\dontrun{ + comma_signif(c(0.1, 1, 10, 1000, 10000)) +} +} +\seealso{ +\code{\link[=ssd_label_comma]{ssd_label_comma()}} } diff --git a/man/dist_data.Rd b/man/dist_data.Rd index 92fb65abd..1182fdd8c 100644 --- a/man/dist_data.Rd +++ b/man/dist_data.Rd @@ -23,7 +23,7 @@ A data frame of information on the implemented distributions. } } \examples{ -dist +dist_data } \seealso{ Other dists: diff --git a/man/figures/README-unnamed-chunk-10-1.png b/man/figures/README-unnamed-chunk-10-1.png deleted file mode 100644 index afd42b04b..000000000 Binary files a/man/figures/README-unnamed-chunk-10-1.png and /dev/null differ diff --git a/man/figures/README-unnamed-chunk-4-1.png b/man/figures/README-unnamed-chunk-4-1.png new file mode 100644 index 000000000..04c7c6155 Binary files /dev/null and b/man/figures/README-unnamed-chunk-4-1.png differ diff --git a/man/figures/README-unnamed-chunk-5-1.png b/man/figures/README-unnamed-chunk-5-1.png deleted file mode 100644 index e9d58f7ac..000000000 Binary files a/man/figures/README-unnamed-chunk-5-1.png and /dev/null differ diff --git a/man/figures/README-unnamed-chunk-9-1.png b/man/figures/README-unnamed-chunk-9-1.png index f9f13635a..654b47e37 100644 Binary files a/man/figures/README-unnamed-chunk-9-1.png and b/man/figures/README-unnamed-chunk-9-1.png differ diff --git a/man/figures/lifecycle-deprecated.svg b/man/figures/lifecycle-deprecated.svg index 4baaee01c..b61c57c3f 100644 --- a/man/figures/lifecycle-deprecated.svg +++ b/man/figures/lifecycle-deprecated.svg @@ -1 +1,21 @@ -lifecyclelifecycledeprecateddeprecated \ No newline at end of file + + lifecycle: deprecated + + + + + + + + + + + + + + + lifecycle + + deprecated + + diff --git a/man/figures/lifecycle-experimental.svg b/man/figures/lifecycle-experimental.svg index d1d060e92..5d88fc2c6 100644 --- a/man/figures/lifecycle-experimental.svg +++ b/man/figures/lifecycle-experimental.svg @@ -1 +1,21 @@ -lifecyclelifecycleexperimentalexperimental \ No newline at end of file + + lifecycle: experimental + + + + + + + + + + + + + + + lifecycle + + experimental + + diff --git a/man/figures/lifecycle-stable.svg b/man/figures/lifecycle-stable.svg index e015dc811..9bf21e76b 100644 --- a/man/figures/lifecycle-stable.svg +++ b/man/figures/lifecycle-stable.svg @@ -1 +1,29 @@ -lifecyclelifecyclestablestable \ No newline at end of file + + lifecycle: stable + + + + + + + + + + + + + + + + lifecycle + + + + stable + + + diff --git a/man/figures/lifecycle-superseded.svg b/man/figures/lifecycle-superseded.svg index 75f24f553..db8d757f7 100644 --- a/man/figures/lifecycle-superseded.svg +++ b/man/figures/lifecycle-superseded.svg @@ -1 +1,21 @@ - lifecyclelifecyclesupersededsuperseded \ No newline at end of file + + lifecycle: superseded + + + + + + + + + + + + + + + lifecycle + + superseded + + diff --git a/man/is_censored.Rd b/man/is_censored.Rd index 3b73c6553..f70932694 100644 --- a/man/is_censored.Rd +++ b/man/is_censored.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/censor.R +% Please edit documentation in R/censored.R \name{is_censored} \alias{is_censored} \title{Is Censored @@ -16,10 +16,6 @@ A flag indicating if the data is censored. \description{ Deprecated for \code{\link[=ssd_is_censored]{ssd_is_censored()}}. } -\examples{ -fits <- ssd_fit_dists(ssddata::ccme_boron) -is_censored(fits) -} \seealso{ \code{\link[=ssd_is_censored]{ssd_is_censored()}} } diff --git a/man/params.Rd b/man/params.Rd index 8c759944a..5f0ffade7 100644 --- a/man/params.Rd +++ b/man/params.Rd @@ -2,8 +2,13 @@ % Please edit documentation in R/params.R \name{params} \alias{params} +\alias{parameters} +\alias{arguments} +\alias{args} \title{Parameter Descriptions for ssdtools Functions} \arguments{ +\item{...}{Unused.} + \item{add_x}{The value to add to the label x values (before multiplying by \code{shift_x}).} \item{all}{A flag specifying whether to also return transformed parameters.} @@ -17,6 +22,8 @@ parameters at the boundary should be considered to have converged (default = FAL \item{bcanz}{A flag or NULL specifying whether to only include distributions in the set that is approved by BC, Canada, Australia and New Zealand for official guidelines.} +\item{big.mark}{A string specifying used between every 3 digits to separate thousands on the x-axis.} + \item{breaks}{A character vector} \item{bounds}{A named non-negative numeric vector of the left and right bounds for @@ -27,6 +34,8 @@ relative to the extremes for non-missing values.} \item{ci}{A flag specifying whether to estimate confidence intervals (by bootstrapping).} +\item{censoring}{A numeric vector of the left and right censoring values.} + \item{color}{A string of the column in data for the color aesthetic.} \item{computable}{A flag specifying whether to only return fits with numerically computable standard errors.} @@ -174,6 +183,8 @@ remove them with a warning.} \item{size}{A number for the size of the labels.} +\item{suffix}{Additional text to display after the number on the y-axis.} + \item{tails}{A flag or NULL specifying whether to only include distributions with both tails.} \item{trans}{A string which transformation to use by default \code{"log10"}.} @@ -270,10 +281,7 @@ remove them with a warning.} \item{weibull.shape}{shape parameter for the Weibull distribution.} \item{weibull.scale}{scale parameter for the Weibull distribution.} - -\item{...}{Unused.} } \description{ Parameter Descriptions for ssdtools Functions } -\keyword{internal} diff --git a/man/pearson1000.Rd b/man/pearson1000.Rd deleted file mode 100644 index 9bf53877b..000000000 --- a/man/pearson1000.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{pearson1000} -\alias{pearson1000} -\title{Pearson 1000 Data} -\format{ -A tbl data frame that includes: -\describe{ -\item{Conc}{A numeric vector of the simulate concentrations.} -} -} -\usage{ -pearson1000 -} -\description{ -An example tibble of 1000 values simulated using a Pearson distribution -with a #FIXME of #FIXME and a #FIXME of #FIXME. -} -\details{ -The data is released under $FIXME -} -\examples{ -head(pearson1000) -} -\keyword{datasets} diff --git a/man/ssd_censor_data.Rd b/man/ssd_censor_data.Rd new file mode 100644 index 000000000..6b281fc0f --- /dev/null +++ b/man/ssd_censor_data.Rd @@ -0,0 +1,28 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/censor.R +\name{ssd_censor_data} +\alias{ssd_censor_data} +\title{Censor Data} +\usage{ +ssd_censor_data(data, left = "Conc", ..., right = left, censoring = c(0, Inf)) +} +\arguments{ +\item{data}{A data frame.} + +\item{left}{A string of the column in data with the concentrations.} + +\item{...}{Unused.} + +\item{right}{A string of the column in data with the right concentration values.} + +\item{censoring}{A numeric vector of the left and right censoring values.} +} +\value{ +A tibble of the censored data. +} +\description{ +Censor Data +} +\examples{ +ssd_censor_data(ssddata::ccme_boron, censoring = c(2.5, Inf)) +} diff --git a/man/ssd_fit_burrlioz.Rd b/man/ssd_fit_burrlioz.Rd index 8b4a30385..66dafa7ce 100644 --- a/man/ssd_fit_burrlioz.Rd +++ b/man/ssd_fit_burrlioz.Rd @@ -4,7 +4,13 @@ \alias{ssd_fit_burrlioz} \title{Fit Burrlioz Distributions} \usage{ -ssd_fit_burrlioz(data, left = "Conc", rescale = FALSE, silent = FALSE) +ssd_fit_burrlioz( + data, + left = "Conc", + rescale = FALSE, + control = list(), + silent = FALSE +) } \arguments{ \item{data}{A data frame.} @@ -13,6 +19,8 @@ ssd_fit_burrlioz(data, left = "Conc", rescale = FALSE, silent = FALSE) \item{rescale}{A flag specifying whether to rescale concentration values by dividing by the geometric mean of the minimum and maximum positive finite values.} +\item{control}{A list of control parameters passed to \code{\link[stats:optim]{stats::optim()}}.} + \item{silent}{A flag indicating whether fits should fail silently.} } \value{ diff --git a/man/ssd_fit_dists.Rd b/man/ssd_fit_dists.Rd index e085647ec..48d6fa110 100644 --- a/man/ssd_fit_dists.Rd +++ b/man/ssd_fit_dists.Rd @@ -13,8 +13,8 @@ ssd_fit_dists( nrow = 6L, rescale = FALSE, reweight = FALSE, - computable = TRUE, - at_boundary_ok = FALSE, + computable = FALSE, + at_boundary_ok = TRUE, all_dists = FALSE, min_pmix = ssd_min_pmix(nrow(data)), range_shape1 = c(0.05, 20), @@ -64,15 +64,17 @@ An object of class fitdists. Fits one or more distributions to species sensitivity data. } \details{ -By default the 'llogis', 'gamma' and 'lnorm' -distributions are fitted to the data. -For a complete list of the implemented distributions see \code{\link[=ssd_dists_all]{ssd_dists_all()}}. +By default the 'gamma', 'lgumbel', 'llogis', 'lnorm', 'lnorm_lnorm' and +'weibull' distributions are fitted to the data. +For a complete list of the distributions that are currently implemented in +\code{ssdtools} see \code{\link[=ssd_dists_all]{ssd_dists_all()}}. If weight specifies a column in the data frame with positive numbers, weighted estimation occurs. However, currently only the resultant parameter estimates are available. -If the \code{right} argument is different to the \code{left} argument then the data are considered to be censored. +If the \code{right} argument is different to the \code{left} argument +then the data are considered to be censored. } \examples{ fits <- ssd_fit_dists(ssddata::ccme_boron) diff --git a/man/ssd_hc_burrlioz.Rd b/man/ssd_hc_burrlioz.Rd index 16313006f..96d469180 100644 --- a/man/ssd_hc_burrlioz.Rd +++ b/man/ssd_hc_burrlioz.Rd @@ -41,8 +41,3 @@ A tibble of corresponding hazard concentrations. \description{ Deprecated for \code{\link[=ssd_hc]{ssd_hc()}}. } -\examples{ -fit <- ssd_fit_burrlioz(ssddata::ccme_boron) -ssd_hc_burrlioz(fit) - -} diff --git a/man/ssd_label_comma.Rd b/man/ssd_label_comma.Rd new file mode 100644 index 000000000..0f0daf0fd --- /dev/null +++ b/man/ssd_label_comma.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/scales.R +\name{ssd_label_comma} +\alias{ssd_label_comma} +\title{Label numbers with significant digits and comma} +\usage{ +ssd_label_comma(digits = 3, ..., big.mark = ",") +} +\arguments{ +\item{digits}{A whole number specifying the number of significant figures.} + +\item{...}{Unused.} + +\item{big.mark}{A string specifying used between every 3 digits to separate thousands on the x-axis.} +} +\value{ +A "labelling" function that takes a vector x and +returns a character vector of \code{length(x)} giving a label for each input value. +} +\description{ +Label numbers with significant digits and comma +} +\examples{ +ggplot2::ggplot(data = ssddata::anon_e, ggplot2::aes(x = Conc / 10)) + + geom_ssdpoint() + + ggplot2::scale_x_log10(labels = ssd_label_comma()) +} +\seealso{ +\code{\link[scales:label_number]{scales::label_comma()}} +} diff --git a/man/ssd_p.Rd b/man/ssd_p.Rd index 77c04c2f4..e651d66da 100644 --- a/man/ssd_p.Rd +++ b/man/ssd_p.Rd @@ -276,7 +276,7 @@ ssd_plnorm_lnorm(1) ssd_plnorm(1) -# multi +# multi ssd_pmulti(1) ssd_pweibull(1) diff --git a/man/ssd_plot.Rd b/man/ssd_plot.Rd index 1115791a2..572d08de9 100644 --- a/man/ssd_plot.Rd +++ b/man/ssd_plot.Rd @@ -9,6 +9,7 @@ ssd_plot( pred, left = "Conc", right = left, + ..., label = NULL, shape = NULL, color = NULL, @@ -23,6 +24,8 @@ ssd_plot( shift_x = 3, add_x = 0, bounds = c(left = 1, right = 1), + big.mark = ",", + suffix = "\%", trans = "log10", xbreaks = waiver() ) @@ -36,6 +39,8 @@ ssd_plot( \item{right}{A string of the column in data with the right concentration values.} +\item{...}{Unused.} + \item{label}{A string of the column in data with the labels.} \item{shape}{A string of the column in data for the shape aesthetic.} @@ -66,6 +71,10 @@ ssd_plot( uncensored missing (0 and Inf) data in terms of the orders of magnitude relative to the extremes for non-missing values.} +\item{big.mark}{A string specifying used between every 3 digits to separate thousands on the x-axis.} + +\item{suffix}{Additional text to display after the number on the y-axis.} + \item{trans}{A string which transformation to use by default \code{"log10"}.} \item{xbreaks}{The x-axis breaks as one of: diff --git a/man/ssd_plot_data.Rd b/man/ssd_plot_data.Rd index dbe810917..78a2d405d 100644 --- a/man/ssd_plot_data.Rd +++ b/man/ssd_plot_data.Rd @@ -8,6 +8,7 @@ ssd_plot_data( data, left = "Conc", right = left, + ..., label = NULL, shape = NULL, color = NULL, @@ -16,6 +17,8 @@ ssd_plot_data( ylab = "Species Affected", shift_x = 3, add_x = 0, + big.mark = ",", + suffix = "\%", bounds = c(left = 1, right = 1), trans = "log10", xbreaks = waiver() @@ -28,6 +31,8 @@ ssd_plot_data( \item{right}{A string of the column in data with the right concentration values.} +\item{...}{Unused.} + \item{label}{A string of the column in data with the labels.} \item{shape}{A string of the column in data for the shape aesthetic.} @@ -44,6 +49,10 @@ ssd_plot_data( \item{add_x}{The value to add to the label x values (before multiplying by \code{shift_x}).} +\item{big.mark}{A string specifying used between every 3 digits to separate thousands on the x-axis.} + +\item{suffix}{Additional text to display after the number on the y-axis.} + \item{bounds}{A named non-negative numeric vector of the left and right bounds for uncensored missing (0 and Inf) data in terms of the orders of magnitude relative to the extremes for non-missing values.} diff --git a/man/ssd_q.Rd b/man/ssd_q.Rd index aa163167b..5ebe2b641 100644 --- a/man/ssd_q.Rd +++ b/man/ssd_q.Rd @@ -276,7 +276,7 @@ ssd_qlnorm_lnorm(0.5) ssd_qlnorm(0.5) -# multi +# multi ssd_qmulti(0.5) ssd_qweibull(0.5) diff --git a/man/ssd_r.Rd b/man/ssd_r.Rd index 0a2065e7e..77d58ff6f 100644 --- a/man/ssd_r.Rd +++ b/man/ssd_r.Rd @@ -267,7 +267,7 @@ hist(ssd_rlnorm_lnorm(10000), breaks = 1000) set.seed(50) hist(ssd_rlnorm(10000), breaks = 1000) -# multi +# multi set.seed(50) hist(ssd_rmulti(1000), breaks = 100) diff --git a/man/ssdtools-package.Rd b/man/ssdtools-package.Rd index d642226b9..31cf864eb 100644 --- a/man/ssdtools-package.Rd +++ b/man/ssdtools-package.Rd @@ -38,9 +38,7 @@ Other contributors: \item Doug Spry [contributor] \item Rick van Dam [contributor] \item Graham Batley [contributor] - \item Yulia Cuthbertson [contributor] \item Tony Bigwood [contributor] - \item Michael Antenucci [contributor] \item Ali Azizishirazi [contributor] \item Nadine Hussein \email{nadine@poissonconsulting.ca} (\href{https://orcid.org/0000-0003-4470-8361}{ORCID}) [contributor] \item Sarah Lyons \email{sarah@poissonconsulting.ca} (\href{https://orcid.org/0000-0002-6745-6796}{ORCID}) [contributor] diff --git a/paper/autoplot.png b/paper/autoplot.png index 2973913c9..fd60470e3 100644 Binary files a/paper/autoplot.png and b/paper/autoplot.png differ diff --git a/paper/paper.bib b/paper/paper.bib index f55fa85b0..fd06d7feb 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -61,13 +61,13 @@ @Book{ggplot2 doi = {10.1007/978-0-387-98141-3} } - @Manual{r, + @Manual{r, title = {R: A Language and Environment for Statistical Computing}, author = {{R Core Team}}, organization = {R Foundation for Statistical Computing}, address = {Vienna, Austria}, - year = {2018}, - url = {https://www.R-project.org/} + year = {2024}, + url = {https://www.R-project.org/}, } @book{burnham_model_2002, @@ -112,7 +112,7 @@ @Article{tmb number = {5}, pages = {1--21}, url = {http://www.jstatsoft.org/v070/i05/}, - doi = {10.18637/jss.v079.i05} + doi = {10.18637/jss.v070.i05} } @article{thorley2018ssdtools, @@ -163,8 +163,7 @@ @techreport{fox_methodologies_2021 institution = {Environmetrics Australia and Australian Institute of Marine Science}, author = {Fox, DR and Fisher, R and Thorley, JL and Schwarz, C}, month = mar, - year = {2021}, - url={https://environmetrics.net/docs/FOX%20and%20FISHER%20Final_final_report_rev2.3.pdf?189db0&189db0} + year = {2021} } @techreport{fox_methodologies_2024, @@ -173,6 +172,7 @@ @techreport{fox_methodologies_2024 Report prepared for the Department of Climate Change, Energy, the Environment and Water}, institution = {Environmetrics Australia and Australian Institute of Marine Science}, author = {Fox, DR and Fisher, R and Thorley, JL}, + doi = {10.25845/xtvt-yc51}, month = April, year = {2024} } @@ -192,7 +192,7 @@ @article{lepper2005manual volume={15}, pages={51--52}, year={2005}, - url = {https://www.helpdeskwater.nl/publish/pages/131519/_16__manual_on_the_methodological_framework_to_derive_environmental_quality_standards_for_priori.pdf} + url = {https://www.wrrl-info.de/docs/manual-derivation-qs.pdf} } @techreport{bcmecc2019, diff --git a/paper/paper.md b/paper/paper.md index f720c83c2..52d1b6c9e 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -39,16 +39,16 @@ tags: # Summary -Species sensitivity distributions (SSDs) are cumulative probability distributions that are used to estimate Hazard Concentrations ($\text{HC}_x$) - the concentration of a chemical that affects a given $x$% of species. -$\text{HC}_5$ values, which protect 95% of species, are often used for the derivation of environmental quality criteria and ecological risk assessment for contaminated ecosystems [@posthuma_species_2001]. +Species sensitivity distributions (SSDs) are cumulative probability distributions that are used to estimate Hazard Concentrations ($\text{HC}_x$) - the concentration of a chemical that is expected to affect a given $x$% of species. +$\text{HC}_5$ values, which are intended to protect 95% of species, are often used for the derivation of environmental quality criteria and ecological risk assessment for contaminated ecosystems [@posthuma_species_2001]. The Hazard Proportion ($\text{HP}_u$) is the proportion of species affected by a given concentration $x$. -`ssdtools` is an R package [@r] to fit SSDs using Maximum Likelihood [@millar_maximum_2011] and allow estimates of $\text{HC}_x$ and $\text{HP}_u$ values by model averaging [@schwarz_improving_2019] across multiple distribution [@thorley2018ssdtools]. +`ssdtools` is an R package [@r] to fit SSDs using Maximum Likelihood [@millar_maximum_2011] and estimate $\text{HC}_x$ and $\text{HP}_u$ values by model averaging [@schwarz_improving_2019] across multiple distribution [@thorley2018ssdtools]. The `shinyssdtools` R package [@dalgarno_shinyssdtools_2021] provides a Graphical User Interface to `ssdtools`. -Since the publication of @thorley2018ssdtools for v0, the `ssdtools` R package has undergone two major updates. +Since the publication of @thorley2018ssdtools, the `ssdtools` R package has undergone two major updates. The first update (v1) included the addition of four new distributions (inverse Pareto, Burr Type III and the log-normal log-normal and log-logistic log-logistic mixtures) and a switch to the R package `TMB` [@tmb] for model fitting. -The second major release (v2) includes critical updates to ensure that the $\text{HC}_x$ and $\text{HP}_u$ estimates satisfy the *inversion principle* as well as bootstrap methods to obtain confidence intervals (CIs) with appropriate coverage [@fox_methodologies_2024]. +The second major release (v2) includes critical updates to ensure that the $\text{HC}_x$ and $\text{HP}_u$ estimates satisfy the *inversion principle* as well as bootstrap methods to obtain confidence intervals (CIs) with more appropriate coverage [@fox_methodologies_2024]. # Statement of need @@ -63,10 +63,10 @@ The method, as applied in the SSD context is described in detail in [@fox_recent ## Distributions Ten distributions are currently available in `ssdtools`. -The original version (v0) of `ssdtools` provided the two parameter log-normal (lnorm), log-logistic (llogis), log-Gumbel (lgumbel, also known as the inverse Weibull), gamma, Weibull (weibull) and Gompertz (gompertz) distributions. -In the first major update (v1), the two parameter inverse Pareto (invpareto), three parameter Burr Type III (burrIII3) and five parameter log-normal log-normal (lnorm_lnorm) and log-logistic log-logistic (llogis_llogis) mixture distributions were added. +The original version (v0) of `ssdtools` provided the two parameter log-normal (`lnorm`), log-logistic (`llogis`), log-Gumbel (`lgumbel`, also known as the inverse Weibull), gamma (`gamma`), Weibull (`weibull`) and Gompertz (`gompertz`) distributions. +In the first major update (v1), the two parameter inverse Pareto (`invpareto`), three parameter Burr Type III (`burrIII3`) and five parameter log-normal log-normal (`lnorm_lnorm`) and log-logistic log-logistic (`llogis_llogis`) mixture distributions were added. Together with the Burr Type III, the inverse Pareto and inverse Weibull provide the underlying distributions of the SSD fitting software `Burrlioz` [@barry2012burrlioz] while the mixture distributions were added to accommodate bimodality [@fox_recent_2021]. -Since v1, `ssdtools` has by default fitted the lnorm, llogis, lgumbel, gamma, weibull and lnorm_lnorm distributions. +Since v1, `ssdtools` has by default fitted the `lnorm`, `llogis`, `lgumbel`, `gamma`, `weibull` and `lnorm_lnorm` distributions. ## Model Fitting @@ -99,13 +99,13 @@ Finding the solution to this last equation is referred to as *finding the root(s `ssdtools` generates confidence intervals for $\text{HC}_x$ and $\text{HP}_u$ values via bootstrapping. By default all versions of `ssdtools` use parametric bootstrapping as it has better coverage than the equivalent non parametric approach used in other SSD modelling software such as `Burrlioz` [see @fox_methodologies_2021]. -The first two versions of `ssdtools` both calculated the model averaged CI from the weighted arithmetic mean of the CIs of the individual distributions. +The first two versions of `ssdtools` both calculated the model averaged CI from the weighted arithmetic mean of the CIs of the individual distributions (`weighted_arithmetic`). Unfortunately, this approach has recently been shown to have poor coverage [@fox_methodologies_2024] and is inconsistent with the *inversion principle*. Consequently, v2 also offers a parametric bootstrap method that uses the joint cdf to generate data before refitting the original distribution set and solving for the newly estimated joint cdf [see details in @fox_methodologies_2024]. -This "multi" method can be implemented with and without re-estimation of the model weights. +This "multi" method can be implemented with (`multi_free`) and without (`multi_fixed`) re-estimation of the model weights. However, although the "multi" method has good coverage it is computationally slow. -As a result, the default method provided by the current update is a faster heuristic based on taking bootstrap samples from the individual distributions proportional to their weights [@fox_methodologies_2024]. +As a result, the default method (`weighted_samples`) provided by the current update is a faster heuristic based on taking bootstrap samples from the individual distributions proportional to their weights [@fox_methodologies_2024]. ## Multiple Distribution Functions @@ -113,7 +113,7 @@ In order to implement the "multi" method of bootstrapping, v2 also provides the ## Plotting -As well as to fitting SSDs and providing methods for estimating $\text{HC}_x$ and $\text{HP}_u$ values, `ssdtools` extends the `ggplot2` R package [@ggplot2] by defining `geom_ssdpoint()`, `geom_ssdsegment()`, `geom_hcintersect()` and `geom_xribbon()` geoms as well as a discrete color-blind scale `scale_color_sdd()` for SSD plots. +As well as fitting SSDs and providing methods for estimating $\text{HC}_x$ and $\text{HP}_u$ values, `ssdtools` extends the `ggplot2` R package [@ggplot2] by defining `geom_ssdpoint()`, `geom_ssdsegment()`, `geom_hcintersect()` and `geom_xribbon()` geoms and a discrete color-blind scale `scale_color_sdd()` for SSD plots. # Example of use @@ -174,7 +174,7 @@ ssd_plot(ssddata::ccme_boron, predictions, # Acknowledgements -We acknowledge contributions from Angeline Tillmanns, Seb Dalgarno, Kathleen McTavish, Heather Thompson, Doug Spry, Rick van Dam, Graham Batley, Yulia Cuthbertson, Tony Bigwood, Michael Antenucci and Ali Azizisharzi. +We acknowledge contributions from Angeline Tillmanns, Seb Dalgarno, Kathleen McTavish, Heather Thompson, Doug Spry, Rick van Dam, Graham Batley, Tony Bigwood, and Ali Azizisharzi. Development of `ssdtools` was funded by the Ministry of Environment and Climate Change Strategy, British Columbia and the Department of Climate Change, Energy, the Environment and Water, Australia. # References diff --git a/paper/ssd_plot.png b/paper/ssd_plot.png index 2f71114fe..94f1b50cf 100644 Binary files a/paper/ssd_plot.png and b/paper/ssd_plot.png differ diff --git a/tests/testthat/_snaps/autoplot/autoplot.png b/tests/testthat/_snaps/autoplot/autoplot.png index 944703200..655da055d 100644 Binary files a/tests/testthat/_snaps/autoplot/autoplot.png and b/tests/testthat/_snaps/autoplot/autoplot.png differ diff --git a/tests/testthat/_snaps/autoplot/autoplot_bigmark.png b/tests/testthat/_snaps/autoplot/autoplot_bigmark.png new file mode 100644 index 000000000..563d8d30c Binary files /dev/null and b/tests/testthat/_snaps/autoplot/autoplot_bigmark.png differ diff --git a/tests/testthat/_snaps/autoplot/autoplot_new.png b/tests/testthat/_snaps/autoplot/autoplot_new.png index aa3167661..419dbe19f 100644 Binary files a/tests/testthat/_snaps/autoplot/autoplot_new.png and b/tests/testthat/_snaps/autoplot/autoplot_new.png differ diff --git a/tests/testthat/_snaps/autoplot/autoplot_rescale.png b/tests/testthat/_snaps/autoplot/autoplot_rescale.png index b37333aeb..b7c174566 100644 Binary files a/tests/testthat/_snaps/autoplot/autoplot_rescale.png and b/tests/testthat/_snaps/autoplot/autoplot_rescale.png differ diff --git a/tests/testthat/_snaps/autoplot/suffix.png b/tests/testthat/_snaps/autoplot/suffix.png new file mode 100644 index 000000000..9d3077795 Binary files /dev/null and b/tests/testthat/_snaps/autoplot/suffix.png differ diff --git a/tests/testthat/_snaps/bcanz/hc_chloride.csv b/tests/testthat/_snaps/bcanz/hc_chloride.csv index fd082fdce..84b836c9f 100644 --- a/tests/testthat/_snaps/bcanz/hc_chloride.csv +++ b/tests/testthat/_snaps/bcanz/hc_chloride.csv @@ -1,5 +1,5 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.01,0.267258,0.337762,0.0476618,0.995392,1,parametric,10,1,numeric(0) -average,0.05,1.25677,0.698581,0.469904,2.44697,1,parametric,10,1,numeric(0) -average,0.1,2.38164,0.98634,1.21915,4.18705,1,parametric,10,1,numeric(0) +average,0.01,0.267258,0.337761,0.0476618,0.995389,1,parametric,10,1,numeric(0) +average,0.05,1.25678,0.69858,0.469904,2.44696,1,parametric,10,1,numeric(0) +average,0.1,2.38165,0.986339,1.21915,4.18705,1,parametric,10,1,numeric(0) average,0.2,4.81003,1.41415,3.28125,7.51421,1,parametric,10,1,numeric(0) diff --git a/tests/testthat/_snaps/bcanz/hp_chloride.csv b/tests/testthat/_snaps/bcanz/hp_chloride.csv index 380b4a211..8c71134ea 100644 --- a/tests/testthat/_snaps/bcanz/hp_chloride.csv +++ b/tests/testthat/_snaps/bcanz/hp_chloride.csv @@ -1,2 +1,2 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,3.89879,3.33023,1.2421,10.5385,1,parametric,10,1,numeric(0) +average,1,3.89878,3.33023,1.2421,10.5385,1,parametric,10,1,numeric(0) diff --git a/tests/testthat/_snaps/censor/boron_10.csv b/tests/testthat/_snaps/censor/boron_10.csv new file mode 100644 index 000000000..3b078a06c --- /dev/null +++ b/tests/testthat/_snaps/censor/boron_10.csv @@ -0,0 +1,29 @@ +Chemical,Species,Conc,Group,Units,right +Boron,Oncorhynchus mykiss,2.1,Fish,mg/L,2.1 +Boron,Ictalurus punctatus,2.4,Fish,mg/L,2.4 +Boron,Micropterus salmoides,4.1,Fish,mg/L,4.1 +Boron,Brachydanio rerio,10,Fish,mg/L,10 +Boron,Carassius auratus,10,Fish,mg/L,Inf +Boron,Pimephales promelas,10,Fish,mg/L,Inf +Boron,Daphnia magna,6,Invertebrate,mg/L,6 +Boron,Opercularia bimarginata,10,Invertebrate,mg/L,10 +Boron,Ceriodaphnia dubia,10,Invertebrate,mg/L,Inf +Boron,Entosiphon sulcatum,10,Invertebrate,mg/L,Inf +Boron,Chironomus decorus,10,Invertebrate,mg/L,Inf +Boron,Paramecium caudatum,10,Invertebrate,mg/L,Inf +Boron,Rana pipiens,10,Amphibian,mg/L,Inf +Boron,Bufo fowleri,10,Amphibian,mg/L,Inf +Boron,Bufo americanus,10,Amphibian,mg/L,Inf +Boron,Ambystoma jeffersonianum,10,Amphibian,mg/L,Inf +Boron,Ambystoma maculatum,10,Amphibian,mg/L,Inf +Boron,Rana sylvatica,10,Amphibian,mg/L,Inf +Boron,Elodea canadensis,1,Plant,mg/L,1 +Boron,Spirodella polyrrhiza,1.8,Plant,mg/L,1.8 +Boron,Chlorella pyrenoidosa,2,Plant,mg/L,2 +Boron,Phragmites australis,4,Plant,mg/L,4 +Boron,Chlorella vulgaris,5.2,Plant,mg/L,5.2 +Boron,Selenastrum capricornutum,10,Plant,mg/L,Inf +Boron,Scenedesmus subspicatus,10,Plant,mg/L,Inf +Boron,Myriophyllum spicatum,10,Plant,mg/L,Inf +Boron,Anacystis nidulans,10,Plant,mg/L,Inf +Boron,Lemna minor,10,Plant,mg/L,Inf diff --git a/tests/testthat/_snaps/censor/boron_25.csv b/tests/testthat/_snaps/censor/boron_25.csv new file mode 100644 index 000000000..f1533e86c --- /dev/null +++ b/tests/testthat/_snaps/censor/boron_25.csv @@ -0,0 +1,29 @@ +Chemical,Species,Conc,Group,Units,right +Boron,Oncorhynchus mykiss,0,Fish,mg/L,2.5 +Boron,Ictalurus punctatus,0,Fish,mg/L,2.5 +Boron,Micropterus salmoides,4.1,Fish,mg/L,4.1 +Boron,Brachydanio rerio,10,Fish,mg/L,10 +Boron,Carassius auratus,15.6,Fish,mg/L,15.6 +Boron,Pimephales promelas,18.3,Fish,mg/L,18.3 +Boron,Daphnia magna,6,Invertebrate,mg/L,6 +Boron,Opercularia bimarginata,10,Invertebrate,mg/L,10 +Boron,Ceriodaphnia dubia,13.4,Invertebrate,mg/L,13.4 +Boron,Entosiphon sulcatum,15,Invertebrate,mg/L,15 +Boron,Chironomus decorus,20,Invertebrate,mg/L,20 +Boron,Paramecium caudatum,20,Invertebrate,mg/L,20 +Boron,Rana pipiens,20.4,Amphibian,mg/L,20.4 +Boron,Bufo fowleri,48.6,Amphibian,mg/L,48.6 +Boron,Bufo americanus,50,Amphibian,mg/L,50 +Boron,Ambystoma jeffersonianum,70.7,Amphibian,mg/L,70.7 +Boron,Ambystoma maculatum,70.7,Amphibian,mg/L,70.7 +Boron,Rana sylvatica,70.7,Amphibian,mg/L,70.7 +Boron,Elodea canadensis,0,Plant,mg/L,2.5 +Boron,Spirodella polyrrhiza,0,Plant,mg/L,2.5 +Boron,Chlorella pyrenoidosa,0,Plant,mg/L,2.5 +Boron,Phragmites australis,4,Plant,mg/L,4 +Boron,Chlorella vulgaris,5.2,Plant,mg/L,5.2 +Boron,Selenastrum capricornutum,12.3,Plant,mg/L,12.3 +Boron,Scenedesmus subspicatus,30,Plant,mg/L,30 +Boron,Myriophyllum spicatum,34.2,Plant,mg/L,34.2 +Boron,Anacystis nidulans,50,Plant,mg/L,50 +Boron,Lemna minor,60,Plant,mg/L,60 diff --git a/tests/testthat/_snaps/censor/boron_2510.csv b/tests/testthat/_snaps/censor/boron_2510.csv new file mode 100644 index 000000000..903ce8a06 --- /dev/null +++ b/tests/testthat/_snaps/censor/boron_2510.csv @@ -0,0 +1,29 @@ +Chemical,Species,Conc,Group,Units,right +Boron,Oncorhynchus mykiss,0,Fish,mg/L,2.5 +Boron,Ictalurus punctatus,0,Fish,mg/L,2.5 +Boron,Micropterus salmoides,4.1,Fish,mg/L,4.1 +Boron,Brachydanio rerio,10,Fish,mg/L,10 +Boron,Carassius auratus,10,Fish,mg/L,Inf +Boron,Pimephales promelas,10,Fish,mg/L,Inf +Boron,Daphnia magna,6,Invertebrate,mg/L,6 +Boron,Opercularia bimarginata,10,Invertebrate,mg/L,10 +Boron,Ceriodaphnia dubia,10,Invertebrate,mg/L,Inf +Boron,Entosiphon sulcatum,10,Invertebrate,mg/L,Inf +Boron,Chironomus decorus,10,Invertebrate,mg/L,Inf +Boron,Paramecium caudatum,10,Invertebrate,mg/L,Inf +Boron,Rana pipiens,10,Amphibian,mg/L,Inf +Boron,Bufo fowleri,10,Amphibian,mg/L,Inf +Boron,Bufo americanus,10,Amphibian,mg/L,Inf +Boron,Ambystoma jeffersonianum,10,Amphibian,mg/L,Inf +Boron,Ambystoma maculatum,10,Amphibian,mg/L,Inf +Boron,Rana sylvatica,10,Amphibian,mg/L,Inf +Boron,Elodea canadensis,0,Plant,mg/L,2.5 +Boron,Spirodella polyrrhiza,0,Plant,mg/L,2.5 +Boron,Chlorella pyrenoidosa,0,Plant,mg/L,2.5 +Boron,Phragmites australis,4,Plant,mg/L,4 +Boron,Chlorella vulgaris,5.2,Plant,mg/L,5.2 +Boron,Selenastrum capricornutum,10,Plant,mg/L,Inf +Boron,Scenedesmus subspicatus,10,Plant,mg/L,Inf +Boron,Myriophyllum spicatum,10,Plant,mg/L,Inf +Boron,Anacystis nidulans,10,Plant,mg/L,Inf +Boron,Lemna minor,10,Plant,mg/L,Inf diff --git a/tests/testthat/_snaps/coef/coef.csv b/tests/testthat/_snaps/coef/coef.csv index f6214cea2..dd68d3516 100644 --- a/tests/testthat/_snaps/coef/coef.csv +++ b/tests/testthat/_snaps/coef/coef.csv @@ -6,11 +6,11 @@ lgumbel,scalelog,1.23224,0.17302 llogis,locationlog,2.62628,0.248257 llogis,scalelog,0.740426,0.114375 lnorm,meanlog,2.56165,0.234629 -lnorm,sdlog,1.24154,0.165907 -lnorm_lnorm,meanlog1,0.949487,0.318001 -lnorm_lnorm,meanlog2,3.20108,0.25292 -lnorm_lnorm,pmix,0.283994,0.123402 -lnorm_lnorm,sdlog1,0.554514,0.212453 -lnorm_lnorm,sdlog2,0.768824,0.193734 +lnorm,sdlog,1.24154,0.165908 +lnorm_lnorm,meanlog1,0.949483,0.318008 +lnorm_lnorm,meanlog2,3.20102,0.252952 +lnorm_lnorm,pmix,0.283968,0.123406 +lnorm_lnorm,sdlog1,0.554465,0.212427 +lnorm_lnorm,sdlog2,0.768862,0.193762 weibull,scale,23.514,4.85516 weibull,shape,0.9661,0.14542 diff --git a/tests/testthat/_snaps/data/boron_stable.csv b/tests/testthat/_snaps/data/boron_stable.csv index f6214cea2..dd68d3516 100644 --- a/tests/testthat/_snaps/data/boron_stable.csv +++ b/tests/testthat/_snaps/data/boron_stable.csv @@ -6,11 +6,11 @@ lgumbel,scalelog,1.23224,0.17302 llogis,locationlog,2.62628,0.248257 llogis,scalelog,0.740426,0.114375 lnorm,meanlog,2.56165,0.234629 -lnorm,sdlog,1.24154,0.165907 -lnorm_lnorm,meanlog1,0.949487,0.318001 -lnorm_lnorm,meanlog2,3.20108,0.25292 -lnorm_lnorm,pmix,0.283994,0.123402 -lnorm_lnorm,sdlog1,0.554514,0.212453 -lnorm_lnorm,sdlog2,0.768824,0.193734 +lnorm,sdlog,1.24154,0.165908 +lnorm_lnorm,meanlog1,0.949483,0.318008 +lnorm_lnorm,meanlog2,3.20102,0.252952 +lnorm_lnorm,pmix,0.283968,0.123406 +lnorm_lnorm,sdlog1,0.554465,0.212427 +lnorm_lnorm,sdlog2,0.768862,0.193762 weibull,scale,23.514,4.85516 weibull,shape,0.9661,0.14542 diff --git a/tests/testthat/_snaps/data/boron_unstable.csv b/tests/testthat/_snaps/data/boron_unstable.csv deleted file mode 100644 index 172c259ac..000000000 --- a/tests/testthat/_snaps/data/boron_unstable.csv +++ /dev/null @@ -1,10 +0,0 @@ -dist,term,est,se -gompertz,location,0.0394073,0.0119791 -gompertz,shape,0.00260432,0.00997275 -invpareto,scale,75.2608,0 -invpareto,shape,0.568403,0.107418 -llogis_llogis,locationlog1,0.896787,0.379717 -llogis_llogis,locationlog2,3.14918,0.288289 -llogis_llogis,pmix,0.255219,0.14435 -llogis_llogis,scalelog1,0.317647,0.167982 -llogis_llogis,scalelog2,0.49671,0.135114 diff --git a/tests/testthat/_snaps/estimates.md b/tests/testthat/_snaps/estimates.md index 26376bb64..91e46def5 100644 --- a/tests/testthat/_snaps/estimates.md +++ b/tests/testthat/_snaps/estimates.md @@ -31,28 +31,28 @@ [1] 0.1772362 $lnorm.meanlog - [1] 2.561645 + [1] 2.561646 $lnorm.sdlog - [1] 1.241539 + [1] 1.241541 $lnorm_lnorm.weight [1] 0.02962678 $lnorm_lnorm.meanlog1 - [1] 0.9494874 + [1] 0.9494834 $lnorm_lnorm.meanlog2 - [1] 3.201082 + [1] 3.201021 $lnorm_lnorm.pmix - [1] 0.2839941 + [1] 0.2839679 $lnorm_lnorm.sdlog1 - [1] 0.5545143 + [1] 0.5544649 $lnorm_lnorm.sdlog2 - [1] 0.7688237 + [1] 0.7688617 $weibull.weight [1] 0.3574716 @@ -145,28 +145,28 @@ [1] 0.1772362 $lnorm.meanlog - [1] 2.561645 + [1] 2.561646 $lnorm.sdlog - [1] 1.241539 + [1] 1.241541 $lnorm_lnorm.weight [1] 0.02962678 $lnorm_lnorm.meanlog1 - [1] 0.9494874 + [1] 0.9494834 $lnorm_lnorm.meanlog2 - [1] 3.201082 + [1] 3.201021 $lnorm_lnorm.pmix - [1] 0.2839941 + [1] 0.2839679 $lnorm_lnorm.sdlog1 - [1] 0.5545143 + [1] 0.5544649 $lnorm_lnorm.sdlog2 - [1] 0.7688237 + [1] 0.7688617 $weibull.weight [1] 0.3574716 diff --git a/tests/testthat/_snaps/fit/min_pmix5.csv b/tests/testthat/_snaps/fit/min_pmix5.csv index e0efe08d2..10046e655 100644 --- a/tests/testthat/_snaps/fit/min_pmix5.csv +++ b/tests/testthat/_snaps/fit/min_pmix5.csv @@ -1,9 +1,9 @@ dist,term,est,se -lnorm_lnorm,meanlog1,-0.00758812,0.00926927 -lnorm_lnorm,meanlog2,1.00223,0.00336463 -lnorm_lnorm,pmix,0.105997,0.00973407 -lnorm_lnorm,sdlog1,0.095433,0.00655445 -lnorm_lnorm,sdlog2,0.100602,0.00237915 +lnorm_lnorm,meanlog1,-0.0075959,0.00926899 +lnorm_lnorm,meanlog2,1.00223,0.00336462 +lnorm_lnorm,pmix,0.106001,0.00973436 +lnorm_lnorm,sdlog1,0.0954301,0.00655405 +lnorm_lnorm,sdlog2,0.100602,0.00237913 llogis_llogis,locationlog1,-0.00612638,0.0092506 llogis_llogis,locationlog2,1.002,0.00336951 llogis_llogis,pmix,0.105997,0.00973431 diff --git a/tests/testthat/_snaps/fit/min_pmix_05.csv b/tests/testthat/_snaps/fit/min_pmix_05.csv index 7bc4b7263..e1aa557fc 100644 --- a/tests/testthat/_snaps/fit/min_pmix_05.csv +++ b/tests/testthat/_snaps/fit/min_pmix_05.csv @@ -1,8 +1,8 @@ dist,term,est,se lnorm,meanlog,2.56165,0.234629 -lnorm,sdlog,1.24154,0.165907 +lnorm,sdlog,1.24154,0.165908 lnorm_lnorm,meanlog1,1.59725,NA -lnorm_lnorm,meanlog2,3.47902,NA +lnorm_lnorm,meanlog2,3.47901,NA lnorm_lnorm,pmix,0.5,NA -lnorm_lnorm,sdlog1,0.955512,NA -lnorm_lnorm,sdlog2,0.642579,0.028436 +lnorm_lnorm,sdlog1,0.955548,NA +lnorm_lnorm,sdlog2,0.642588,0.0283432 diff --git a/tests/testthat/_snaps/fit/tidy_pmix0.csv b/tests/testthat/_snaps/fit/tidy_pmix0.csv index 597d9dbaa..39fad2185 100644 --- a/tests/testthat/_snaps/fit/tidy_pmix0.csv +++ b/tests/testthat/_snaps/fit/tidy_pmix0.csv @@ -1,9 +1,9 @@ dist,term,est,se -lnorm_lnorm,meanlog1,-1.29446,0.210528 -lnorm_lnorm,meanlog2,2.01561,0.0865504 -lnorm_lnorm,pmix,0.0194208,0.0139986 -lnorm_lnorm,sdlog1,0.288835,0.146576 -lnorm_lnorm,sdlog2,0.853686,0.0622707 +lnorm_lnorm,meanlog1,-1.29491,0.210649 +lnorm_lnorm,meanlog2,2.01558,0.0865548 +lnorm_lnorm,pmix,0.019428,0.0140044 +lnorm_lnorm,sdlog1,0.288981,0.146727 +lnorm_lnorm,sdlog2,0.853724,0.0622777 llogis_llogis,locationlog1,1.5014,0.774965 llogis_llogis,locationlog2,2.26704,0.453603 llogis_llogis,pmix,0.39931,0.682828 diff --git a/tests/testthat/_snaps/fit/tidy_stable_anon_e.csv b/tests/testthat/_snaps/fit/tidy_stable_anon_e.csv index b6b7a8825..f2a974d00 100644 --- a/tests/testthat/_snaps/fit/tidy_stable_anon_e.csv +++ b/tests/testthat/_snaps/fit/tidy_stable_anon_e.csv @@ -5,12 +5,12 @@ lgumbel,locationlog,4.40322,0.889803 lgumbel,scalelog,3.45475,0.638071 llogis,locationlog,6.53111,0.964136 llogis,scalelog,2.18789,0.423632 -lnorm,meanlog,6.2366,0.858092 -lnorm,sdlog,3.538,0.606761 -lnorm_lnorm,meanlog1,2.22869,0.541909 -lnorm_lnorm,meanlog2,9.04841,0.266623 -lnorm_lnorm,pmix,0.412379,0.119543 -lnorm_lnorm,sdlog1,1.42176,0.39782 -lnorm_lnorm,sdlog2,0.84076,0.188761 +lnorm,meanlog,6.23661,0.858094 +lnorm,sdlog,3.53801,0.606764 +lnorm_lnorm,meanlog1,2.22872,0.541792 +lnorm_lnorm,meanlog2,9.04834,0.26661 +lnorm_lnorm,pmix,0.412297,0.119535 +lnorm_lnorm,sdlog1,1.42148,0.397631 +lnorm_lnorm,sdlog2,0.840727,0.188743 weibull,scale,2701.04,1846.65 weibull,shape,0.372736,0.0768177 diff --git a/tests/testthat/_snaps/fit/tidy_stable_computable.csv b/tests/testthat/_snaps/fit/tidy_stable_computable.csv index eafdb9c52..49960faef 100644 --- a/tests/testthat/_snaps/fit/tidy_stable_computable.csv +++ b/tests/testthat/_snaps/fit/tidy_stable_computable.csv @@ -1,12 +1,7 @@ dist,term,est,se -lgumbel,locationlog,0.011,NA -lgumbel,scalelog,0.0337,NA -llogis,locationlog,0.012,0.278 -llogis,scalelog,0.0109,0.253 -lnorm,meanlog,0.0233,1.48 -lnorm,sdlog,0.0345,2.19 -lnorm_lnorm,meanlog1,0.0199,NA -lnorm_lnorm,meanlog2,0.329,NA -lnorm_lnorm,pmix,0.885,NA -lnorm_lnorm,sdlog1,0.0346,NA -lnorm_lnorm,sdlog2,1.57e-4,NA +lgumbel,locationlog,0.0110209,NA +lgumbel,scalelog,0.0337459,NA +llogis,locationlog,0.0119926,0.278196 +llogis,scalelog,0.0109175,0.253246 +lnorm,meanlog,0.0233306,1.41354 +lnorm,sdlog,0.0345919,2.09585 diff --git a/tests/testthat/_snaps/fit/tidy_stable_rescale.csv b/tests/testthat/_snaps/fit/tidy_stable_rescale.csv index 7da467020..0bb0de55c 100644 --- a/tests/testthat/_snaps/fit/tidy_stable_rescale.csv +++ b/tests/testthat/_snaps/fit/tidy_stable_rescale.csv @@ -5,12 +5,12 @@ lgumbel,locationlog,-0.206565,0.247321 lgumbel,scalelog,1.23224,0.17302 llogis,locationlog,0.497053,0.248257 llogis,scalelog,0.740426,0.114375 -lnorm,meanlog,0.432508,0.234627 -lnorm,sdlog,1.24153,0.165905 -lnorm_lnorm,meanlog1,-1.17973,0.317999 -lnorm_lnorm,meanlog2,1.07186,0.252923 -lnorm_lnorm,pmix,0.283988,0.123401 -lnorm_lnorm,sdlog1,0.554502,0.212446 -lnorm_lnorm,sdlog2,0.768838,0.19374 +lnorm,meanlog,0.432422,0.234629 +lnorm,sdlog,1.24154,0.165908 +lnorm_lnorm,meanlog1,-1.17972,0.318004 +lnorm_lnorm,meanlog2,1.07186,0.252919 +lnorm_lnorm,pmix,0.283998,0.123402 +lnorm_lnorm,sdlog1,0.554516,0.212457 +lnorm_lnorm,sdlog2,0.768824,0.193733 weibull,scale,2.79651,0.577423 weibull,shape,0.9661,0.14542 diff --git a/tests/testthat/_snaps/fit/tidy_unstable_anon_e.csv b/tests/testthat/_snaps/fit/tidy_unstable_anon_e.csv index 4ff679e1a..4193085c5 100644 --- a/tests/testthat/_snaps/fit/tidy_unstable_anon_e.csv +++ b/tests/testthat/_snaps/fit/tidy_unstable_anon_e.csv @@ -1,4 +1,7 @@ dist,term,est,se +burrIII3,scale,26520.2,9210.27 +burrIII3,shape1,0.05,0.0486808 +burrIII3,shape2,5.14793,4.65934 invpareto,scale,38106.2,0 invpareto,shape,0.231937,0.0562529 llogis_llogis,locationlog1,2.26716,0.557743 diff --git a/tests/testthat/_snaps/ggplot/geom_ssd.png b/tests/testthat/_snaps/ggplot/geom_ssd.png deleted file mode 100644 index 6b7dfc014..000000000 Binary files a/tests/testthat/_snaps/ggplot/geom_ssd.png and /dev/null differ diff --git a/tests/testthat/_snaps/ggplot/geom_xribbon.png b/tests/testthat/_snaps/ggplot/geom_xribbon.png index a6f322a73..c7a3065e2 100644 Binary files a/tests/testthat/_snaps/ggplot/geom_xribbon.png and b/tests/testthat/_snaps/ggplot/geom_xribbon.png differ diff --git a/tests/testthat/_snaps/ggplot/stat_ssd.png b/tests/testthat/_snaps/ggplot/stat_ssd.png deleted file mode 100644 index 6b7dfc014..000000000 Binary files a/tests/testthat/_snaps/ggplot/stat_ssd.png and /dev/null differ diff --git a/tests/testthat/_snaps/gof/gof.csv b/tests/testthat/_snaps/gof/gof.csv index f7742c46f..d99759230 100644 --- a/tests/testthat/_snaps/gof/gof.csv +++ b/tests/testthat/_snaps/gof/gof.csv @@ -2,6 +2,6 @@ dist,ad,ks,cvm,aic,aicc,bic,delta,weight gamma,0.806802,0.839158,0.846869,237.63,238.11,240.295,0.005,0.357 lgumbel,0.459696,0.484779,0.444511,244.186,244.666,246.85,6.561,0.013 llogis,0.758595,0.945045,0.821266,241.015,241.495,243.679,3.39,0.066 -lnorm,0.738159,0.908488,0.753538,239.028,239.508,241.693,1.403,0.177 -lnorm_lnorm,0.921619,0.846441,0.929063,240.359,243.086,247.02,4.981,0.03 +lnorm,0.738163,0.908491,0.753541,239.028,239.508,241.693,1.403,0.177 +lnorm_lnorm,0.92162,0.846427,0.929077,240.359,243.086,247.02,4.981,0.03 weibull,0.81293,0.838819,0.854175,237.625,238.105,240.29,0,0.357 diff --git a/tests/testthat/_snaps/gof/gof_statistic.csv b/tests/testthat/_snaps/gof/gof_statistic.csv index 50f6a7107..4e70908e8 100644 --- a/tests/testthat/_snaps/gof/gof_statistic.csv +++ b/tests/testthat/_snaps/gof/gof_statistic.csv @@ -2,6 +2,6 @@ dist,ad,ks,cvm,aic,aicc,bic,delta,weight gamma,0.440212,0.116849,0.055402,237.63,238.11,240.295,0.005,0.357 lgumbel,0.828626,0.158239,0.13399,244.186,244.666,246.85,6.561,0.013 llogis,0.487064,0.0993593,0.0594849,241.015,241.495,243.679,3.39,0.066 -lnorm,0.507035,0.106514,0.0703318,239.028,239.508,241.693,1.403,0.177 -lnorm_lnorm,0.320198,0.11587,0.0413992,240.359,243.086,247.02,4.981,0.03 +lnorm,0.507031,0.106514,0.0703312,239.028,239.508,241.693,1.403,0.177 +lnorm_lnorm,0.320198,0.115872,0.0413966,240.359,243.086,247.02,4.981,0.03 weibull,0.434234,0.116894,0.0542281,237.625,238.105,240.29,0,0.357 diff --git a/tests/testthat/_snaps/gompertz/hc_prob.csv b/tests/testthat/_snaps/gompertz/hc_prob.csv deleted file mode 100644 index 0715b8565..000000000 --- a/tests/testthat/_snaps/gompertz/hc_prob.csv +++ /dev/null @@ -1,7 +0,0 @@ -dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,0.179453,0.307799,0.0992422,1.23754,1,parametric,100,0.92,"c(`000000001_gompertz` = 0.232668, `000000003_gompertz` = 0.104651, `000000004_gompertz` = 0.546479, `000000005_gompertz` = 0.59723, `000000006_gompertz` = 0.232644, `000000007_gompertz` = 0.26047, `000000008_gompertz` = 0.194946, `000000009_gompertz` = 0.687566, `000000010_gompertz` = 0.158672, `000000011_gompertz` = 0.252489, `000000012_gompertz` = 0.212705, `000000013_gompertz` = 1.32526, `000000014_gompertz` = 0.196413, `000000015_gompertz` = 0.556619, `000000016_gompertz` = 0.542088, `000000017_gompertz` = 0.258851, -`000000018_gompertz` = 0.467362, `000000019_gompertz` = 0.444558, `000000020_gompertz` = 0.252365, `000000021_gompertz` = 1.00627, `000000022_gompertz` = 0.262159, `000000023_gompertz` = 0.201961, `000000024_gompertz` = 0.221781, `000000025_gompertz` = 0.370823, `000000026_gompertz` = 0.381622, `000000027_gompertz` = 0.587692, `000000028_gompertz` = 0.154181, `000000031_gompertz` = 0.10423, `000000032_gompertz` = 0.250053, `000000033_gompertz` = 0.462225, `000000034_gompertz` = 0.39652, `000000035_gompertz` = 0, -`000000036_gompertz` = 0.258822, `000000037_gompertz` = 0.242274, `000000038_gompertz` = 0.347614, `000000039_gompertz` = 0.29439, `000000040_gompertz` = 1.14346, `000000041_gompertz` = 0.135087, `000000042_gompertz` = 0.119971, `000000043_gompertz` = 0.314016, `000000044_gompertz` = 0.0979661, `000000045_gompertz` = 0.135296, `000000046_gompertz` = 0.260949, `000000047_gompertz` = 0.50742, `000000049_gompertz` = 1.83785, `000000050_gompertz` = 0.183739, `000000051_gompertz` = 0.119605, `000000052_gompertz` = 0.166286, -`000000053_gompertz` = 0.375928, `000000054_gompertz` = 0.16, `000000055_gompertz` = 0.378692, `000000056_gompertz` = 0.198193, `000000057_gompertz` = 0.854231, `000000058_gompertz` = 0.113677, `000000059_gompertz` = 0.0460489, `000000060_gompertz` = 0.26119, `000000061_gompertz` = 0.349783, `000000062_gompertz` = 0.155674, `000000063_gompertz` = 0.25708, `000000065_gompertz` = 0.862409, `000000066_gompertz` = 0.252748, `000000067_gompertz` = 1.27322, `000000068_gompertz` = 0.30646, `000000069_gompertz` = 0.102607, -`000000071_gompertz` = 0.882485, `000000072_gompertz` = 0.738937, `000000074_gompertz` = 0.2907, `000000075_gompertz` = 0.428083, `000000076_gompertz` = 0.325723, `000000077_gompertz` = 0.260432, `000000078_gompertz` = 0.331494, `000000079_gompertz` = 1.0526, `000000080_gompertz` = 0.616152, `000000081_gompertz` = 0.183109, `000000082_gompertz` = 0.184165, `000000083_gompertz` = 0.141392, `000000084_gompertz` = 0.324602, `000000085_gompertz` = 0.366267, `000000086_gompertz` = 0.672032, `000000087_gompertz` = 0.274923, -`000000088_gompertz` = 0.283306, `000000089_gompertz` = 0.252262, `000000090_gompertz` = 0.244424, `000000091_gompertz` = 0.109766, `000000092_gompertz` = 0.192248, `000000093_gompertz` = 0.156249, `000000094_gompertz` = 0.392504, `000000095_gompertz` = 0.171986, `000000096_gompertz` = 0.217738, `000000097_gompertz` = 0.548714, `000000098_gompertz` = 0.431485, `000000100_gompertz` = 0.298434)" diff --git a/tests/testthat/_snaps/hc-burrlioz/hc_boron0.csv b/tests/testthat/_snaps/hc-burrlioz/hc_boron0.csv deleted file mode 100644 index 481b58f95..000000000 --- a/tests/testthat/_snaps/hc-burrlioz/hc_boron0.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -invpareto,0.05,0.386944,0.347873,0.195882,1.10643,1,non-parametric,10,1,numeric(0) diff --git a/tests/testthat/_snaps/hc/censored_5ll.csv b/tests/testthat/_snaps/hc/censored_5ll.csv index b6587eccd..be036a56e 100644 --- a/tests/testthat/_snaps/hc/censored_5ll.csv +++ b/tests/testthat/_snaps/hc/censored_5ll.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.36601,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.05,1.36604,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/censored_each.csv b/tests/testthat/_snaps/hc/censored_each.csv index 972c829a6..77b759392 100644 --- a/tests/testthat/_snaps/hc/censored_each.csv +++ b/tests/testthat/_snaps/hc/censored_each.csv @@ -1,3 +1,3 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples lnorm,0.05,1.31771,NA,NA,NA,NA,parametric,0,NA,numeric(0) -lnorm_lnorm,0.05,1.35376,NA,NA,NA,NA,parametric,0,NA,numeric(0) +lnorm_lnorm,0.05,1.35381,NA,NA,NA,NA,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/fullyleft.csv b/tests/testthat/_snaps/hc/fullyleft.csv new file mode 100644 index 000000000..733994ca2 --- /dev/null +++ b/tests/testthat/_snaps/hc/fullyleft.csv @@ -0,0 +1,2 @@ +dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples +average,0.05,0.0276014,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc.csv b/tests/testthat/_snaps/hc/hc.csv index f251f4bc7..95e059438 100644 --- a/tests/testthat/_snaps/hc/hc.csv +++ b/tests/testthat/_snaps/hc/hc.csv @@ -2,6 +2,6 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples gamma,0.05,1.07428,0.983875,0.709111,3.19472,0.356574,parametric,10,1,"c(`000000001_gamma` = 0.987785, `000000002_gamma` = 3.15112, `000000003_gamma` = 0.84656, `000000004_gamma` = 0.70604, `000000005_gamma` = 1.98672, `000000006_gamma` = 0.873452, `000000007_gamma` = 1.18798, `000000008_gamma` = 0.836688, `000000009_gamma` = 0.719689, `000000010_gamma` = 3.20738)" lgumbel,0.05,1.76939,0.401763,1.39032,2.63032,0.0134466,parametric,10,1,"c(`000000001_lgumbel` = 2.2833, `000000002_lgumbel` = 1.48094, `000000003_lgumbel` = 2.12922, `000000004_lgumbel` = 2.36856, `000000005_lgumbel` = 1.81154, `000000006_lgumbel` = 1.96535, `000000007_lgumbel` = 1.36401, `000000008_lgumbel` = 1.93797, `000000009_lgumbel` = 2.70632, `000000010_lgumbel` = 2.09232)" llogis,0.05,1.56226,0.834776,0.851639,3.37274,0.0656452,parametric,10,1,"c(`000000001_llogis` = 0.751505, `000000002_llogis` = 3.04268, `000000003_llogis` = 2.10953, `000000004_llogis` = 2.22634, `000000005_llogis` = 1.30249, `000000006_llogis` = 2.52802, `000000007_llogis` = 3.46857, `000000008_llogis` = 2.04533, `000000009_llogis` = 1.85618, `000000010_llogis` = 1.19654)" -lnorm,0.05,1.68118,0.823602,0.889403,3.02109,0.177236,parametric,10,1,"c(`000000001_lnorm` = 3.09184, `000000002_lnorm` = 2.42899, `000000003_lnorm` = 1.325, `000000004_lnorm` = 1.61081, `000000005_lnorm` = 2.6033, `000000006_lnorm` = 0.865976, `000000007_lnorm` = 2.77742, `000000008_lnorm` = 1.19715, `000000009_lnorm` = 2.45546, `000000010_lnorm` = 0.970096)" -lnorm_lnorm,0.05,1.54136,0.329201,0.952193,1.82182,0.0296268,parametric,10,1,"c(`000000001_lnorm_lnorm` = 1.64164, `000000002_lnorm_lnorm` = 1.67905, `000000003_lnorm_lnorm` = 1.80859, `000000004_lnorm_lnorm` = 0.921876, `000000005_lnorm_lnorm` = 1.68554, `000000006_lnorm_lnorm` = 1.28523, `000000007_lnorm_lnorm` = 1.82566, `000000008_lnorm_lnorm` = 1.05662, `000000009_lnorm_lnorm` = 1.20995, `000000010_lnorm_lnorm` = 1.67571)" +lnorm,0.05,1.68117,0.823601,0.8894,3.02109,0.177236,parametric,10,1,"c(`000000001_lnorm` = 3.09183, `000000002_lnorm` = 2.42899, `000000003_lnorm` = 1.325, `000000004_lnorm` = 1.6108, `000000005_lnorm` = 2.60329, `000000006_lnorm` = 0.865972, `000000007_lnorm` = 2.77742, `000000008_lnorm` = 1.19715, `000000009_lnorm` = 2.45546, `000000010_lnorm` = 0.970093)" +lnorm_lnorm,0.05,1.54147,0.329192,0.952275,1.82197,0.0296268,parametric,10,1,"c(`000000001_lnorm_lnorm` = 1.64167, `000000002_lnorm_lnorm` = 1.6791, `000000003_lnorm_lnorm` = 1.80861, `000000004_lnorm_lnorm` = 0.921958, `000000005_lnorm_lnorm` = 1.68551, `000000006_lnorm_lnorm` = 1.28531, `000000007_lnorm_lnorm` = 1.82585, `000000008_lnorm_lnorm` = 1.0567, `000000009_lnorm_lnorm` = 1.21003, `000000010_lnorm_lnorm` = 1.67576)" weibull,0.05,1.08673,0.895134,0.819219,3.40858,0.357472,parametric,10,1,"c(`000000001_weibull` = 1.67077, `000000002_weibull` = 0.93999, `000000003_weibull` = 1.45323, `000000004_weibull` = 3.60435, `000000005_weibull` = 1.0464, `000000006_weibull` = 1.48364, `000000007_weibull` = 2.08463, `000000008_weibull` = 1.05416, `000000009_weibull` = 2.73428, `000000010_weibull` = 0.784157)" diff --git a/tests/testthat/_snaps/hc/hc138.csv b/tests/testthat/_snaps/hc/hc138.csv index b6b4c0f6c..1b1ef2034 100644 --- a/tests/testthat/_snaps/hc/hc138.csv +++ b/tests/testthat/_snaps/hc/hc138.csv @@ -1,3 +1,3 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.01,0.721367,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.99,232.734,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.01,0.721365,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.99,232.736,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc153.csv b/tests/testthat/_snaps/hc/hc153.csv index db41679f2..7ae17fb9e 100644 --- a/tests/testthat/_snaps/hc/hc153.csv +++ b/tests/testthat/_snaps/hc/hc153.csv @@ -1,43 +1,43 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.01,0.721367,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.02,1.01191,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.03,1.25429,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.04,1.47418,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.05,1.68118,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.06,1.88012,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.01,0.721365,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.02,1.0119,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.03,1.25428,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.04,1.47417,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.05,1.68117,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.06,1.88011,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.07,2.07382,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.08,2.26414,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.09,2.45235,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.08,2.26413,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.09,2.45234,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.1,2.63939,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.11,2.826,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.12,3.01275,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.12,3.01274,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.13,3.20011,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.14,3.3885,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.15,3.57825,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.16,3.76967,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.14,3.38849,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.15,3.57824,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.16,3.76966,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.17,3.96304,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.18,4.15862,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.19,4.35665,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.19,4.35664,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.2,4.55734,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.21,4.76092,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.22,4.9676,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.23,5.17758,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.24,5.39107,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.25,5.60826,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.26,5.82936,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.24,5.39106,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.25,5.60825,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.26,5.82935,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.27,6.05457,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.28,6.28411,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.29,6.51819,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.3,6.75702,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.3,6.75701,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.31,7.00082,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.32,7.24984,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.32,7.24983,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.33,7.5043,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.34,7.76445,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.35,8.03056,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.36,8.3029,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.37,8.58174,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.38,8.86738,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.39,9.16012,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.39,9.16013,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.4,9.46031,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.41,9.76827,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.42,10.0844,NA,NA,NA,1,parametric,0,NA,numeric(0) @@ -51,10 +51,10 @@ average,0.49,12.5601,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.5,12.9571,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.51,13.3667,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.52,13.7896,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.53,14.2263,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.53,14.2264,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.54,14.6778,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.55,15.1448,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.56,15.6282,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.56,15.6283,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.57,16.129,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.58,16.6482,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.59,17.187,NA,NA,NA,1,parametric,0,NA,numeric(0) @@ -66,35 +66,35 @@ average,0.64,20.2203,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.65,20.906,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.66,21.6225,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.67,22.3721,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.68,23.1573,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.69,23.981,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.68,23.1574,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.69,23.9811,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.7,24.8463,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.71,25.7567,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.72,26.7161,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.73,27.7289,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.74,28.8002,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.73,27.729,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.74,28.8003,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.75,29.9357,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.76,31.1417,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.77,32.4257,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.76,31.1418,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.77,32.4258,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.78,33.7964,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.79,35.2635,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.8,36.8388,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.81,38.5358,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.82,40.3708,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.83,42.3631,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.84,44.5363,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.85,46.9188,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.86,49.5461,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.87,52.4628,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.88,55.7255,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.89,59.4079,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.9,63.6082,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.91,68.4597,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.92,74.1505,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.93,80.9553,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.94,89.2961,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.95,99.8626,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.96,113.885,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.79,35.2636,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.8,36.8389,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.81,38.5359,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.82,40.3709,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.83,42.3633,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.84,44.5364,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.85,46.9189,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.86,49.5463,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.87,52.4629,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.88,55.7256,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.89,59.4081,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.9,63.6084,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.91,68.4599,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.92,74.1507,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.93,80.9556,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.94,89.2964,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.95,99.863,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.96,113.886,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.97,133.851,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.98,165.912,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.99,232.734,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.99,232.736,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc161.csv b/tests/testthat/_snaps/hc/hc161.csv index 81d92262e..d64f5ef65 100644 --- a/tests/testthat/_snaps/hc/hc161.csv +++ b/tests/testthat/_snaps/hc/hc161.csv @@ -1,43 +1,43 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -lnorm,0.01,0.721367,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.02,1.01191,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.03,1.25429,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.04,1.47418,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.05,1.68118,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.06,1.88012,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.01,0.721365,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.02,1.0119,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.03,1.25428,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.04,1.47417,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.05,1.68117,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.06,1.88011,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.07,2.07382,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.08,2.26414,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.09,2.45235,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.08,2.26413,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.09,2.45234,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.1,2.63939,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.11,2.826,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.12,3.01275,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.12,3.01274,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.13,3.20011,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.14,3.3885,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.15,3.57825,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.16,3.76967,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.14,3.38849,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.15,3.57824,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.16,3.76966,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.17,3.96304,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.18,4.15862,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.19,4.35665,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.19,4.35664,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.2,4.55734,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.21,4.76092,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.22,4.9676,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.23,5.17758,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.24,5.39107,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.25,5.60826,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.26,5.82936,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.24,5.39106,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.25,5.60825,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.26,5.82935,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.27,6.05457,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.28,6.28411,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.29,6.51819,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.3,6.75702,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.3,6.75701,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.31,7.00082,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.32,7.24984,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.32,7.24983,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.33,7.5043,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.34,7.76445,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.35,8.03056,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.36,8.3029,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.37,8.58174,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.38,8.86738,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.39,9.16012,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.39,9.16013,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.4,9.46031,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.41,9.76827,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.42,10.0844,NA,NA,NA,1,parametric,0,NA,numeric(0) @@ -51,10 +51,10 @@ lnorm,0.49,12.5601,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.5,12.9571,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.51,13.3667,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.52,13.7896,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.53,14.2263,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.53,14.2264,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.54,14.6778,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.55,15.1448,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.56,15.6282,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.56,15.6283,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.57,16.129,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.58,16.6482,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.59,17.187,NA,NA,NA,1,parametric,0,NA,numeric(0) @@ -66,35 +66,35 @@ lnorm,0.64,20.2203,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.65,20.906,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.66,21.6225,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.67,22.3721,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.68,23.1573,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.69,23.981,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.68,23.1574,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.69,23.9811,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.7,24.8463,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.71,25.7567,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.72,26.7161,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.73,27.7289,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.74,28.8002,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.73,27.729,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.74,28.8003,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.75,29.9357,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.76,31.1417,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.77,32.4257,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.76,31.1418,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.77,32.4258,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.78,33.7964,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.79,35.2635,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.8,36.8388,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.81,38.5358,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.82,40.3708,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.83,42.3631,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.84,44.5363,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.85,46.9188,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.86,49.5461,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.87,52.4628,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.88,55.7255,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.89,59.4079,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.9,63.6082,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.91,68.4597,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.92,74.1505,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.93,80.9553,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.94,89.2961,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.95,99.8626,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.96,113.885,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.79,35.2636,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.8,36.8389,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.81,38.5359,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.82,40.3709,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.83,42.3633,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.84,44.5364,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.85,46.9189,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.86,49.5463,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.87,52.4629,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.88,55.7256,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.89,59.4081,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.9,63.6084,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.91,68.4599,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.92,74.1507,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.93,80.9556,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.94,89.2964,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.95,99.863,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.96,113.886,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.97,133.851,NA,NA,NA,1,parametric,0,NA,numeric(0) lnorm,0.98,165.912,NA,NA,NA,1,parametric,0,NA,numeric(0) -lnorm,0.99,232.734,NA,NA,NA,1,parametric,0,NA,numeric(0) +lnorm,0.99,232.736,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc168.csv b/tests/testthat/_snaps/hc/hc168.csv index b194d01d3..22e7ee7a9 100644 --- a/tests/testthat/_snaps/hc/hc168.csv +++ b/tests/testthat/_snaps/hc/hc168.csv @@ -2,6 +2,6 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples gamma,0.05,1.07428,NA,NA,NA,0.356574,parametric,0,NA,numeric(0) lgumbel,0.05,1.76939,NA,NA,NA,0.0134466,parametric,0,NA,numeric(0) llogis,0.05,1.56226,NA,NA,NA,0.0656452,parametric,0,NA,numeric(0) -lnorm,0.05,1.68118,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm_lnorm,0.05,1.54136,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm,0.05,1.68117,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm_lnorm,0.05,1.54147,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) weibull,0.05,1.08673,NA,NA,NA,0.357472,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc_1.csv b/tests/testthat/_snaps/hc/hc_1.csv index 270838de3..59b506d47 100644 --- a/tests/testthat/_snaps/hc/hc_1.csv +++ b/tests/testthat/_snaps/hc/hc_1.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,NA,0.934608,0.934608,1,parametric,1,1,numeric(0) +average,0.05,1.68117,NA,0.934604,0.934604,1,parametric,1,1,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc_30.csv b/tests/testthat/_snaps/hc/hc_30.csv index 9f1568a51..98efb16b0 100644 --- a/tests/testthat/_snaps/hc/hc_30.csv +++ b/tests/testthat/_snaps/hc/hc_30.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,0.929401,0.0163841,0.886887,0.942346,1,parametric,100,0.98,numeric(0) +average,0.05,0.929401,0.0162377,0.886451,0.942623,1,parametric,100,0.95,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc_boot1_replace.csv b/tests/testthat/_snaps/hc/hc_boot1_replace.csv index dd79ef071..bd9b7b944 100644 --- a/tests/testthat/_snaps/hc/hc_boot1_replace.csv +++ b/tests/testthat/_snaps/hc/hc_boot1_replace.csv @@ -1,29 +1,29 @@ left,right,weight -2.34307,2.34307,1 +2.34306,2.34306,1 2.13735,2.13735,1 -124.662,124.662,1 +124.663,124.663,1 6.00984,6.00984,1 -97.8742,97.8742,1 +97.8746,97.8746,1 16.86,16.86,1 -52.2291,52.2291,1 +52.2292,52.2292,1 11.4974,11.4974,1 -230.374,230.374,1 +230.375,230.375,1 116.405,116.405,1 -9.78364,9.78364,1 -34.1634,34.1634,1 -5.48195,5.48195,1 +9.78365,9.78365,1 +34.1635,34.1635,1 +5.48194,5.48194,1 4.40733,4.40733,1 7.7632,7.7632,1 -59.9069,59.9069,1 +59.907,59.907,1 12.5181,12.5181,1 -0.935633,0.935633,1 +0.93563,0.93563,1 2.81123,2.81123,1 3.1142,3.1142,1 -3.26322,3.26322,1 +3.26321,3.26321,1 11.7523,11.7523,1 11.7099,11.7099,1 11.1291,11.1291,1 1.68392,1.68392,1 5.63102,5.63102,1 -5.29736,5.29736,1 +5.29735,5.29735,1 19.0451,19.0451,1 diff --git a/tests/testthat/_snaps/hc/hc_boot2_replace.csv b/tests/testthat/_snaps/hc/hc_boot2_replace.csv index 63ea6153e..947431ed0 100644 --- a/tests/testthat/_snaps/hc/hc_boot2_replace.csv +++ b/tests/testthat/_snaps/hc/hc_boot2_replace.csv @@ -1,16 +1,16 @@ left,right,weight -165.633,165.633,1 +165.634,165.634,1 4.11988,4.11988,1 -26.1447,26.1447,1 -46.2707,46.2707,1 -102.134,102.134,1 +26.1448,26.1448,1 +46.2708,46.2708,1 +102.135,102.135,1 7.4394,7.4394,1 -62.4256,62.4256,1 -111.706,111.706,1 -128.761,128.761,1 +62.4258,62.4258,1 +111.707,111.707,1 +128.762,128.762,1 20.9533,20.9533,1 -89.8766,89.8766,1 -2.34746,2.34746,1 +89.877,89.877,1 +2.34745,2.34745,1 6.74223,6.74223,1 4.02861,4.02861,1 14.5796,14.5796,1 @@ -18,12 +18,12 @@ left,right,weight 4.14316,4.14316,1 18.381,18.381,1 9.84879,9.84879,1 -4.03421,4.03421,1 +4.0342,4.0342,1 13.4852,13.4852,1 13.1513,13.1513,1 -286.839,286.839,1 -23.0442,23.0442,1 -29.1693,29.1693,1 +286.84,286.84,1 +23.0443,23.0443,1 +29.1694,29.1694,1 20.3573,20.3573,1 112.829,112.829,1 7.32915,7.32915,1 diff --git a/tests/testthat/_snaps/hc/hc_cis.csv b/tests/testthat/_snaps/hc/hc_cis.csv index 289bc8bfb..6c882f887 100644 --- a/tests/testthat/_snaps/hc/hc_cis.csv +++ b/tests/testthat/_snaps/hc/hc_cis.csv @@ -1,57 +1,57 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.682856,0.916053,3.47924,1,parametric,1000,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344, `000000004_lnorm` = 1.434, `000000005_lnorm` = 1.81625, `000000006_lnorm` = 2.64477, `000000007_lnorm` = 1.97971, `000000008_lnorm` = 1.40648, `000000009_lnorm` = 1.75897, `000000010_lnorm` = 2.5282, `000000011_lnorm` = 1.75287, `000000012_lnorm` = 2.64468, `000000013_lnorm` = 1.89607, `000000014_lnorm` = 1.42891, `000000015_lnorm` = 2.04596, `000000016_lnorm` = 1.076, `000000017_lnorm` = 1.82926, `000000018_lnorm` = 1.77755, -`000000019_lnorm` = 1.81362, `000000020_lnorm` = 1.56523, `000000021_lnorm` = 1.31329, `000000022_lnorm` = 2.34268, `000000023_lnorm` = 1.95807, `000000024_lnorm` = 0.979767, `000000025_lnorm` = 1.90104, `000000026_lnorm` = 1.31927, `000000027_lnorm` = 1.22682, `000000028_lnorm` = 1.36298, `000000029_lnorm` = 2.03217, `000000030_lnorm` = 1.48939, `000000031_lnorm` = 2.32384, `000000032_lnorm` = 2.7647, `000000033_lnorm` = 2.12493, `000000034_lnorm` = 1.16584, `000000035_lnorm` = 2.24326, `000000036_lnorm` = 1.85553, -`000000037_lnorm` = 2.58017, `000000038_lnorm` = 2.13528, `000000039_lnorm` = 1.12606, `000000040_lnorm` = 1.92819, `000000041_lnorm` = 2.02068, `000000042_lnorm` = 1.98608, `000000043_lnorm` = 2.96208, `000000044_lnorm` = 1.00953, `000000045_lnorm` = 0.524818, `000000046_lnorm` = 2.7306, `000000047_lnorm` = 1.49195, `000000048_lnorm` = 1.52999, `000000049_lnorm` = 1.91416, `000000050_lnorm` = 0.919346, `000000051_lnorm` = 0.984986, `000000052_lnorm` = 1.639, `000000053_lnorm` = 1.26688, `000000054_lnorm` = 1.31936, -`000000055_lnorm` = 1.15461, `000000056_lnorm` = 1.35223, `000000057_lnorm` = 2.41231, `000000058_lnorm` = 0.73241, `000000059_lnorm` = 1.9412, `000000060_lnorm` = 1.82985, `000000061_lnorm` = 1.80799, `000000062_lnorm` = 1.09987, `000000063_lnorm` = 1.46473, `000000064_lnorm` = 1.07241, `000000065_lnorm` = 1.27812, `000000066_lnorm` = 1.83396, `000000067_lnorm` = 1.30446, `000000068_lnorm` = 1.2981, `000000069_lnorm` = 1.20418, `000000070_lnorm` = 2.83824, `000000071_lnorm` = 1.18793, `000000072_lnorm` = 2.01092, -`000000073_lnorm` = 1.79121, `000000074_lnorm` = 1.15301, `000000075_lnorm` = 1.9106, `000000076_lnorm` = 1.5713, `000000077_lnorm` = 2.16168, `000000078_lnorm` = 1.99461, `000000079_lnorm` = 2.74488, `000000080_lnorm` = 2.45767, `000000081_lnorm` = 1.38901, `000000082_lnorm` = 1.77219, `000000083_lnorm` = 2.34756, `000000084_lnorm` = 1.99894, `000000085_lnorm` = 1.53282, `000000086_lnorm` = 2.63433, `000000087_lnorm` = 1.70809, `000000088_lnorm` = 1.86774, `000000089_lnorm` = 1.98205, `000000090_lnorm` = 2.62623, -`000000091_lnorm` = 2.31919, `000000092_lnorm` = 1.75355, `000000093_lnorm` = 1.597, `000000094_lnorm` = 1.73772, `000000095_lnorm` = 2.1588, `000000096_lnorm` = 2.76179, `000000097_lnorm` = 1.34877, `000000098_lnorm` = 1.48579, `000000099_lnorm` = 2.35546, `000000100_lnorm` = 1.28162, `000000101_lnorm` = 1.4029, `000000102_lnorm` = 3.68422, `000000103_lnorm` = 2.36213, `000000104_lnorm` = 2.0522, `000000105_lnorm` = 1.14376, `000000106_lnorm` = 1.78657, `000000107_lnorm` = 1.74016, `000000108_lnorm` = 1.32566, -`000000109_lnorm` = 3.36175, `000000110_lnorm` = 1.49744, `000000111_lnorm` = 1.46768, `000000112_lnorm` = 1.47672, `000000113_lnorm` = 1.68099, `000000114_lnorm` = 2.33906, `000000115_lnorm` = 1.43903, `000000116_lnorm` = 0.709157, `000000117_lnorm` = 0.770381, `000000118_lnorm` = 2.2042, `000000119_lnorm` = 3.44236, `000000120_lnorm` = 1.3995, `000000121_lnorm` = 1.18716, `000000122_lnorm` = 1.64169, `000000123_lnorm` = 2.15109, `000000124_lnorm` = 2.45262, `000000125_lnorm` = 2.14768, `000000126_lnorm` = 2.24818, -`000000127_lnorm` = 2.55815, `000000128_lnorm` = 2.03522, `000000129_lnorm` = 2.90727, `000000130_lnorm` = 1.41121, `000000131_lnorm` = 2.47096, `000000132_lnorm` = 1.22085, `000000133_lnorm` = 2.69527, `000000134_lnorm` = 1.97345, `000000135_lnorm` = 1.71555, `000000136_lnorm` = 1.72117, `000000137_lnorm` = 4.51798, `000000138_lnorm` = 2.22872, `000000139_lnorm` = 3.4864, `000000140_lnorm` = 1.5389, `000000141_lnorm` = 2.00422, `000000142_lnorm` = 2.33338, `000000143_lnorm` = 1.37928, `000000144_lnorm` = 2.16222, -`000000145_lnorm` = 2.53269, `000000146_lnorm` = 1.38425, `000000147_lnorm` = 2.00788, `000000148_lnorm` = 1.31033, `000000149_lnorm` = 2.37918, `000000150_lnorm` = 0.949037, `000000151_lnorm` = 2.28726, `000000152_lnorm` = 1.29019, `000000153_lnorm` = 2.63461, `000000154_lnorm` = 1.64242, `000000155_lnorm` = 1.66381, `000000156_lnorm` = 1.61202, `000000157_lnorm` = 1.97333, `000000158_lnorm` = 1.3912, `000000159_lnorm` = 1.97515, `000000160_lnorm` = 2.93093, `000000161_lnorm` = 1.92314, `000000162_lnorm` = 1.31012, -`000000163_lnorm` = 1.7771, `000000164_lnorm` = 2.25231, `000000165_lnorm` = 1.61186, `000000166_lnorm` = 2.71489, `000000167_lnorm` = 1.53473, `000000168_lnorm` = 1.21652, `000000169_lnorm` = 2.29439, `000000170_lnorm` = 2.67322, `000000171_lnorm` = 1.12951, `000000172_lnorm` = 1.84354, `000000173_lnorm` = 4.08302, `000000174_lnorm` = 1.49518, `000000175_lnorm` = 1.34551, `000000176_lnorm` = 1.70373, `000000177_lnorm` = 1.6595, `000000178_lnorm` = 1.57501, `000000179_lnorm` = 2.15907, `000000180_lnorm` = 1.7929, -`000000181_lnorm` = 1.96764, `000000182_lnorm` = 1.57101, `000000183_lnorm` = 2.83637, `000000184_lnorm` = 2.97611, `000000185_lnorm` = 1.18481, `000000186_lnorm` = 2.06272, `000000187_lnorm` = 1.76132, `000000188_lnorm` = 2.49663, `000000189_lnorm` = 0.683876, `000000190_lnorm` = 2.78282, `000000191_lnorm` = 0.923409, `000000192_lnorm` = 2.02137, `000000193_lnorm` = 2.34055, `000000194_lnorm` = 2.4864, `000000195_lnorm` = 1.82451, `000000196_lnorm` = 1.92976, `000000197_lnorm` = 2.12464, `000000198_lnorm` = 2.41837, -`000000199_lnorm` = 2.27514, `000000200_lnorm` = 1.68234, `000000201_lnorm` = 0.951753, `000000202_lnorm` = 1.79286, `000000203_lnorm` = 1.02251, `000000204_lnorm` = 3.65624, `000000205_lnorm` = 1.58279, `000000206_lnorm` = 2.56041, `000000207_lnorm` = 1.63661, `000000208_lnorm` = 2.37806, `000000209_lnorm` = 1.81254, `000000210_lnorm` = 1.19602, `000000211_lnorm` = 2.11509, `000000212_lnorm` = 1.50091, `000000213_lnorm` = 1.9014, `000000214_lnorm` = 1.18229, `000000215_lnorm` = 3.0938, `000000216_lnorm` = 1.52569, -`000000217_lnorm` = 1.55911, `000000218_lnorm` = 1.111, `000000219_lnorm` = 1.61811, `000000220_lnorm` = 1.40567, `000000221_lnorm` = 1.92319, `000000222_lnorm` = 2.01052, `000000223_lnorm` = 1.41332, `000000224_lnorm` = 2.93398, `000000225_lnorm` = 1.4652, `000000226_lnorm` = 1.30127, `000000227_lnorm` = 2.30989, `000000228_lnorm` = 1.19668, `000000229_lnorm` = 1.13459, `000000230_lnorm` = 2.25383, `000000231_lnorm` = 1.72355, `000000232_lnorm` = 2.94256, `000000233_lnorm` = 2.01322, `000000234_lnorm` = 2.41205, -`000000235_lnorm` = 2.23295, `000000236_lnorm` = 2.58726, `000000237_lnorm` = 1.81906, `000000238_lnorm` = 1.30275, `000000239_lnorm` = 2.2913, `000000240_lnorm` = 1.07857, `000000241_lnorm` = 1.00845, `000000242_lnorm` = 2.17341, `000000243_lnorm` = 2.80348, `000000244_lnorm` = 1.09174, `000000245_lnorm` = 1.57454, `000000246_lnorm` = 1.53234, `000000247_lnorm` = 1.13468, `000000248_lnorm` = 1.57223, `000000249_lnorm` = 1.3564, `000000250_lnorm` = 1.57846, `000000251_lnorm` = 3.40361, `000000252_lnorm` = 2.1552, -`000000253_lnorm` = 0.957097, `000000254_lnorm` = 1.71972, `000000255_lnorm` = 1.246, `000000256_lnorm` = 1.64064, `000000257_lnorm` = 1.85754, `000000258_lnorm` = 2.32517, `000000259_lnorm` = 1.53654, `000000260_lnorm` = 4.93482, `000000261_lnorm` = 2.92566, `000000262_lnorm` = 1.80187, `000000263_lnorm` = 1.30003, `000000264_lnorm` = 3.32539, `000000265_lnorm` = 1.00911, `000000266_lnorm` = 1.3714, `000000267_lnorm` = 1.49066, `000000268_lnorm` = 1.16181, `000000269_lnorm` = 2.17011, `000000270_lnorm` = 1.93628, -`000000271_lnorm` = 1.93382, `000000272_lnorm` = 1.56229, `000000273_lnorm` = 1.934, `000000274_lnorm` = 1.48945, `000000275_lnorm` = 1.5608, `000000276_lnorm` = 2.76426, `000000277_lnorm` = 1.41112, `000000278_lnorm` = 3.0299, `000000279_lnorm` = 1.20218, `000000280_lnorm` = 1.17921, `000000281_lnorm` = 3.31634, `000000282_lnorm` = 2.2934, `000000283_lnorm` = 1.75066, `000000284_lnorm` = 2.23803, `000000285_lnorm` = 1.73284, `000000286_lnorm` = 2.27553, `000000287_lnorm` = 1.06919, `000000288_lnorm` = 2.22348, -`000000289_lnorm` = 1.43162, `000000290_lnorm` = 2.38861, `000000291_lnorm` = 1.9776, `000000292_lnorm` = 1.75615, `000000293_lnorm` = 1.51279, `000000294_lnorm` = 4.17684, `000000295_lnorm` = 1.10022, `000000296_lnorm` = 3.42715, `000000297_lnorm` = 1.28569, `000000298_lnorm` = 1.91589, `000000299_lnorm` = 1.14508, `000000300_lnorm` = 1.36318, `000000301_lnorm` = 1.23333, `000000302_lnorm` = 1.07115, `000000303_lnorm` = 1.85, `000000304_lnorm` = 2.22285, `000000305_lnorm` = 1.22099, `000000306_lnorm` = 0.769899, -`000000307_lnorm` = 2.26783, `000000308_lnorm` = 2.76718, `000000309_lnorm` = 2.80311, `000000310_lnorm` = 1.7925, `000000311_lnorm` = 1.50201, `000000312_lnorm` = 2.33447, `000000313_lnorm` = 1.51844, `000000314_lnorm` = 1.49481, `000000315_lnorm` = 2.28878, `000000316_lnorm` = 2.50457, `000000317_lnorm` = 1.49334, `000000318_lnorm` = 1.2303, `000000319_lnorm` = 2.97667, `000000320_lnorm` = 2.11936, `000000321_lnorm` = 1.49001, `000000322_lnorm` = 1.68884, `000000323_lnorm` = 1.43209, `000000324_lnorm` = 1.93249, -`000000325_lnorm` = 1.48784, `000000326_lnorm` = 2.98808, `000000327_lnorm` = 2.30993, `000000328_lnorm` = 2.99877, `000000329_lnorm` = 1.741, `000000330_lnorm` = 1.88757, `000000331_lnorm` = 2.04144, `000000332_lnorm` = 1.25144, `000000333_lnorm` = 1.57907, `000000334_lnorm` = 1.00788, `000000335_lnorm` = 1.2126, `000000336_lnorm` = 1.9552, `000000337_lnorm` = 2.82747, `000000338_lnorm` = 1.90187, `000000339_lnorm` = 1.42327, `000000340_lnorm` = 1.43656, `000000341_lnorm` = 1.09695, `000000342_lnorm` = 1.33248, -`000000343_lnorm` = 1.19027, `000000344_lnorm` = 1.97184, `000000345_lnorm` = 1.77387, `000000346_lnorm` = 1.07525, `000000347_lnorm` = 2.13797, `000000348_lnorm` = 2.16009, `000000349_lnorm` = 2.2232, `000000350_lnorm` = 2.71378, `000000351_lnorm` = 1.83288, `000000352_lnorm` = 2.48059, `000000353_lnorm` = 1.04259, `000000354_lnorm` = 1.55659, `000000355_lnorm` = 2.4289, `000000356_lnorm` = 3.13694, `000000357_lnorm` = 1.00274, `000000358_lnorm` = 1.32141, `000000359_lnorm` = 1.9265, `000000360_lnorm` = 1.34318, -`000000361_lnorm` = 1.42568, `000000362_lnorm` = 1.01439, `000000363_lnorm` = 1.49849, `000000364_lnorm` = 2.22677, `000000365_lnorm` = 1.62129, `000000366_lnorm` = 2.04696, `000000367_lnorm` = 1.18602, `000000368_lnorm` = 1.20377, `000000369_lnorm` = 1.2206, `000000370_lnorm` = 1.90947, `000000371_lnorm` = 1.13543, `000000372_lnorm` = 1.6593, `000000373_lnorm` = 1.46798, `000000374_lnorm` = 1.57448, `000000375_lnorm` = 1.85693, `000000376_lnorm` = 1.4851, `000000377_lnorm` = 1.42378, `000000378_lnorm` = 1.59598, -`000000379_lnorm` = 1.93397, `000000380_lnorm` = 1.23379, `000000381_lnorm` = 1.44014, `000000382_lnorm` = 1.8396, `000000383_lnorm` = 2.01984, `000000384_lnorm` = 1.50021, `000000385_lnorm` = 2.15707, `000000386_lnorm` = 2.04668, `000000387_lnorm` = 1.55484, `000000388_lnorm` = 2.37655, `000000389_lnorm` = 3.94268, `000000390_lnorm` = 2.21834, `000000391_lnorm` = 1.81094, `000000392_lnorm` = 4.19888, `000000393_lnorm` = 0.918216, `000000394_lnorm` = 1.45406, `000000395_lnorm` = 1.53526, `000000396_lnorm` = 2.26637, -`000000397_lnorm` = 2.57149, `000000398_lnorm` = 2.40348, `000000399_lnorm` = 1.73039, `000000400_lnorm` = 2.93577, `000000401_lnorm` = 2.69577, `000000402_lnorm` = 1.79781, `000000403_lnorm` = 1.82191, `000000404_lnorm` = 0.916136, `000000405_lnorm` = 0.89459, `000000406_lnorm` = 3.75364, `000000407_lnorm` = 1.03696, `000000408_lnorm` = 2.90403, `000000409_lnorm` = 1.641, `000000410_lnorm` = 0.919572, `000000411_lnorm` = 2.21855, `000000412_lnorm` = 1.69849, `000000413_lnorm` = 1.7316, `000000414_lnorm` = 1.10058, -`000000415_lnorm` = 1.11313, `000000416_lnorm` = 1.27181, `000000417_lnorm` = 1.30444, `000000418_lnorm` = 2.21173, `000000419_lnorm` = 2.60013, `000000420_lnorm` = 2.44744, `000000421_lnorm` = 1.0187, `000000422_lnorm` = 2.21125, `000000423_lnorm` = 2.16268, `000000424_lnorm` = 1.94559, `000000425_lnorm` = 2.48946, `000000426_lnorm` = 1.13375, `000000427_lnorm` = 1.87002, `000000428_lnorm` = 2.00034, `000000429_lnorm` = 0.87398, `000000430_lnorm` = 0.832158, `000000431_lnorm` = 3.1563, `000000432_lnorm` = 1.42628, -`000000433_lnorm` = 1.64134, `000000434_lnorm` = 1.30208, `000000435_lnorm` = 1.56605, `000000436_lnorm` = 2.81943, `000000437_lnorm` = 2.10071, `000000438_lnorm` = 2.0308, `000000439_lnorm` = 1.14681, `000000440_lnorm` = 1.60425, `000000441_lnorm` = 1.94173, `000000442_lnorm` = 2.32118, `000000443_lnorm` = 1.32111, `000000444_lnorm` = 1.42303, `000000445_lnorm` = 2.13881, `000000446_lnorm` = 1.42681, `000000447_lnorm` = 2.18789, `000000448_lnorm` = 2.17623, `000000449_lnorm` = 3.41329, `000000450_lnorm` = 3.35897, -`000000451_lnorm` = 2.7788, `000000452_lnorm` = 1.8923, `000000453_lnorm` = 1.41734, `000000454_lnorm` = 1.33789, `000000455_lnorm` = 2.09971, `000000456_lnorm` = 1.26299, `000000457_lnorm` = 1.35084, `000000458_lnorm` = 1.44984, `000000459_lnorm` = 2.7659, `000000460_lnorm` = 1.53337, `000000461_lnorm` = 1.59674, `000000462_lnorm` = 2.08784, `000000463_lnorm` = 1.5607, `000000464_lnorm` = 1.12092, `000000465_lnorm` = 2.0189, `000000466_lnorm` = 2.21921, `000000467_lnorm` = 1.34222, `000000468_lnorm` = 2.11337, -`000000469_lnorm` = 2.22503, `000000470_lnorm` = 1.77326, `000000471_lnorm` = 1.74596, `000000472_lnorm` = 2.90492, `000000473_lnorm` = 0.953172, `000000474_lnorm` = 2.73463, `000000475_lnorm` = 2.16017, `000000476_lnorm` = 1.35835, `000000477_lnorm` = 1.27944, `000000478_lnorm` = 2.12859, `000000479_lnorm` = 1.28948, `000000480_lnorm` = 1.08294, `000000481_lnorm` = 1.88055, `000000482_lnorm` = 1.52331, `000000483_lnorm` = 2.0892, `000000484_lnorm` = 1.59584, `000000485_lnorm` = 1.52771, `000000486_lnorm` = 1.34335, -`000000487_lnorm` = 2.77589, `000000488_lnorm` = 1.26331, `000000489_lnorm` = 0.736365, `000000490_lnorm` = 2.87051, `000000491_lnorm` = 1.69302, `000000492_lnorm` = 1.11637, `000000493_lnorm` = 4.20856, `000000494_lnorm` = 1.93802, `000000495_lnorm` = 1.78429, `000000496_lnorm` = 2.07514, `000000497_lnorm` = 2.92751, `000000498_lnorm` = 1.59997, `000000499_lnorm` = 4.43424, `000000500_lnorm` = 3.13961, `000000501_lnorm` = 4.19755, `000000502_lnorm` = 1.43101, `000000503_lnorm` = 1.24887, `000000504_lnorm` = 1.33373, -`000000505_lnorm` = 3.32688, `000000506_lnorm` = 1.43878, `000000507_lnorm` = 2.73052, `000000508_lnorm` = 1.77473, `000000509_lnorm` = 3.87704, `000000510_lnorm` = 1.47882, `000000511_lnorm` = 1.6254, `000000512_lnorm` = 2.10462, `000000513_lnorm` = 1.69433, `000000514_lnorm` = 2.70887, `000000515_lnorm` = 2.54778, `000000516_lnorm` = 1.18789, `000000517_lnorm` = 0.947068, `000000518_lnorm` = 1.88539, `000000519_lnorm` = 1.71256, `000000520_lnorm` = 1.14462, `000000521_lnorm` = 1.27009, `000000522_lnorm` = 2.97767, -`000000523_lnorm` = 1.77179, `000000524_lnorm` = 2.46649, `000000525_lnorm` = 1.14346, `000000526_lnorm` = 1.89515, `000000527_lnorm` = 1.99545, `000000528_lnorm` = 1.14086, `000000529_lnorm` = 1.29784, `000000530_lnorm` = 1.25108, `000000531_lnorm` = 1.15474, `000000532_lnorm` = 1.24787, `000000533_lnorm` = 2.71134, `000000534_lnorm` = 1.79474, `000000535_lnorm` = 2.32163, `000000536_lnorm` = 3.37851, `000000537_lnorm` = 4.36059, `000000538_lnorm` = 2.60727, `000000539_lnorm` = 2.75092, `000000540_lnorm` = 1.5868, -`000000541_lnorm` = 1.1833, `000000542_lnorm` = 1.89417, `000000543_lnorm` = 2.7693, `000000544_lnorm` = 2.34744, `000000545_lnorm` = 2.27461, `000000546_lnorm` = 3.32722, `000000547_lnorm` = 1.95779, `000000548_lnorm` = 1.86549, `000000549_lnorm` = 0.480992, `000000550_lnorm` = 1.47264, `000000551_lnorm` = 1.47393, `000000552_lnorm` = 1.54195, `000000553_lnorm` = 2.2222, `000000554_lnorm` = 0.919692, `000000555_lnorm` = 1.39215, `000000556_lnorm` = 1.32837, `000000557_lnorm` = 2.04919, `000000558_lnorm` = 1.79052, -`000000559_lnorm` = 2.30908, `000000560_lnorm` = 0.631207, `000000561_lnorm` = 3.11303, `000000562_lnorm` = 2.4509, `000000563_lnorm` = 2.13419, `000000564_lnorm` = 2.3248, `000000565_lnorm` = 1.99135, `000000566_lnorm` = 1.94901, `000000567_lnorm` = 2.556, `000000568_lnorm` = 1.05624, `000000569_lnorm` = 1.34003, `000000570_lnorm` = 1.35751, `000000571_lnorm` = 2.1116, `000000572_lnorm` = 1.63934, `000000573_lnorm` = 1.52702, `000000574_lnorm` = 1.45556, `000000575_lnorm` = 2.01982, `000000576_lnorm` = 2.75215, -`000000577_lnorm` = 0.977083, `000000578_lnorm` = 1.3253, `000000579_lnorm` = 2.14799, `000000580_lnorm` = 2.0086, `000000581_lnorm` = 1.60627, `000000582_lnorm` = 2.3921, `000000583_lnorm` = 2.40398, `000000584_lnorm` = 2.9732, `000000585_lnorm` = 2.70107, `000000586_lnorm` = 1.17736, `000000587_lnorm` = 1.5737, `000000588_lnorm` = 1.62547, `000000589_lnorm` = 1.91191, `000000590_lnorm` = 2.4527, `000000591_lnorm` = 1.52415, `000000592_lnorm` = 1.99609, `000000593_lnorm` = 1.6286, `000000594_lnorm` = 1.97753, -`000000595_lnorm` = 1.37223, `000000596_lnorm` = 1.07542, `000000597_lnorm` = 0.854062, `000000598_lnorm` = 1.53575, `000000599_lnorm` = 1.44919, `000000600_lnorm` = 2.04786, `000000601_lnorm` = 2.24642, `000000602_lnorm` = 2.61384, `000000603_lnorm` = 1.65475, `000000604_lnorm` = 2.95767, `000000605_lnorm` = 4.66151, `000000606_lnorm` = 2.22262, `000000607_lnorm` = 2.01575, `000000608_lnorm` = 1.48518, `000000609_lnorm` = 0.862168, `000000610_lnorm` = 1.29858, `000000611_lnorm` = 3.1189, `000000612_lnorm` = 1.72008, -`000000613_lnorm` = 1.09522, `000000614_lnorm` = 1.65268, `000000615_lnorm` = 2.7714, `000000616_lnorm` = 1.2399, `000000617_lnorm` = 1.39014, `000000618_lnorm` = 1.43025, `000000619_lnorm` = 1.06787, `000000620_lnorm` = 1.22254, `000000621_lnorm` = 1.72324, `000000622_lnorm` = 1.71684, `000000623_lnorm` = 2.70181, `000000624_lnorm` = 1.51177, `000000625_lnorm` = 1.25051, `000000626_lnorm` = 1.35754, `000000627_lnorm` = 0.978439, `000000628_lnorm` = 2.75994, `000000629_lnorm` = 2.95655, `000000630_lnorm` = 1.64154, -`000000631_lnorm` = 2.44982, `000000632_lnorm` = 1.65048, `000000633_lnorm` = 1.77068, `000000634_lnorm` = 2.26648, `000000635_lnorm` = 2.08989, `000000636_lnorm` = 2.02099, `000000637_lnorm` = 1.06717, `000000638_lnorm` = 1.11346, `000000639_lnorm` = 1.41083, `000000640_lnorm` = 1.73914, `000000641_lnorm` = 1.44619, `000000642_lnorm` = 2.17064, `000000643_lnorm` = 1.81502, `000000644_lnorm` = 1.74061, `000000645_lnorm` = 1.35166, `000000646_lnorm` = 1.15518, `000000647_lnorm` = 1.87199, `000000648_lnorm` = 2.62931, -`000000649_lnorm` = 2.31078, `000000650_lnorm` = 2.68424, `000000651_lnorm` = 1.75981, `000000652_lnorm` = 1.60339, `000000653_lnorm` = 3.59301, `000000654_lnorm` = 1.10603, `000000655_lnorm` = 2.32442, `000000656_lnorm` = 1.77175, `000000657_lnorm` = 2.20971, `000000658_lnorm` = 1.9106, `000000659_lnorm` = 2.25715, `000000660_lnorm` = 2.06905, `000000661_lnorm` = 2.30818, `000000662_lnorm` = 2.07574, `000000663_lnorm` = 1.77408, `000000664_lnorm` = 2.43579, `000000665_lnorm` = 2.12829, `000000666_lnorm` = 2.20592, -`000000667_lnorm` = 1.17683, `000000668_lnorm` = 1.66624, `000000669_lnorm` = 1.35764, `000000670_lnorm` = 1.78977, `000000671_lnorm` = 1.13356, `000000672_lnorm` = 2.743, `000000673_lnorm` = 1.34269, `000000674_lnorm` = 0.835483, `000000675_lnorm` = 1.51503, `000000676_lnorm` = 1.99193, `000000677_lnorm` = 2.28651, `000000678_lnorm` = 1.16106, `000000679_lnorm` = 2.5245, `000000680_lnorm` = 3.11832, `000000681_lnorm` = 1.94279, `000000682_lnorm` = 2.47932, `000000683_lnorm` = 1.13269, `000000684_lnorm` = 1.69414, -`000000685_lnorm` = 2.28826, `000000686_lnorm` = 1.90979, `000000687_lnorm` = 2.65157, `000000688_lnorm` = 1.41765, `000000689_lnorm` = 2.99469, `000000690_lnorm` = 1.32353, `000000691_lnorm` = 1.45726, `000000692_lnorm` = 1.9734, `000000693_lnorm` = 1.7671, `000000694_lnorm` = 0.908387, `000000695_lnorm` = 2.0966, `000000696_lnorm` = 0.965909, `000000697_lnorm` = 1.44358, `000000698_lnorm` = 2.20382, `000000699_lnorm` = 2.45004, `000000700_lnorm` = 2.90881, `000000701_lnorm` = 1.06315, `000000702_lnorm` = 1.52948, -`000000703_lnorm` = 1.37854, `000000704_lnorm` = 2.45675, `000000705_lnorm` = 1.62565, `000000706_lnorm` = 1.45387, `000000707_lnorm` = 1.79233, `000000708_lnorm` = 1.45578, `000000709_lnorm` = 3.58953, `000000710_lnorm` = 2.75588, `000000711_lnorm` = 2.18121, `000000712_lnorm` = 1.96544, `000000713_lnorm` = 1.42123, `000000714_lnorm` = 1.88976, `000000715_lnorm` = 2.03469, `000000716_lnorm` = 1.83556, `000000717_lnorm` = 1.14725, `000000718_lnorm` = 2.15482, `000000719_lnorm` = 2.8368, `000000720_lnorm` = 1.35482, -`000000721_lnorm` = 1.31997, `000000722_lnorm` = 1.58891, `000000723_lnorm` = 4.39375, `000000724_lnorm` = 1.29783, `000000725_lnorm` = 2.57891, `000000726_lnorm` = 1.25922, `000000727_lnorm` = 1.23203, `000000728_lnorm` = 1.46578, `000000729_lnorm` = 1.29022, `000000730_lnorm` = 2.60901, `000000731_lnorm` = 1.98286, `000000732_lnorm` = 2.0439, `000000733_lnorm` = 2.82228, `000000734_lnorm` = 1.37751, `000000735_lnorm` = 2.45163, `000000736_lnorm` = 1.21816, `000000737_lnorm` = 1.15335, `000000738_lnorm` = 1.78975, -`000000739_lnorm` = 1.53569, `000000740_lnorm` = 2.21331, `000000741_lnorm` = 1.98769, `000000742_lnorm` = 1.87514, `000000743_lnorm` = 1.04263, `000000744_lnorm` = 1.86318, `000000745_lnorm` = 2.22433, `000000746_lnorm` = 2.00088, `000000747_lnorm` = 2.68541, `000000748_lnorm` = 3.36272, `000000749_lnorm` = 1.84895, `000000750_lnorm` = 1.67284, `000000751_lnorm` = 1.82971, `000000752_lnorm` = 0.966564, `000000753_lnorm` = 2.94891, `000000754_lnorm` = 2.02551, `000000755_lnorm` = 2.14384, `000000756_lnorm` = 1.6156, -`000000757_lnorm` = 1.3463, `000000758_lnorm` = 2.46316, `000000759_lnorm` = 1.82355, `000000760_lnorm` = 2.20365, `000000761_lnorm` = 1.81595, `000000762_lnorm` = 1.39895, `000000763_lnorm` = 1.11402, `000000764_lnorm` = 1.0403, `000000765_lnorm` = 3.46626, `000000766_lnorm` = 0.612317, `000000767_lnorm` = 2.21868, `000000768_lnorm` = 1.02169, `000000769_lnorm` = 1.85731, `000000770_lnorm` = 1.3162, `000000771_lnorm` = 1.3084, `000000772_lnorm` = 1.03984, `000000773_lnorm` = 2.21969, `000000774_lnorm` = 1.40523, -`000000775_lnorm` = 1.63671, `000000776_lnorm` = 2.35502, `000000777_lnorm` = 2.13487, `000000778_lnorm` = 1.59329, `000000779_lnorm` = 2.27574, `000000780_lnorm` = 0.656166, `000000781_lnorm` = 1.9215, `000000782_lnorm` = 1.50653, `000000783_lnorm` = 1.52454, `000000784_lnorm` = 1.40982, `000000785_lnorm` = 1.89923, `000000786_lnorm` = 3.55173, `000000787_lnorm` = 1.0151, `000000788_lnorm` = 1.73649, `000000789_lnorm` = 2.21852, `000000790_lnorm` = 1.67646, `000000791_lnorm` = 2.53567, `000000792_lnorm` = 1.78863, -`000000793_lnorm` = 1.38939, `000000794_lnorm` = 1.73823, `000000795_lnorm` = 1.93236, `000000796_lnorm` = 2.27247, `000000797_lnorm` = 1.9506, `000000798_lnorm` = 2.79071, `000000799_lnorm` = 1.85945, `000000800_lnorm` = 1.697, `000000801_lnorm` = 1.20041, `000000802_lnorm` = 2.30994, `000000803_lnorm` = 2.28004, `000000804_lnorm` = 2.12277, `000000805_lnorm` = 1.40852, `000000806_lnorm` = 2.70247, `000000807_lnorm` = 0.952191, `000000808_lnorm` = 1.76159, `000000809_lnorm` = 1.55078, `000000810_lnorm` = 1.46163, -`000000811_lnorm` = 2.11149, `000000812_lnorm` = 1.11352, `000000813_lnorm` = 2.7389, `000000814_lnorm` = 1.51083, `000000815_lnorm` = 1.2664, `000000816_lnorm` = 1.60513, `000000817_lnorm` = 1.05833, `000000818_lnorm` = 1.68812, `000000819_lnorm` = 2.66027, `000000820_lnorm` = 1.65418, `000000821_lnorm` = 1.08778, `000000822_lnorm` = 1.33578, `000000823_lnorm` = 1.09943, `000000824_lnorm` = 1.50982, `000000825_lnorm` = 1.619, `000000826_lnorm` = 2.30469, `000000827_lnorm` = 0.855125, `000000828_lnorm` = 2.42884, -`000000829_lnorm` = 1.38089, `000000830_lnorm` = 4.4522, `000000831_lnorm` = 1.66964, `000000832_lnorm` = 1.85568, `000000833_lnorm` = 1.08886, `000000834_lnorm` = 0.921413, `000000835_lnorm` = 1.46622, `000000836_lnorm` = 2.73844, `000000837_lnorm` = 1.58314, `000000838_lnorm` = 1.38034, `000000839_lnorm` = 4.41954, `000000840_lnorm` = 0.943256, `000000841_lnorm` = 2.27984, `000000842_lnorm` = 0.912846, `000000843_lnorm` = 3.55196, `000000844_lnorm` = 1.1334, `000000845_lnorm` = 1.32162, `000000846_lnorm` = 1.15393, -`000000847_lnorm` = 1.98562, `000000848_lnorm` = 2.20511, `000000849_lnorm` = 1.54514, `000000850_lnorm` = 2.42929, `000000851_lnorm` = 4.14374, `000000852_lnorm` = 1.43422, `000000853_lnorm` = 1.86874, `000000854_lnorm` = 2.12603, `000000855_lnorm` = 1.61319, `000000856_lnorm` = 2.90886, `000000857_lnorm` = 1.78374, `000000858_lnorm` = 2.71821, `000000859_lnorm` = 2.36495, `000000860_lnorm` = 1.34749, `000000861_lnorm` = 2.34658, `000000862_lnorm` = 1.52777, `000000863_lnorm` = 0.600718, `000000864_lnorm` = 1.09026, -`000000865_lnorm` = 2.03663, `000000866_lnorm` = 1.49139, `000000867_lnorm` = 1.12194, `000000868_lnorm` = 1.07614, `000000869_lnorm` = 1.8528, `000000870_lnorm` = 2.95831, `000000871_lnorm` = 2.98388, `000000872_lnorm` = 2.99172, `000000873_lnorm` = 2.63005, `000000874_lnorm` = 2.71377, `000000875_lnorm` = 2.88341, `000000876_lnorm` = 1.53379, `000000877_lnorm` = 1.38716, `000000878_lnorm` = 1.82626, `000000879_lnorm` = 2.14879, `000000880_lnorm` = 1.45224, `000000881_lnorm` = 2.03255, `000000882_lnorm` = 1.23025, -`000000883_lnorm` = 4.04123, `000000884_lnorm` = 1.87984, `000000885_lnorm` = 0.920501, `000000886_lnorm` = 1.39447, `000000887_lnorm` = 2.25379, `000000888_lnorm` = 1.17532, `000000889_lnorm` = 1.54539, `000000890_lnorm` = 1.16774, `000000891_lnorm` = 1.62573, `000000892_lnorm` = 0.973674, `000000893_lnorm` = 1.10345, `000000894_lnorm` = 1.55087, `000000895_lnorm` = 1.43027, `000000896_lnorm` = 0.962508, `000000897_lnorm` = 2.10172, `000000898_lnorm` = 1.45381, `000000899_lnorm` = 2.50912, `000000900_lnorm` = 0.829115, -`000000901_lnorm` = 1.49204, `000000902_lnorm` = 1.97533, `000000903_lnorm` = 1.08147, `000000904_lnorm` = 1.12325, `000000905_lnorm` = 1.646, `000000906_lnorm` = 0.996106, `000000907_lnorm` = 3.10322, `000000908_lnorm` = 1.11549, `000000909_lnorm` = 1.86724, `000000910_lnorm` = 1.93593, `000000911_lnorm` = 0.86112, `000000912_lnorm` = 2.97445, `000000913_lnorm` = 2.62286, `000000914_lnorm` = 3.12933, `000000915_lnorm` = 1.27296, `000000916_lnorm` = 1.42102, `000000917_lnorm` = 1.6307, `000000918_lnorm` = 3.45913, -`000000919_lnorm` = 2.76522, `000000920_lnorm` = 0.692321, `000000921_lnorm` = 1.22273, `000000922_lnorm` = 1.62976, `000000923_lnorm` = 1.63548, `000000924_lnorm` = 1.49555, `000000925_lnorm` = 2.0772, `000000926_lnorm` = 2.28571, `000000927_lnorm` = 2.10495, `000000928_lnorm` = 0.715006, `000000929_lnorm` = 1.32799, `000000930_lnorm` = 2.34716, `000000931_lnorm` = 1.48491, `000000932_lnorm` = 1.79497, `000000933_lnorm` = 2.20081, `000000934_lnorm` = 1.68292, `000000935_lnorm` = 3.47905, `000000936_lnorm` = 2.10751, -`000000937_lnorm` = 2.46339, `000000938_lnorm` = 2.88347, `000000939_lnorm` = 1.03523, `000000940_lnorm` = 1.82538, `000000941_lnorm` = 1.64746, `000000942_lnorm` = 1.83653, `000000943_lnorm` = 2.17435, `000000944_lnorm` = 2.34556, `000000945_lnorm` = 1.35487, `000000946_lnorm` = 2.66805, `000000947_lnorm` = 1.3845, `000000948_lnorm` = 0.992331, `000000949_lnorm` = 1.2798, `000000950_lnorm` = 2.11437, `000000951_lnorm` = 1.54769, `000000952_lnorm` = 1.28011, `000000953_lnorm` = 1.13938, `000000954_lnorm` = 2.31567, -`000000955_lnorm` = 1.23917, `000000956_lnorm` = 1.09096, `000000957_lnorm` = 1.80177, `000000958_lnorm` = 1.40609, `000000959_lnorm` = 2.03731, `000000960_lnorm` = 1.96243, `000000961_lnorm` = 1.47829, `000000962_lnorm` = 1.54191, `000000963_lnorm` = 1.50901, `000000964_lnorm` = 1.58542, `000000965_lnorm` = 1.30164, `000000966_lnorm` = 1.54642, `000000967_lnorm` = 0.985906, `000000968_lnorm` = 1.74622, `000000969_lnorm` = 2.40104, `000000970_lnorm` = 1.47237, `000000971_lnorm` = 1.01637, `000000972_lnorm` = 2.01739, -`000000973_lnorm` = 1.27309, `000000974_lnorm` = 1.34581, `000000975_lnorm` = 1.66014, `000000976_lnorm` = 1.64592, `000000977_lnorm` = 1.23841, `000000978_lnorm` = 1.86099, `000000979_lnorm` = 1.95426, `000000980_lnorm` = 0.994339, `000000981_lnorm` = 1.2769, `000000982_lnorm` = 1.25549, `000000983_lnorm` = 1.55396, `000000984_lnorm` = 1.32035, `000000985_lnorm` = 1.27725, `000000986_lnorm` = 2.93347, `000000987_lnorm` = 2.10903, `000000988_lnorm` = 1.23574, `000000989_lnorm` = 2.31355, `000000990_lnorm` = 2.02261, -`000000991_lnorm` = 1.98182, `000000992_lnorm` = 1.36425, `000000993_lnorm` = 1.3906, `000000994_lnorm` = 2.13309, `000000995_lnorm` = 1.17508, `000000996_lnorm` = 2.05745, `000000997_lnorm` = 2.25295, `000000998_lnorm` = 2.0945, `000000999_lnorm` = 1.28197, `000001000_lnorm` = 0.917713)" +average,0.05,1.68117,0.682856,0.91605,3.47923,1,parametric,1000,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344, `000000004_lnorm` = 1.434, `000000005_lnorm` = 1.81625, `000000006_lnorm` = 2.64477, `000000007_lnorm` = 1.9797, `000000008_lnorm` = 1.40648, `000000009_lnorm` = 1.75896, `000000010_lnorm` = 2.52819, `000000011_lnorm` = 1.75286, `000000012_lnorm` = 2.64467, `000000013_lnorm` = 1.89607, `000000014_lnorm` = 1.42891, `000000015_lnorm` = 2.04596, `000000016_lnorm` = 1.076, `000000017_lnorm` = 1.82926, `000000018_lnorm` = 1.77754, +`000000019_lnorm` = 1.81362, `000000020_lnorm` = 1.56522, `000000021_lnorm` = 1.31328, `000000022_lnorm` = 2.34267, `000000023_lnorm` = 1.95807, `000000024_lnorm` = 0.979763, `000000025_lnorm` = 1.90104, `000000026_lnorm` = 1.31927, `000000027_lnorm` = 1.22681, `000000028_lnorm` = 1.36297, `000000029_lnorm` = 2.03217, `000000030_lnorm` = 1.48939, `000000031_lnorm` = 2.32383, `000000032_lnorm` = 2.76469, `000000033_lnorm` = 2.12493, `000000034_lnorm` = 1.16584, `000000035_lnorm` = 2.24326, `000000036_lnorm` = 1.85553, +`000000037_lnorm` = 2.58016, `000000038_lnorm` = 2.13527, `000000039_lnorm` = 1.12606, `000000040_lnorm` = 1.92818, `000000041_lnorm` = 2.02068, `000000042_lnorm` = 1.98607, `000000043_lnorm` = 2.96207, `000000044_lnorm` = 1.00953, `000000045_lnorm` = 0.524815, `000000046_lnorm` = 2.7306, `000000047_lnorm` = 1.49194, `000000048_lnorm` = 1.52999, `000000049_lnorm` = 1.91416, `000000050_lnorm` = 0.919342, `000000051_lnorm` = 0.984983, `000000052_lnorm` = 1.63899, `000000053_lnorm` = 1.26687, `000000054_lnorm` = 1.31936, +`000000055_lnorm` = 1.15461, `000000056_lnorm` = 1.35223, `000000057_lnorm` = 2.41231, `000000058_lnorm` = 0.732407, `000000059_lnorm` = 1.9412, `000000060_lnorm` = 1.82985, `000000061_lnorm` = 1.80799, `000000062_lnorm` = 1.09987, `000000063_lnorm` = 1.46472, `000000064_lnorm` = 1.07241, `000000065_lnorm` = 1.27812, `000000066_lnorm` = 1.83395, `000000067_lnorm` = 1.30446, `000000068_lnorm` = 1.2981, `000000069_lnorm` = 1.20418, `000000070_lnorm` = 2.83823, `000000071_lnorm` = 1.18793, `000000072_lnorm` = 2.01091, +`000000073_lnorm` = 1.79121, `000000074_lnorm` = 1.15301, `000000075_lnorm` = 1.91059, `000000076_lnorm` = 1.57129, `000000077_lnorm` = 2.16167, `000000078_lnorm` = 1.9946, `000000079_lnorm` = 2.74488, `000000080_lnorm` = 2.45766, `000000081_lnorm` = 1.38901, `000000082_lnorm` = 1.77219, `000000083_lnorm` = 2.34755, `000000084_lnorm` = 1.99894, `000000085_lnorm` = 1.53281, `000000086_lnorm` = 2.63432, `000000087_lnorm` = 1.70809, `000000088_lnorm` = 1.86773, `000000089_lnorm` = 1.98204, `000000090_lnorm` = 2.62623, +`000000091_lnorm` = 2.31919, `000000092_lnorm` = 1.75354, `000000093_lnorm` = 1.59699, `000000094_lnorm` = 1.73771, `000000095_lnorm` = 2.15879, `000000096_lnorm` = 2.76178, `000000097_lnorm` = 1.34876, `000000098_lnorm` = 1.48579, `000000099_lnorm` = 2.35546, `000000100_lnorm` = 1.28161, `000000101_lnorm` = 1.40289, `000000102_lnorm` = 3.68421, `000000103_lnorm` = 2.36213, `000000104_lnorm` = 2.0522, `000000105_lnorm` = 1.14376, `000000106_lnorm` = 1.78657, `000000107_lnorm` = 1.74016, `000000108_lnorm` = 1.32566, +`000000109_lnorm` = 3.36174, `000000110_lnorm` = 1.49743, `000000111_lnorm` = 1.46767, `000000112_lnorm` = 1.47672, `000000113_lnorm` = 1.68099, `000000114_lnorm` = 2.33906, `000000115_lnorm` = 1.43903, `000000116_lnorm` = 0.709154, `000000117_lnorm` = 0.770378, `000000118_lnorm` = 2.2042, `000000119_lnorm` = 3.44236, `000000120_lnorm` = 1.3995, `000000121_lnorm` = 1.18715, `000000122_lnorm` = 1.64168, `000000123_lnorm` = 2.15108, `000000124_lnorm` = 2.45261, `000000125_lnorm` = 2.14768, `000000126_lnorm` = 2.24817, +`000000127_lnorm` = 2.55814, `000000128_lnorm` = 2.03521, `000000129_lnorm` = 2.90726, `000000130_lnorm` = 1.4112, `000000131_lnorm` = 2.47096, `000000132_lnorm` = 1.22084, `000000133_lnorm` = 2.69526, `000000134_lnorm` = 1.97344, `000000135_lnorm` = 1.71554, `000000136_lnorm` = 1.72117, `000000137_lnorm` = 4.51797, `000000138_lnorm` = 2.22872, `000000139_lnorm` = 3.48639, `000000140_lnorm` = 1.5389, `000000141_lnorm` = 2.00422, `000000142_lnorm` = 2.33338, `000000143_lnorm` = 1.37927, `000000144_lnorm` = 2.16221, +`000000145_lnorm` = 2.53269, `000000146_lnorm` = 1.38425, `000000147_lnorm` = 2.00788, `000000148_lnorm` = 1.31033, `000000149_lnorm` = 2.37918, `000000150_lnorm` = 0.949034, `000000151_lnorm` = 2.28725, `000000152_lnorm` = 1.29019, `000000153_lnorm` = 2.63461, `000000154_lnorm` = 1.64242, `000000155_lnorm` = 1.66381, `000000156_lnorm` = 1.61202, `000000157_lnorm` = 1.97332, `000000158_lnorm` = 1.39119, `000000159_lnorm` = 1.97515, `000000160_lnorm` = 2.93092, `000000161_lnorm` = 1.92314, `000000162_lnorm` = 1.31012, +`000000163_lnorm` = 1.77709, `000000164_lnorm` = 2.2523, `000000165_lnorm` = 1.61185, `000000166_lnorm` = 2.71488, `000000167_lnorm` = 1.53472, `000000168_lnorm` = 1.21652, `000000169_lnorm` = 2.29438, `000000170_lnorm` = 2.67321, `000000171_lnorm` = 1.12951, `000000172_lnorm` = 1.84354, `000000173_lnorm` = 4.08301, `000000174_lnorm` = 1.49518, `000000175_lnorm` = 1.34551, `000000176_lnorm` = 1.70373, `000000177_lnorm` = 1.6595, `000000178_lnorm` = 1.575, `000000179_lnorm` = 2.15906, `000000180_lnorm` = 1.7929, +`000000181_lnorm` = 1.96763, `000000182_lnorm` = 1.57101, `000000183_lnorm` = 2.83637, `000000184_lnorm` = 2.97611, `000000185_lnorm` = 1.1848, `000000186_lnorm` = 2.06271, `000000187_lnorm` = 1.76131, `000000188_lnorm` = 2.49662, `000000189_lnorm` = 0.683873, `000000190_lnorm` = 2.78282, `000000191_lnorm` = 0.923406, `000000192_lnorm` = 2.02137, `000000193_lnorm` = 2.34054, `000000194_lnorm` = 2.4864, `000000195_lnorm` = 1.8245, `000000196_lnorm` = 1.92975, `000000197_lnorm` = 2.12464, `000000198_lnorm` = 2.41836, +`000000199_lnorm` = 2.27514, `000000200_lnorm` = 1.68233, `000000201_lnorm` = 0.95175, `000000202_lnorm` = 1.79286, `000000203_lnorm` = 1.0225, `000000204_lnorm` = 3.65623, `000000205_lnorm` = 1.58279, `000000206_lnorm` = 2.56041, `000000207_lnorm` = 1.63661, `000000208_lnorm` = 2.37805, `000000209_lnorm` = 1.81253, `000000210_lnorm` = 1.19601, `000000211_lnorm` = 2.11508, `000000212_lnorm` = 1.5009, `000000213_lnorm` = 1.9014, `000000214_lnorm` = 1.18229, `000000215_lnorm` = 3.0938, `000000216_lnorm` = 1.52568, +`000000217_lnorm` = 1.5591, `000000218_lnorm` = 1.111, `000000219_lnorm` = 1.61811, `000000220_lnorm` = 1.40567, `000000221_lnorm` = 1.92318, `000000222_lnorm` = 2.01052, `000000223_lnorm` = 1.41332, `000000224_lnorm` = 2.93397, `000000225_lnorm` = 1.4652, `000000226_lnorm` = 1.30126, `000000227_lnorm` = 2.30988, `000000228_lnorm` = 1.19668, `000000229_lnorm` = 1.13458, `000000230_lnorm` = 2.25383, `000000231_lnorm` = 1.72354, `000000232_lnorm` = 2.94255, `000000233_lnorm` = 2.01322, `000000234_lnorm` = 2.41204, +`000000235_lnorm` = 2.23295, `000000236_lnorm` = 2.58725, `000000237_lnorm` = 1.81906, `000000238_lnorm` = 1.30274, `000000239_lnorm` = 2.29129, `000000240_lnorm` = 1.07857, `000000241_lnorm` = 1.00845, `000000242_lnorm` = 2.1734, `000000243_lnorm` = 2.80348, `000000244_lnorm` = 1.09174, `000000245_lnorm` = 1.57453, `000000246_lnorm` = 1.53233, `000000247_lnorm` = 1.13467, `000000248_lnorm` = 1.57223, `000000249_lnorm` = 1.3564, `000000250_lnorm` = 1.57845, `000000251_lnorm` = 3.4036, `000000252_lnorm` = 2.15519, +`000000253_lnorm` = 0.957093, `000000254_lnorm` = 1.71972, `000000255_lnorm` = 1.246, `000000256_lnorm` = 1.64064, `000000257_lnorm` = 1.85753, `000000258_lnorm` = 2.32516, `000000259_lnorm` = 1.53653, `000000260_lnorm` = 4.93481, `000000261_lnorm` = 2.92565, `000000262_lnorm` = 1.80186, `000000263_lnorm` = 1.30003, `000000264_lnorm` = 3.32539, `000000265_lnorm` = 1.0091, `000000266_lnorm` = 1.3714, `000000267_lnorm` = 1.49066, `000000268_lnorm` = 1.1618, `000000269_lnorm` = 2.1701, `000000270_lnorm` = 1.93628, +`000000271_lnorm` = 1.93382, `000000272_lnorm` = 1.56229, `000000273_lnorm` = 1.934, `000000274_lnorm` = 1.48944, `000000275_lnorm` = 1.56079, `000000276_lnorm` = 2.76426, `000000277_lnorm` = 1.41112, `000000278_lnorm` = 3.02989, `000000279_lnorm` = 1.20218, `000000280_lnorm` = 1.1792, `000000281_lnorm` = 3.31633, `000000282_lnorm` = 2.2934, `000000283_lnorm` = 1.75066, `000000284_lnorm` = 2.23802, `000000285_lnorm` = 1.73284, `000000286_lnorm` = 2.27552, `000000287_lnorm` = 1.06919, `000000288_lnorm` = 2.22348, +`000000289_lnorm` = 1.43162, `000000290_lnorm` = 2.38861, `000000291_lnorm` = 1.9776, `000000292_lnorm` = 1.75614, `000000293_lnorm` = 1.51279, `000000294_lnorm` = 4.17683, `000000295_lnorm` = 1.10022, `000000296_lnorm` = 3.42715, `000000297_lnorm` = 1.28568, `000000298_lnorm` = 1.91588, `000000299_lnorm` = 1.14508, `000000300_lnorm` = 1.36317, `000000301_lnorm` = 1.23333, `000000302_lnorm` = 1.07114, `000000303_lnorm` = 1.85, `000000304_lnorm` = 2.22284, `000000305_lnorm` = 1.22098, `000000306_lnorm` = 0.769896, +`000000307_lnorm` = 2.26782, `000000308_lnorm` = 2.76717, `000000309_lnorm` = 2.80311, `000000310_lnorm` = 1.79249, `000000311_lnorm` = 1.50201, `000000312_lnorm` = 2.33447, `000000313_lnorm` = 1.51844, `000000314_lnorm` = 1.4948, `000000315_lnorm` = 2.28877, `000000316_lnorm` = 2.50457, `000000317_lnorm` = 1.49333, `000000318_lnorm` = 1.2303, `000000319_lnorm` = 2.97666, `000000320_lnorm` = 2.11935, `000000321_lnorm` = 1.49001, `000000322_lnorm` = 1.68884, `000000323_lnorm` = 1.43209, `000000324_lnorm` = 1.93248, +`000000325_lnorm` = 1.48784, `000000326_lnorm` = 2.98808, `000000327_lnorm` = 2.30993, `000000328_lnorm` = 2.99876, `000000329_lnorm` = 1.74099, `000000330_lnorm` = 1.88756, `000000331_lnorm` = 2.04143, `000000332_lnorm` = 1.25144, `000000333_lnorm` = 1.57906, `000000334_lnorm` = 1.00787, `000000335_lnorm` = 1.2126, `000000336_lnorm` = 1.9552, `000000337_lnorm` = 2.82747, `000000338_lnorm` = 1.90187, `000000339_lnorm` = 1.42327, `000000340_lnorm` = 1.43655, `000000341_lnorm` = 1.09694, `000000342_lnorm` = 1.33248, +`000000343_lnorm` = 1.19027, `000000344_lnorm` = 1.97183, `000000345_lnorm` = 1.77387, `000000346_lnorm` = 1.07524, `000000347_lnorm` = 2.13797, `000000348_lnorm` = 2.16009, `000000349_lnorm` = 2.22319, `000000350_lnorm` = 2.71378, `000000351_lnorm` = 1.83287, `000000352_lnorm` = 2.48058, `000000353_lnorm` = 1.04259, `000000354_lnorm` = 1.55658, `000000355_lnorm` = 2.4289, `000000356_lnorm` = 3.13694, `000000357_lnorm` = 1.00273, `000000358_lnorm` = 1.32141, `000000359_lnorm` = 1.9265, `000000360_lnorm` = 1.34318, +`000000361_lnorm` = 1.42568, `000000362_lnorm` = 1.01439, `000000363_lnorm` = 1.49848, `000000364_lnorm` = 2.22676, `000000365_lnorm` = 1.62128, `000000366_lnorm` = 2.04695, `000000367_lnorm` = 1.18601, `000000368_lnorm` = 1.20376, `000000369_lnorm` = 1.2206, `000000370_lnorm` = 1.90946, `000000371_lnorm` = 1.13542, `000000372_lnorm` = 1.6593, `000000373_lnorm` = 1.46797, `000000374_lnorm` = 1.57447, `000000375_lnorm` = 1.85693, `000000376_lnorm` = 1.4851, `000000377_lnorm` = 1.42377, `000000378_lnorm` = 1.59597, +`000000379_lnorm` = 1.93396, `000000380_lnorm` = 1.23379, `000000381_lnorm` = 1.44014, `000000382_lnorm` = 1.83959, `000000383_lnorm` = 2.01984, `000000384_lnorm` = 1.50021, `000000385_lnorm` = 2.15706, `000000386_lnorm` = 2.04668, `000000387_lnorm` = 1.55483, `000000388_lnorm` = 2.37654, `000000389_lnorm` = 3.94267, `000000390_lnorm` = 2.21834, `000000391_lnorm` = 1.81093, `000000392_lnorm` = 4.19887, `000000393_lnorm` = 0.918212, `000000394_lnorm` = 1.45406, `000000395_lnorm` = 1.53526, `000000396_lnorm` = 2.26637, +`000000397_lnorm` = 2.57149, `000000398_lnorm` = 2.40347, `000000399_lnorm` = 1.73039, `000000400_lnorm` = 2.93577, `000000401_lnorm` = 2.69576, `000000402_lnorm` = 1.7978, `000000403_lnorm` = 1.82191, `000000404_lnorm` = 0.916132, `000000405_lnorm` = 0.894586, `000000406_lnorm` = 3.75364, `000000407_lnorm` = 1.03696, `000000408_lnorm` = 2.90402, `000000409_lnorm` = 1.64099, `000000410_lnorm` = 0.919569, `000000411_lnorm` = 2.21855, `000000412_lnorm` = 1.69848, `000000413_lnorm` = 1.73159, `000000414_lnorm` = 1.10058, +`000000415_lnorm` = 1.11313, `000000416_lnorm` = 1.2718, `000000417_lnorm` = 1.30444, `000000418_lnorm` = 2.21172, `000000419_lnorm` = 2.60012, `000000420_lnorm` = 2.44744, `000000421_lnorm` = 1.0187, `000000422_lnorm` = 2.21125, `000000423_lnorm` = 2.16267, `000000424_lnorm` = 1.94559, `000000425_lnorm` = 2.48945, `000000426_lnorm` = 1.13375, `000000427_lnorm` = 1.87002, `000000428_lnorm` = 2.00033, `000000429_lnorm` = 0.873976, `000000430_lnorm` = 0.832154, `000000431_lnorm` = 3.1563, `000000432_lnorm` = 1.42627, +`000000433_lnorm` = 1.64134, `000000434_lnorm` = 1.30208, `000000435_lnorm` = 1.56605, `000000436_lnorm` = 2.81942, `000000437_lnorm` = 2.1007, `000000438_lnorm` = 2.0308, `000000439_lnorm` = 1.14681, `000000440_lnorm` = 1.60425, `000000441_lnorm` = 1.94172, `000000442_lnorm` = 2.32118, `000000443_lnorm` = 1.3211, `000000444_lnorm` = 1.42303, `000000445_lnorm` = 2.13881, `000000446_lnorm` = 1.4268, `000000447_lnorm` = 2.18789, `000000448_lnorm` = 2.17622, `000000449_lnorm` = 3.41329, `000000450_lnorm` = 3.35896, +`000000451_lnorm` = 2.77879, `000000452_lnorm` = 1.8923, `000000453_lnorm` = 1.41733, `000000454_lnorm` = 1.33789, `000000455_lnorm` = 2.0997, `000000456_lnorm` = 1.26299, `000000457_lnorm` = 1.35083, `000000458_lnorm` = 1.44983, `000000459_lnorm` = 2.76589, `000000460_lnorm` = 1.53337, `000000461_lnorm` = 1.59673, `000000462_lnorm` = 2.08783, `000000463_lnorm` = 1.56069, `000000464_lnorm` = 1.12092, `000000465_lnorm` = 2.0189, `000000466_lnorm` = 2.2192, `000000467_lnorm` = 1.34221, `000000468_lnorm` = 2.11337, +`000000469_lnorm` = 2.22503, `000000470_lnorm` = 1.77325, `000000471_lnorm` = 1.74596, `000000472_lnorm` = 2.90492, `000000473_lnorm` = 0.953169, `000000474_lnorm` = 2.73462, `000000475_lnorm` = 2.16016, `000000476_lnorm` = 1.35835, `000000477_lnorm` = 1.27943, `000000478_lnorm` = 2.12858, `000000479_lnorm` = 1.28948, `000000480_lnorm` = 1.08294, `000000481_lnorm` = 1.88055, `000000482_lnorm` = 1.52331, `000000483_lnorm` = 2.08919, `000000484_lnorm` = 1.59584, `000000485_lnorm` = 1.52771, `000000486_lnorm` = 1.34335, +`000000487_lnorm` = 2.77588, `000000488_lnorm` = 1.26331, `000000489_lnorm` = 0.736362, `000000490_lnorm` = 2.87051, `000000491_lnorm` = 1.69302, `000000492_lnorm` = 1.11636, `000000493_lnorm` = 4.20855, `000000494_lnorm` = 1.93802, `000000495_lnorm` = 1.78429, `000000496_lnorm` = 2.07513, `000000497_lnorm` = 2.9275, `000000498_lnorm` = 1.59997, `000000499_lnorm` = 4.43423, `000000500_lnorm` = 3.1396, `000000501_lnorm` = 4.19754, `000000502_lnorm` = 1.43101, `000000503_lnorm` = 1.24887, `000000504_lnorm` = 1.33372, +`000000505_lnorm` = 3.32688, `000000506_lnorm` = 1.43877, `000000507_lnorm` = 2.73052, `000000508_lnorm` = 1.77473, `000000509_lnorm` = 3.87704, `000000510_lnorm` = 1.47882, `000000511_lnorm` = 1.62539, `000000512_lnorm` = 2.10461, `000000513_lnorm` = 1.69433, `000000514_lnorm` = 2.70887, `000000515_lnorm` = 2.54778, `000000516_lnorm` = 1.18788, `000000517_lnorm` = 0.947065, `000000518_lnorm` = 1.88539, `000000519_lnorm` = 1.71256, `000000520_lnorm` = 1.14461, `000000521_lnorm` = 1.27008, `000000522_lnorm` = 2.97766, +`000000523_lnorm` = 1.77179, `000000524_lnorm` = 2.46649, `000000525_lnorm` = 1.14346, `000000526_lnorm` = 1.89514, `000000527_lnorm` = 1.99545, `000000528_lnorm` = 1.14086, `000000529_lnorm` = 1.29784, `000000530_lnorm` = 1.25107, `000000531_lnorm` = 1.15474, `000000532_lnorm` = 1.24787, `000000533_lnorm` = 2.71133, `000000534_lnorm` = 1.79474, `000000535_lnorm` = 2.32162, `000000536_lnorm` = 3.3785, `000000537_lnorm` = 4.36059, `000000538_lnorm` = 2.60727, `000000539_lnorm` = 2.75091, `000000540_lnorm` = 1.5868, +`000000541_lnorm` = 1.1833, `000000542_lnorm` = 1.89416, `000000543_lnorm` = 2.7693, `000000544_lnorm` = 2.34744, `000000545_lnorm` = 2.2746, `000000546_lnorm` = 3.32722, `000000547_lnorm` = 1.95779, `000000548_lnorm` = 1.86548, `000000549_lnorm` = 0.480989, `000000550_lnorm` = 1.47263, `000000551_lnorm` = 1.47392, `000000552_lnorm` = 1.54194, `000000553_lnorm` = 2.22219, `000000554_lnorm` = 0.919689, `000000555_lnorm` = 1.39214, `000000556_lnorm` = 1.32837, `000000557_lnorm` = 2.04919, `000000558_lnorm` = 1.79051, +`000000559_lnorm` = 2.30908, `000000560_lnorm` = 0.631205, `000000561_lnorm` = 3.11303, `000000562_lnorm` = 2.4509, `000000563_lnorm` = 2.13419, `000000564_lnorm` = 2.32479, `000000565_lnorm` = 1.99135, `000000566_lnorm` = 1.94901, `000000567_lnorm` = 2.55599, `000000568_lnorm` = 1.05623, `000000569_lnorm` = 1.34003, `000000570_lnorm` = 1.3575, `000000571_lnorm` = 2.1116, `000000572_lnorm` = 1.63934, `000000573_lnorm` = 1.52701, `000000574_lnorm` = 1.45555, `000000575_lnorm` = 2.01982, `000000576_lnorm` = 2.75215, +`000000577_lnorm` = 0.977079, `000000578_lnorm` = 1.3253, `000000579_lnorm` = 2.14799, `000000580_lnorm` = 2.0086, `000000581_lnorm` = 1.60626, `000000582_lnorm` = 2.3921, `000000583_lnorm` = 2.40397, `000000584_lnorm` = 2.9732, `000000585_lnorm` = 2.70107, `000000586_lnorm` = 1.17736, `000000587_lnorm` = 1.5737, `000000588_lnorm` = 1.62547, `000000589_lnorm` = 1.91191, `000000590_lnorm` = 2.45269, `000000591_lnorm` = 1.52415, `000000592_lnorm` = 1.99608, `000000593_lnorm` = 1.6286, `000000594_lnorm` = 1.97753, +`000000595_lnorm` = 1.37223, `000000596_lnorm` = 1.07541, `000000597_lnorm` = 0.854059, `000000598_lnorm` = 1.53575, `000000599_lnorm` = 1.44919, `000000600_lnorm` = 2.04786, `000000601_lnorm` = 2.24641, `000000602_lnorm` = 2.61384, `000000603_lnorm` = 1.65474, `000000604_lnorm` = 2.95766, `000000605_lnorm` = 4.66151, `000000606_lnorm` = 2.22262, `000000607_lnorm` = 2.01574, `000000608_lnorm` = 1.48518, `000000609_lnorm` = 0.862165, `000000610_lnorm` = 1.29857, `000000611_lnorm` = 3.1189, `000000612_lnorm` = 1.72007, +`000000613_lnorm` = 1.09522, `000000614_lnorm` = 1.65267, `000000615_lnorm` = 2.7714, `000000616_lnorm` = 1.2399, `000000617_lnorm` = 1.39014, `000000618_lnorm` = 1.43025, `000000619_lnorm` = 1.06787, `000000620_lnorm` = 1.22254, `000000621_lnorm` = 1.72323, `000000622_lnorm` = 1.71684, `000000623_lnorm` = 2.70181, `000000624_lnorm` = 1.51176, `000000625_lnorm` = 1.2505, `000000626_lnorm` = 1.35754, `000000627_lnorm` = 0.978435, `000000628_lnorm` = 2.75994, `000000629_lnorm` = 2.95654, `000000630_lnorm` = 1.64154, +`000000631_lnorm` = 2.44981, `000000632_lnorm` = 1.65048, `000000633_lnorm` = 1.77068, `000000634_lnorm` = 2.26647, `000000635_lnorm` = 2.08989, `000000636_lnorm` = 2.02098, `000000637_lnorm` = 1.06716, `000000638_lnorm` = 1.11345, `000000639_lnorm` = 1.41083, `000000640_lnorm` = 1.73914, `000000641_lnorm` = 1.44619, `000000642_lnorm` = 2.17064, `000000643_lnorm` = 1.81502, `000000644_lnorm` = 1.74061, `000000645_lnorm` = 1.35165, `000000646_lnorm` = 1.15518, `000000647_lnorm` = 1.87199, `000000648_lnorm` = 2.62931, +`000000649_lnorm` = 2.31078, `000000650_lnorm` = 2.68424, `000000651_lnorm` = 1.7598, `000000652_lnorm` = 1.60339, `000000653_lnorm` = 3.59301, `000000654_lnorm` = 1.10603, `000000655_lnorm` = 2.32442, `000000656_lnorm` = 1.77175, `000000657_lnorm` = 2.20971, `000000658_lnorm` = 1.9106, `000000659_lnorm` = 2.25715, `000000660_lnorm` = 2.06905, `000000661_lnorm` = 2.30817, `000000662_lnorm` = 2.07573, `000000663_lnorm` = 1.77407, `000000664_lnorm` = 2.43578, `000000665_lnorm` = 2.12828, `000000666_lnorm` = 2.20591, +`000000667_lnorm` = 1.17683, `000000668_lnorm` = 1.66624, `000000669_lnorm` = 1.35763, `000000670_lnorm` = 1.78977, `000000671_lnorm` = 1.13355, `000000672_lnorm` = 2.743, `000000673_lnorm` = 1.34269, `000000674_lnorm` = 0.83548, `000000675_lnorm` = 1.51502, `000000676_lnorm` = 1.99193, `000000677_lnorm` = 2.28651, `000000678_lnorm` = 1.16106, `000000679_lnorm` = 2.5245, `000000680_lnorm` = 3.11831, `000000681_lnorm` = 1.94279, `000000682_lnorm` = 2.47932, `000000683_lnorm` = 1.13268, `000000684_lnorm` = 1.69413, +`000000685_lnorm` = 2.28826, `000000686_lnorm` = 1.90979, `000000687_lnorm` = 2.65157, `000000688_lnorm` = 1.41764, `000000689_lnorm` = 2.99469, `000000690_lnorm` = 1.32353, `000000691_lnorm` = 1.45726, `000000692_lnorm` = 1.97339, `000000693_lnorm` = 1.7671, `000000694_lnorm` = 0.908384, `000000695_lnorm` = 2.0966, `000000696_lnorm` = 0.965906, `000000697_lnorm` = 1.44357, `000000698_lnorm` = 2.20382, `000000699_lnorm` = 2.45003, `000000700_lnorm` = 2.9088, `000000701_lnorm` = 1.06315, `000000702_lnorm` = 1.52948, +`000000703_lnorm` = 1.37854, `000000704_lnorm` = 2.45674, `000000705_lnorm` = 1.62565, `000000706_lnorm` = 1.45386, `000000707_lnorm` = 1.79233, `000000708_lnorm` = 1.45578, `000000709_lnorm` = 3.58953, `000000710_lnorm` = 2.75587, `000000711_lnorm` = 2.18121, `000000712_lnorm` = 1.96543, `000000713_lnorm` = 1.42123, `000000714_lnorm` = 1.88975, `000000715_lnorm` = 2.03468, `000000716_lnorm` = 1.83555, `000000717_lnorm` = 1.14725, `000000718_lnorm` = 2.15482, `000000719_lnorm` = 2.83679, `000000720_lnorm` = 1.35482, +`000000721_lnorm` = 1.31996, `000000722_lnorm` = 1.58891, `000000723_lnorm` = 4.39374, `000000724_lnorm` = 1.29783, `000000725_lnorm` = 2.57891, `000000726_lnorm` = 1.25922, `000000727_lnorm` = 1.23203, `000000728_lnorm` = 1.46578, `000000729_lnorm` = 1.29022, `000000730_lnorm` = 2.609, `000000731_lnorm` = 1.98286, `000000732_lnorm` = 2.04389, `000000733_lnorm` = 2.82228, `000000734_lnorm` = 1.3775, `000000735_lnorm` = 2.45162, `000000736_lnorm` = 1.21815, `000000737_lnorm` = 1.15335, `000000738_lnorm` = 1.78975, +`000000739_lnorm` = 1.53569, `000000740_lnorm` = 2.2133, `000000741_lnorm` = 1.98769, `000000742_lnorm` = 1.87513, `000000743_lnorm` = 1.04263, `000000744_lnorm` = 1.86318, `000000745_lnorm` = 2.22433, `000000746_lnorm` = 2.00087, `000000747_lnorm` = 2.68541, `000000748_lnorm` = 3.36272, `000000749_lnorm` = 1.84894, `000000750_lnorm` = 1.67284, `000000751_lnorm` = 1.8297, `000000752_lnorm` = 0.96656, `000000753_lnorm` = 2.94891, `000000754_lnorm` = 2.02551, `000000755_lnorm` = 2.14384, `000000756_lnorm` = 1.61559, +`000000757_lnorm` = 1.34629, `000000758_lnorm` = 2.46315, `000000759_lnorm` = 1.82355, `000000760_lnorm` = 2.20364, `000000761_lnorm` = 1.81595, `000000762_lnorm` = 1.39895, `000000763_lnorm` = 1.11401, `000000764_lnorm` = 1.0403, `000000765_lnorm` = 3.46626, `000000766_lnorm` = 0.612314, `000000767_lnorm` = 2.21868, `000000768_lnorm` = 1.02168, `000000769_lnorm` = 1.85731, `000000770_lnorm` = 1.3162, `000000771_lnorm` = 1.3084, `000000772_lnorm` = 1.03984, `000000773_lnorm` = 2.21968, `000000774_lnorm` = 1.40523, +`000000775_lnorm` = 1.63671, `000000776_lnorm` = 2.35501, `000000777_lnorm` = 2.13487, `000000778_lnorm` = 1.59329, `000000779_lnorm` = 2.27573, `000000780_lnorm` = 0.656163, `000000781_lnorm` = 1.92149, `000000782_lnorm` = 1.50652, `000000783_lnorm` = 1.52454, `000000784_lnorm` = 1.40981, `000000785_lnorm` = 1.89922, `000000786_lnorm` = 3.55173, `000000787_lnorm` = 1.01509, `000000788_lnorm` = 1.73648, `000000789_lnorm` = 2.21852, `000000790_lnorm` = 1.67645, `000000791_lnorm` = 2.53566, `000000792_lnorm` = 1.78863, +`000000793_lnorm` = 1.38939, `000000794_lnorm` = 1.73823, `000000795_lnorm` = 1.93236, `000000796_lnorm` = 2.27246, `000000797_lnorm` = 1.9506, `000000798_lnorm` = 2.79071, `000000799_lnorm` = 1.85945, `000000800_lnorm` = 1.69699, `000000801_lnorm` = 1.20041, `000000802_lnorm` = 2.30994, `000000803_lnorm` = 2.28003, `000000804_lnorm` = 2.12277, `000000805_lnorm` = 1.40851, `000000806_lnorm` = 2.70246, `000000807_lnorm` = 0.952187, `000000808_lnorm` = 1.76158, `000000809_lnorm` = 1.55078, `000000810_lnorm` = 1.46163, +`000000811_lnorm` = 2.11148, `000000812_lnorm` = 1.11351, `000000813_lnorm` = 2.73889, `000000814_lnorm` = 1.51083, `000000815_lnorm` = 1.2664, `000000816_lnorm` = 1.60512, `000000817_lnorm` = 1.05833, `000000818_lnorm` = 1.68812, `000000819_lnorm` = 2.66026, `000000820_lnorm` = 1.65418, `000000821_lnorm` = 1.08777, `000000822_lnorm` = 1.33578, `000000823_lnorm` = 1.09943, `000000824_lnorm` = 1.50981, `000000825_lnorm` = 1.619, `000000826_lnorm` = 2.30468, `000000827_lnorm` = 0.855122, `000000828_lnorm` = 2.42884, +`000000829_lnorm` = 1.38089, `000000830_lnorm` = 4.4522, `000000831_lnorm` = 1.66963, `000000832_lnorm` = 1.85567, `000000833_lnorm` = 1.08886, `000000834_lnorm` = 0.92141, `000000835_lnorm` = 1.46622, `000000836_lnorm` = 2.73844, `000000837_lnorm` = 1.58313, `000000838_lnorm` = 1.38034, `000000839_lnorm` = 4.41954, `000000840_lnorm` = 0.943253, `000000841_lnorm` = 2.27984, `000000842_lnorm` = 0.912843, `000000843_lnorm` = 3.55196, `000000844_lnorm` = 1.1334, `000000845_lnorm` = 1.32161, `000000846_lnorm` = 1.15393, +`000000847_lnorm` = 1.98561, `000000848_lnorm` = 2.20511, `000000849_lnorm` = 1.54514, `000000850_lnorm` = 2.42928, `000000851_lnorm` = 4.14373, `000000852_lnorm` = 1.43421, `000000853_lnorm` = 1.86873, `000000854_lnorm` = 2.12602, `000000855_lnorm` = 1.61318, `000000856_lnorm` = 2.90885, `000000857_lnorm` = 1.78374, `000000858_lnorm` = 2.71821, `000000859_lnorm` = 2.36494, `000000860_lnorm` = 1.34748, `000000861_lnorm` = 2.34658, `000000862_lnorm` = 1.52776, `000000863_lnorm` = 0.600716, `000000864_lnorm` = 1.09026, +`000000865_lnorm` = 2.03663, `000000866_lnorm` = 1.49139, `000000867_lnorm` = 1.12194, `000000868_lnorm` = 1.07614, `000000869_lnorm` = 1.85279, `000000870_lnorm` = 2.95831, `000000871_lnorm` = 2.98388, `000000872_lnorm` = 2.99171, `000000873_lnorm` = 2.63004, `000000874_lnorm` = 2.71376, `000000875_lnorm` = 2.88341, `000000876_lnorm` = 1.53379, `000000877_lnorm` = 1.38715, `000000878_lnorm` = 1.82625, `000000879_lnorm` = 2.14879, `000000880_lnorm` = 1.45223, `000000881_lnorm` = 2.03254, `000000882_lnorm` = 1.23025, +`000000883_lnorm` = 4.04122, `000000884_lnorm` = 1.87983, `000000885_lnorm` = 0.920497, `000000886_lnorm` = 1.39447, `000000887_lnorm` = 2.25378, `000000888_lnorm` = 1.17531, `000000889_lnorm` = 1.54539, `000000890_lnorm` = 1.16774, `000000891_lnorm` = 1.62572, `000000892_lnorm` = 0.97367, `000000893_lnorm` = 1.10345, `000000894_lnorm` = 1.55087, `000000895_lnorm` = 1.43027, `000000896_lnorm` = 0.962504, `000000897_lnorm` = 2.10172, `000000898_lnorm` = 1.45381, `000000899_lnorm` = 2.50912, `000000900_lnorm` = 0.829112, +`000000901_lnorm` = 1.49204, `000000902_lnorm` = 1.97533, `000000903_lnorm` = 1.08147, `000000904_lnorm` = 1.12325, `000000905_lnorm` = 1.646, `000000906_lnorm` = 0.996103, `000000907_lnorm` = 3.10322, `000000908_lnorm` = 1.11548, `000000909_lnorm` = 1.86724, `000000910_lnorm` = 1.93593, `000000911_lnorm` = 0.861117, `000000912_lnorm` = 2.97444, `000000913_lnorm` = 2.62286, `000000914_lnorm` = 3.12932, `000000915_lnorm` = 1.27295, `000000916_lnorm` = 1.42102, `000000917_lnorm` = 1.63069, `000000918_lnorm` = 3.45913, +`000000919_lnorm` = 2.76521, `000000920_lnorm` = 0.692318, `000000921_lnorm` = 1.22273, `000000922_lnorm` = 1.62976, `000000923_lnorm` = 1.63547, `000000924_lnorm` = 1.49555, `000000925_lnorm` = 2.0772, `000000926_lnorm` = 2.2857, `000000927_lnorm` = 2.10495, `000000928_lnorm` = 0.715004, `000000929_lnorm` = 1.32799, `000000930_lnorm` = 2.34715, `000000931_lnorm` = 1.48491, `000000932_lnorm` = 1.79496, `000000933_lnorm` = 2.20081, `000000934_lnorm` = 1.68291, `000000935_lnorm` = 3.47905, `000000936_lnorm` = 2.10751, +`000000937_lnorm` = 2.46338, `000000938_lnorm` = 2.88346, `000000939_lnorm` = 1.03523, `000000940_lnorm` = 1.82537, `000000941_lnorm` = 1.64746, `000000942_lnorm` = 1.83653, `000000943_lnorm` = 2.17434, `000000944_lnorm` = 2.34556, `000000945_lnorm` = 1.35487, `000000946_lnorm` = 2.66805, `000000947_lnorm` = 1.38449, `000000948_lnorm` = 0.992328, `000000949_lnorm` = 1.2798, `000000950_lnorm` = 2.11436, `000000951_lnorm` = 1.54768, `000000952_lnorm` = 1.2801, `000000953_lnorm` = 1.13938, `000000954_lnorm` = 2.31566, +`000000955_lnorm` = 1.23916, `000000956_lnorm` = 1.09096, `000000957_lnorm` = 1.80177, `000000958_lnorm` = 1.40609, `000000959_lnorm` = 2.03731, `000000960_lnorm` = 1.96242, `000000961_lnorm` = 1.47829, `000000962_lnorm` = 1.54191, `000000963_lnorm` = 1.50901, `000000964_lnorm` = 1.58541, `000000965_lnorm` = 1.30164, `000000966_lnorm` = 1.54642, `000000967_lnorm` = 0.985902, `000000968_lnorm` = 1.74622, `000000969_lnorm` = 2.40104, `000000970_lnorm` = 1.47236, `000000971_lnorm` = 1.01637, `000000972_lnorm` = 2.01739, +`000000973_lnorm` = 1.27309, `000000974_lnorm` = 1.3458, `000000975_lnorm` = 1.66014, `000000976_lnorm` = 1.64592, `000000977_lnorm` = 1.23841, `000000978_lnorm` = 1.86099, `000000979_lnorm` = 1.95426, `000000980_lnorm` = 0.994335, `000000981_lnorm` = 1.2769, `000000982_lnorm` = 1.25548, `000000983_lnorm` = 1.55396, `000000984_lnorm` = 1.32034, `000000985_lnorm` = 1.27724, `000000986_lnorm` = 2.93347, `000000987_lnorm` = 2.10903, `000000988_lnorm` = 1.23573, `000000989_lnorm` = 2.31355, `000000990_lnorm` = 2.0226, +`000000991_lnorm` = 1.98181, `000000992_lnorm` = 1.36425, `000000993_lnorm` = 1.39059, `000000994_lnorm` = 2.13309, `000000995_lnorm` = 1.17508, `000000996_lnorm` = 2.05744, `000000997_lnorm` = 2.25295, `000000998_lnorm` = 2.09449, `000000999_lnorm` = 1.28196, `000001000_lnorm` = 0.91771)" diff --git a/tests/testthat/_snaps/hc/hc_cis_chloride50.csv b/tests/testthat/_snaps/hc/hc_cis_chloride50.csv index f1937c507..d4d4e48b7 100644 --- a/tests/testthat/_snaps/hc/hc_cis_chloride50.csv +++ b/tests/testthat/_snaps/hc/hc_cis_chloride50.csv @@ -1,3 +1,3 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,samples -lnorm_lnorm,0.05,36.8762,NA,NA,NA,0.617286,parametric,1000,numeric(0) +lnorm_lnorm,0.05,36.8756,NA,NA,NA,0.617286,parametric,1000,numeric(0) llogis_llogis,0.05,36.9061,NA,NA,NA,0.382714,parametric,1000,numeric(0) diff --git a/tests/testthat/_snaps/hc/hc_cis_level08.csv b/tests/testthat/_snaps/hc/hc_cis_level08.csv index e8093cdb1..a3d5e9649 100644 --- a/tests/testthat/_snaps/hc/hc_cis_level08.csv +++ b/tests/testthat/_snaps/hc/hc_cis_level08.csv @@ -1,57 +1,57 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.682856,1.11342,2.76013,1,parametric,1000,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344, `000000004_lnorm` = 1.434, `000000005_lnorm` = 1.81625, `000000006_lnorm` = 2.64477, `000000007_lnorm` = 1.97971, `000000008_lnorm` = 1.40648, `000000009_lnorm` = 1.75897, `000000010_lnorm` = 2.5282, `000000011_lnorm` = 1.75287, `000000012_lnorm` = 2.64468, `000000013_lnorm` = 1.89607, `000000014_lnorm` = 1.42891, `000000015_lnorm` = 2.04596, `000000016_lnorm` = 1.076, `000000017_lnorm` = 1.82926, `000000018_lnorm` = 1.77755, -`000000019_lnorm` = 1.81362, `000000020_lnorm` = 1.56523, `000000021_lnorm` = 1.31329, `000000022_lnorm` = 2.34268, `000000023_lnorm` = 1.95807, `000000024_lnorm` = 0.979767, `000000025_lnorm` = 1.90104, `000000026_lnorm` = 1.31927, `000000027_lnorm` = 1.22682, `000000028_lnorm` = 1.36298, `000000029_lnorm` = 2.03217, `000000030_lnorm` = 1.48939, `000000031_lnorm` = 2.32384, `000000032_lnorm` = 2.7647, `000000033_lnorm` = 2.12493, `000000034_lnorm` = 1.16584, `000000035_lnorm` = 2.24326, `000000036_lnorm` = 1.85553, -`000000037_lnorm` = 2.58017, `000000038_lnorm` = 2.13528, `000000039_lnorm` = 1.12606, `000000040_lnorm` = 1.92819, `000000041_lnorm` = 2.02068, `000000042_lnorm` = 1.98608, `000000043_lnorm` = 2.96208, `000000044_lnorm` = 1.00953, `000000045_lnorm` = 0.524818, `000000046_lnorm` = 2.7306, `000000047_lnorm` = 1.49195, `000000048_lnorm` = 1.52999, `000000049_lnorm` = 1.91416, `000000050_lnorm` = 0.919346, `000000051_lnorm` = 0.984986, `000000052_lnorm` = 1.639, `000000053_lnorm` = 1.26688, `000000054_lnorm` = 1.31936, -`000000055_lnorm` = 1.15461, `000000056_lnorm` = 1.35223, `000000057_lnorm` = 2.41231, `000000058_lnorm` = 0.73241, `000000059_lnorm` = 1.9412, `000000060_lnorm` = 1.82985, `000000061_lnorm` = 1.80799, `000000062_lnorm` = 1.09987, `000000063_lnorm` = 1.46473, `000000064_lnorm` = 1.07241, `000000065_lnorm` = 1.27812, `000000066_lnorm` = 1.83396, `000000067_lnorm` = 1.30446, `000000068_lnorm` = 1.2981, `000000069_lnorm` = 1.20418, `000000070_lnorm` = 2.83824, `000000071_lnorm` = 1.18793, `000000072_lnorm` = 2.01092, -`000000073_lnorm` = 1.79121, `000000074_lnorm` = 1.15301, `000000075_lnorm` = 1.9106, `000000076_lnorm` = 1.5713, `000000077_lnorm` = 2.16168, `000000078_lnorm` = 1.99461, `000000079_lnorm` = 2.74488, `000000080_lnorm` = 2.45767, `000000081_lnorm` = 1.38901, `000000082_lnorm` = 1.77219, `000000083_lnorm` = 2.34756, `000000084_lnorm` = 1.99894, `000000085_lnorm` = 1.53282, `000000086_lnorm` = 2.63433, `000000087_lnorm` = 1.70809, `000000088_lnorm` = 1.86774, `000000089_lnorm` = 1.98205, `000000090_lnorm` = 2.62623, -`000000091_lnorm` = 2.31919, `000000092_lnorm` = 1.75355, `000000093_lnorm` = 1.597, `000000094_lnorm` = 1.73772, `000000095_lnorm` = 2.1588, `000000096_lnorm` = 2.76179, `000000097_lnorm` = 1.34877, `000000098_lnorm` = 1.48579, `000000099_lnorm` = 2.35546, `000000100_lnorm` = 1.28162, `000000101_lnorm` = 1.4029, `000000102_lnorm` = 3.68422, `000000103_lnorm` = 2.36213, `000000104_lnorm` = 2.0522, `000000105_lnorm` = 1.14376, `000000106_lnorm` = 1.78657, `000000107_lnorm` = 1.74016, `000000108_lnorm` = 1.32566, -`000000109_lnorm` = 3.36175, `000000110_lnorm` = 1.49744, `000000111_lnorm` = 1.46768, `000000112_lnorm` = 1.47672, `000000113_lnorm` = 1.68099, `000000114_lnorm` = 2.33906, `000000115_lnorm` = 1.43903, `000000116_lnorm` = 0.709157, `000000117_lnorm` = 0.770381, `000000118_lnorm` = 2.2042, `000000119_lnorm` = 3.44236, `000000120_lnorm` = 1.3995, `000000121_lnorm` = 1.18716, `000000122_lnorm` = 1.64169, `000000123_lnorm` = 2.15109, `000000124_lnorm` = 2.45262, `000000125_lnorm` = 2.14768, `000000126_lnorm` = 2.24818, -`000000127_lnorm` = 2.55815, `000000128_lnorm` = 2.03522, `000000129_lnorm` = 2.90727, `000000130_lnorm` = 1.41121, `000000131_lnorm` = 2.47096, `000000132_lnorm` = 1.22085, `000000133_lnorm` = 2.69527, `000000134_lnorm` = 1.97345, `000000135_lnorm` = 1.71555, `000000136_lnorm` = 1.72117, `000000137_lnorm` = 4.51798, `000000138_lnorm` = 2.22872, `000000139_lnorm` = 3.4864, `000000140_lnorm` = 1.5389, `000000141_lnorm` = 2.00422, `000000142_lnorm` = 2.33338, `000000143_lnorm` = 1.37928, `000000144_lnorm` = 2.16222, -`000000145_lnorm` = 2.53269, `000000146_lnorm` = 1.38425, `000000147_lnorm` = 2.00788, `000000148_lnorm` = 1.31033, `000000149_lnorm` = 2.37918, `000000150_lnorm` = 0.949037, `000000151_lnorm` = 2.28726, `000000152_lnorm` = 1.29019, `000000153_lnorm` = 2.63461, `000000154_lnorm` = 1.64242, `000000155_lnorm` = 1.66381, `000000156_lnorm` = 1.61202, `000000157_lnorm` = 1.97333, `000000158_lnorm` = 1.3912, `000000159_lnorm` = 1.97515, `000000160_lnorm` = 2.93093, `000000161_lnorm` = 1.92314, `000000162_lnorm` = 1.31012, -`000000163_lnorm` = 1.7771, `000000164_lnorm` = 2.25231, `000000165_lnorm` = 1.61186, `000000166_lnorm` = 2.71489, `000000167_lnorm` = 1.53473, `000000168_lnorm` = 1.21652, `000000169_lnorm` = 2.29439, `000000170_lnorm` = 2.67322, `000000171_lnorm` = 1.12951, `000000172_lnorm` = 1.84354, `000000173_lnorm` = 4.08302, `000000174_lnorm` = 1.49518, `000000175_lnorm` = 1.34551, `000000176_lnorm` = 1.70373, `000000177_lnorm` = 1.6595, `000000178_lnorm` = 1.57501, `000000179_lnorm` = 2.15907, `000000180_lnorm` = 1.7929, -`000000181_lnorm` = 1.96764, `000000182_lnorm` = 1.57101, `000000183_lnorm` = 2.83637, `000000184_lnorm` = 2.97611, `000000185_lnorm` = 1.18481, `000000186_lnorm` = 2.06272, `000000187_lnorm` = 1.76132, `000000188_lnorm` = 2.49663, `000000189_lnorm` = 0.683876, `000000190_lnorm` = 2.78282, `000000191_lnorm` = 0.923409, `000000192_lnorm` = 2.02137, `000000193_lnorm` = 2.34055, `000000194_lnorm` = 2.4864, `000000195_lnorm` = 1.82451, `000000196_lnorm` = 1.92976, `000000197_lnorm` = 2.12464, `000000198_lnorm` = 2.41837, -`000000199_lnorm` = 2.27514, `000000200_lnorm` = 1.68234, `000000201_lnorm` = 0.951753, `000000202_lnorm` = 1.79286, `000000203_lnorm` = 1.02251, `000000204_lnorm` = 3.65624, `000000205_lnorm` = 1.58279, `000000206_lnorm` = 2.56041, `000000207_lnorm` = 1.63661, `000000208_lnorm` = 2.37806, `000000209_lnorm` = 1.81254, `000000210_lnorm` = 1.19602, `000000211_lnorm` = 2.11509, `000000212_lnorm` = 1.50091, `000000213_lnorm` = 1.9014, `000000214_lnorm` = 1.18229, `000000215_lnorm` = 3.0938, `000000216_lnorm` = 1.52569, -`000000217_lnorm` = 1.55911, `000000218_lnorm` = 1.111, `000000219_lnorm` = 1.61811, `000000220_lnorm` = 1.40567, `000000221_lnorm` = 1.92319, `000000222_lnorm` = 2.01052, `000000223_lnorm` = 1.41332, `000000224_lnorm` = 2.93398, `000000225_lnorm` = 1.4652, `000000226_lnorm` = 1.30127, `000000227_lnorm` = 2.30989, `000000228_lnorm` = 1.19668, `000000229_lnorm` = 1.13459, `000000230_lnorm` = 2.25383, `000000231_lnorm` = 1.72355, `000000232_lnorm` = 2.94256, `000000233_lnorm` = 2.01322, `000000234_lnorm` = 2.41205, -`000000235_lnorm` = 2.23295, `000000236_lnorm` = 2.58726, `000000237_lnorm` = 1.81906, `000000238_lnorm` = 1.30275, `000000239_lnorm` = 2.2913, `000000240_lnorm` = 1.07857, `000000241_lnorm` = 1.00845, `000000242_lnorm` = 2.17341, `000000243_lnorm` = 2.80348, `000000244_lnorm` = 1.09174, `000000245_lnorm` = 1.57454, `000000246_lnorm` = 1.53234, `000000247_lnorm` = 1.13468, `000000248_lnorm` = 1.57223, `000000249_lnorm` = 1.3564, `000000250_lnorm` = 1.57846, `000000251_lnorm` = 3.40361, `000000252_lnorm` = 2.1552, -`000000253_lnorm` = 0.957097, `000000254_lnorm` = 1.71972, `000000255_lnorm` = 1.246, `000000256_lnorm` = 1.64064, `000000257_lnorm` = 1.85754, `000000258_lnorm` = 2.32517, `000000259_lnorm` = 1.53654, `000000260_lnorm` = 4.93482, `000000261_lnorm` = 2.92566, `000000262_lnorm` = 1.80187, `000000263_lnorm` = 1.30003, `000000264_lnorm` = 3.32539, `000000265_lnorm` = 1.00911, `000000266_lnorm` = 1.3714, `000000267_lnorm` = 1.49066, `000000268_lnorm` = 1.16181, `000000269_lnorm` = 2.17011, `000000270_lnorm` = 1.93628, -`000000271_lnorm` = 1.93382, `000000272_lnorm` = 1.56229, `000000273_lnorm` = 1.934, `000000274_lnorm` = 1.48945, `000000275_lnorm` = 1.5608, `000000276_lnorm` = 2.76426, `000000277_lnorm` = 1.41112, `000000278_lnorm` = 3.0299, `000000279_lnorm` = 1.20218, `000000280_lnorm` = 1.17921, `000000281_lnorm` = 3.31634, `000000282_lnorm` = 2.2934, `000000283_lnorm` = 1.75066, `000000284_lnorm` = 2.23803, `000000285_lnorm` = 1.73284, `000000286_lnorm` = 2.27553, `000000287_lnorm` = 1.06919, `000000288_lnorm` = 2.22348, -`000000289_lnorm` = 1.43162, `000000290_lnorm` = 2.38861, `000000291_lnorm` = 1.9776, `000000292_lnorm` = 1.75615, `000000293_lnorm` = 1.51279, `000000294_lnorm` = 4.17684, `000000295_lnorm` = 1.10022, `000000296_lnorm` = 3.42715, `000000297_lnorm` = 1.28569, `000000298_lnorm` = 1.91589, `000000299_lnorm` = 1.14508, `000000300_lnorm` = 1.36318, `000000301_lnorm` = 1.23333, `000000302_lnorm` = 1.07115, `000000303_lnorm` = 1.85, `000000304_lnorm` = 2.22285, `000000305_lnorm` = 1.22099, `000000306_lnorm` = 0.769899, -`000000307_lnorm` = 2.26783, `000000308_lnorm` = 2.76718, `000000309_lnorm` = 2.80311, `000000310_lnorm` = 1.7925, `000000311_lnorm` = 1.50201, `000000312_lnorm` = 2.33447, `000000313_lnorm` = 1.51844, `000000314_lnorm` = 1.49481, `000000315_lnorm` = 2.28878, `000000316_lnorm` = 2.50457, `000000317_lnorm` = 1.49334, `000000318_lnorm` = 1.2303, `000000319_lnorm` = 2.97667, `000000320_lnorm` = 2.11936, `000000321_lnorm` = 1.49001, `000000322_lnorm` = 1.68884, `000000323_lnorm` = 1.43209, `000000324_lnorm` = 1.93249, -`000000325_lnorm` = 1.48784, `000000326_lnorm` = 2.98808, `000000327_lnorm` = 2.30993, `000000328_lnorm` = 2.99877, `000000329_lnorm` = 1.741, `000000330_lnorm` = 1.88757, `000000331_lnorm` = 2.04144, `000000332_lnorm` = 1.25144, `000000333_lnorm` = 1.57907, `000000334_lnorm` = 1.00788, `000000335_lnorm` = 1.2126, `000000336_lnorm` = 1.9552, `000000337_lnorm` = 2.82747, `000000338_lnorm` = 1.90187, `000000339_lnorm` = 1.42327, `000000340_lnorm` = 1.43656, `000000341_lnorm` = 1.09695, `000000342_lnorm` = 1.33248, -`000000343_lnorm` = 1.19027, `000000344_lnorm` = 1.97184, `000000345_lnorm` = 1.77387, `000000346_lnorm` = 1.07525, `000000347_lnorm` = 2.13797, `000000348_lnorm` = 2.16009, `000000349_lnorm` = 2.2232, `000000350_lnorm` = 2.71378, `000000351_lnorm` = 1.83288, `000000352_lnorm` = 2.48059, `000000353_lnorm` = 1.04259, `000000354_lnorm` = 1.55659, `000000355_lnorm` = 2.4289, `000000356_lnorm` = 3.13694, `000000357_lnorm` = 1.00274, `000000358_lnorm` = 1.32141, `000000359_lnorm` = 1.9265, `000000360_lnorm` = 1.34318, -`000000361_lnorm` = 1.42568, `000000362_lnorm` = 1.01439, `000000363_lnorm` = 1.49849, `000000364_lnorm` = 2.22677, `000000365_lnorm` = 1.62129, `000000366_lnorm` = 2.04696, `000000367_lnorm` = 1.18602, `000000368_lnorm` = 1.20377, `000000369_lnorm` = 1.2206, `000000370_lnorm` = 1.90947, `000000371_lnorm` = 1.13543, `000000372_lnorm` = 1.6593, `000000373_lnorm` = 1.46798, `000000374_lnorm` = 1.57448, `000000375_lnorm` = 1.85693, `000000376_lnorm` = 1.4851, `000000377_lnorm` = 1.42378, `000000378_lnorm` = 1.59598, -`000000379_lnorm` = 1.93397, `000000380_lnorm` = 1.23379, `000000381_lnorm` = 1.44014, `000000382_lnorm` = 1.8396, `000000383_lnorm` = 2.01984, `000000384_lnorm` = 1.50021, `000000385_lnorm` = 2.15707, `000000386_lnorm` = 2.04668, `000000387_lnorm` = 1.55484, `000000388_lnorm` = 2.37655, `000000389_lnorm` = 3.94268, `000000390_lnorm` = 2.21834, `000000391_lnorm` = 1.81094, `000000392_lnorm` = 4.19888, `000000393_lnorm` = 0.918216, `000000394_lnorm` = 1.45406, `000000395_lnorm` = 1.53526, `000000396_lnorm` = 2.26637, -`000000397_lnorm` = 2.57149, `000000398_lnorm` = 2.40348, `000000399_lnorm` = 1.73039, `000000400_lnorm` = 2.93577, `000000401_lnorm` = 2.69577, `000000402_lnorm` = 1.79781, `000000403_lnorm` = 1.82191, `000000404_lnorm` = 0.916136, `000000405_lnorm` = 0.89459, `000000406_lnorm` = 3.75364, `000000407_lnorm` = 1.03696, `000000408_lnorm` = 2.90403, `000000409_lnorm` = 1.641, `000000410_lnorm` = 0.919572, `000000411_lnorm` = 2.21855, `000000412_lnorm` = 1.69849, `000000413_lnorm` = 1.7316, `000000414_lnorm` = 1.10058, -`000000415_lnorm` = 1.11313, `000000416_lnorm` = 1.27181, `000000417_lnorm` = 1.30444, `000000418_lnorm` = 2.21173, `000000419_lnorm` = 2.60013, `000000420_lnorm` = 2.44744, `000000421_lnorm` = 1.0187, `000000422_lnorm` = 2.21125, `000000423_lnorm` = 2.16268, `000000424_lnorm` = 1.94559, `000000425_lnorm` = 2.48946, `000000426_lnorm` = 1.13375, `000000427_lnorm` = 1.87002, `000000428_lnorm` = 2.00034, `000000429_lnorm` = 0.87398, `000000430_lnorm` = 0.832158, `000000431_lnorm` = 3.1563, `000000432_lnorm` = 1.42628, -`000000433_lnorm` = 1.64134, `000000434_lnorm` = 1.30208, `000000435_lnorm` = 1.56605, `000000436_lnorm` = 2.81943, `000000437_lnorm` = 2.10071, `000000438_lnorm` = 2.0308, `000000439_lnorm` = 1.14681, `000000440_lnorm` = 1.60425, `000000441_lnorm` = 1.94173, `000000442_lnorm` = 2.32118, `000000443_lnorm` = 1.32111, `000000444_lnorm` = 1.42303, `000000445_lnorm` = 2.13881, `000000446_lnorm` = 1.42681, `000000447_lnorm` = 2.18789, `000000448_lnorm` = 2.17623, `000000449_lnorm` = 3.41329, `000000450_lnorm` = 3.35897, -`000000451_lnorm` = 2.7788, `000000452_lnorm` = 1.8923, `000000453_lnorm` = 1.41734, `000000454_lnorm` = 1.33789, `000000455_lnorm` = 2.09971, `000000456_lnorm` = 1.26299, `000000457_lnorm` = 1.35084, `000000458_lnorm` = 1.44984, `000000459_lnorm` = 2.7659, `000000460_lnorm` = 1.53337, `000000461_lnorm` = 1.59674, `000000462_lnorm` = 2.08784, `000000463_lnorm` = 1.5607, `000000464_lnorm` = 1.12092, `000000465_lnorm` = 2.0189, `000000466_lnorm` = 2.21921, `000000467_lnorm` = 1.34222, `000000468_lnorm` = 2.11337, -`000000469_lnorm` = 2.22503, `000000470_lnorm` = 1.77326, `000000471_lnorm` = 1.74596, `000000472_lnorm` = 2.90492, `000000473_lnorm` = 0.953172, `000000474_lnorm` = 2.73463, `000000475_lnorm` = 2.16017, `000000476_lnorm` = 1.35835, `000000477_lnorm` = 1.27944, `000000478_lnorm` = 2.12859, `000000479_lnorm` = 1.28948, `000000480_lnorm` = 1.08294, `000000481_lnorm` = 1.88055, `000000482_lnorm` = 1.52331, `000000483_lnorm` = 2.0892, `000000484_lnorm` = 1.59584, `000000485_lnorm` = 1.52771, `000000486_lnorm` = 1.34335, -`000000487_lnorm` = 2.77589, `000000488_lnorm` = 1.26331, `000000489_lnorm` = 0.736365, `000000490_lnorm` = 2.87051, `000000491_lnorm` = 1.69302, `000000492_lnorm` = 1.11637, `000000493_lnorm` = 4.20856, `000000494_lnorm` = 1.93802, `000000495_lnorm` = 1.78429, `000000496_lnorm` = 2.07514, `000000497_lnorm` = 2.92751, `000000498_lnorm` = 1.59997, `000000499_lnorm` = 4.43424, `000000500_lnorm` = 3.13961, `000000501_lnorm` = 4.19755, `000000502_lnorm` = 1.43101, `000000503_lnorm` = 1.24887, `000000504_lnorm` = 1.33373, -`000000505_lnorm` = 3.32688, `000000506_lnorm` = 1.43878, `000000507_lnorm` = 2.73052, `000000508_lnorm` = 1.77473, `000000509_lnorm` = 3.87704, `000000510_lnorm` = 1.47882, `000000511_lnorm` = 1.6254, `000000512_lnorm` = 2.10462, `000000513_lnorm` = 1.69433, `000000514_lnorm` = 2.70887, `000000515_lnorm` = 2.54778, `000000516_lnorm` = 1.18789, `000000517_lnorm` = 0.947068, `000000518_lnorm` = 1.88539, `000000519_lnorm` = 1.71256, `000000520_lnorm` = 1.14462, `000000521_lnorm` = 1.27009, `000000522_lnorm` = 2.97767, -`000000523_lnorm` = 1.77179, `000000524_lnorm` = 2.46649, `000000525_lnorm` = 1.14346, `000000526_lnorm` = 1.89515, `000000527_lnorm` = 1.99545, `000000528_lnorm` = 1.14086, `000000529_lnorm` = 1.29784, `000000530_lnorm` = 1.25108, `000000531_lnorm` = 1.15474, `000000532_lnorm` = 1.24787, `000000533_lnorm` = 2.71134, `000000534_lnorm` = 1.79474, `000000535_lnorm` = 2.32163, `000000536_lnorm` = 3.37851, `000000537_lnorm` = 4.36059, `000000538_lnorm` = 2.60727, `000000539_lnorm` = 2.75092, `000000540_lnorm` = 1.5868, -`000000541_lnorm` = 1.1833, `000000542_lnorm` = 1.89417, `000000543_lnorm` = 2.7693, `000000544_lnorm` = 2.34744, `000000545_lnorm` = 2.27461, `000000546_lnorm` = 3.32722, `000000547_lnorm` = 1.95779, `000000548_lnorm` = 1.86549, `000000549_lnorm` = 0.480992, `000000550_lnorm` = 1.47264, `000000551_lnorm` = 1.47393, `000000552_lnorm` = 1.54195, `000000553_lnorm` = 2.2222, `000000554_lnorm` = 0.919692, `000000555_lnorm` = 1.39215, `000000556_lnorm` = 1.32837, `000000557_lnorm` = 2.04919, `000000558_lnorm` = 1.79052, -`000000559_lnorm` = 2.30908, `000000560_lnorm` = 0.631207, `000000561_lnorm` = 3.11303, `000000562_lnorm` = 2.4509, `000000563_lnorm` = 2.13419, `000000564_lnorm` = 2.3248, `000000565_lnorm` = 1.99135, `000000566_lnorm` = 1.94901, `000000567_lnorm` = 2.556, `000000568_lnorm` = 1.05624, `000000569_lnorm` = 1.34003, `000000570_lnorm` = 1.35751, `000000571_lnorm` = 2.1116, `000000572_lnorm` = 1.63934, `000000573_lnorm` = 1.52702, `000000574_lnorm` = 1.45556, `000000575_lnorm` = 2.01982, `000000576_lnorm` = 2.75215, -`000000577_lnorm` = 0.977083, `000000578_lnorm` = 1.3253, `000000579_lnorm` = 2.14799, `000000580_lnorm` = 2.0086, `000000581_lnorm` = 1.60627, `000000582_lnorm` = 2.3921, `000000583_lnorm` = 2.40398, `000000584_lnorm` = 2.9732, `000000585_lnorm` = 2.70107, `000000586_lnorm` = 1.17736, `000000587_lnorm` = 1.5737, `000000588_lnorm` = 1.62547, `000000589_lnorm` = 1.91191, `000000590_lnorm` = 2.4527, `000000591_lnorm` = 1.52415, `000000592_lnorm` = 1.99609, `000000593_lnorm` = 1.6286, `000000594_lnorm` = 1.97753, -`000000595_lnorm` = 1.37223, `000000596_lnorm` = 1.07542, `000000597_lnorm` = 0.854062, `000000598_lnorm` = 1.53575, `000000599_lnorm` = 1.44919, `000000600_lnorm` = 2.04786, `000000601_lnorm` = 2.24642, `000000602_lnorm` = 2.61384, `000000603_lnorm` = 1.65475, `000000604_lnorm` = 2.95767, `000000605_lnorm` = 4.66151, `000000606_lnorm` = 2.22262, `000000607_lnorm` = 2.01575, `000000608_lnorm` = 1.48518, `000000609_lnorm` = 0.862168, `000000610_lnorm` = 1.29858, `000000611_lnorm` = 3.1189, `000000612_lnorm` = 1.72008, -`000000613_lnorm` = 1.09522, `000000614_lnorm` = 1.65268, `000000615_lnorm` = 2.7714, `000000616_lnorm` = 1.2399, `000000617_lnorm` = 1.39014, `000000618_lnorm` = 1.43025, `000000619_lnorm` = 1.06787, `000000620_lnorm` = 1.22254, `000000621_lnorm` = 1.72324, `000000622_lnorm` = 1.71684, `000000623_lnorm` = 2.70181, `000000624_lnorm` = 1.51177, `000000625_lnorm` = 1.25051, `000000626_lnorm` = 1.35754, `000000627_lnorm` = 0.978439, `000000628_lnorm` = 2.75994, `000000629_lnorm` = 2.95655, `000000630_lnorm` = 1.64154, -`000000631_lnorm` = 2.44982, `000000632_lnorm` = 1.65048, `000000633_lnorm` = 1.77068, `000000634_lnorm` = 2.26648, `000000635_lnorm` = 2.08989, `000000636_lnorm` = 2.02099, `000000637_lnorm` = 1.06717, `000000638_lnorm` = 1.11346, `000000639_lnorm` = 1.41083, `000000640_lnorm` = 1.73914, `000000641_lnorm` = 1.44619, `000000642_lnorm` = 2.17064, `000000643_lnorm` = 1.81502, `000000644_lnorm` = 1.74061, `000000645_lnorm` = 1.35166, `000000646_lnorm` = 1.15518, `000000647_lnorm` = 1.87199, `000000648_lnorm` = 2.62931, -`000000649_lnorm` = 2.31078, `000000650_lnorm` = 2.68424, `000000651_lnorm` = 1.75981, `000000652_lnorm` = 1.60339, `000000653_lnorm` = 3.59301, `000000654_lnorm` = 1.10603, `000000655_lnorm` = 2.32442, `000000656_lnorm` = 1.77175, `000000657_lnorm` = 2.20971, `000000658_lnorm` = 1.9106, `000000659_lnorm` = 2.25715, `000000660_lnorm` = 2.06905, `000000661_lnorm` = 2.30818, `000000662_lnorm` = 2.07574, `000000663_lnorm` = 1.77408, `000000664_lnorm` = 2.43579, `000000665_lnorm` = 2.12829, `000000666_lnorm` = 2.20592, -`000000667_lnorm` = 1.17683, `000000668_lnorm` = 1.66624, `000000669_lnorm` = 1.35764, `000000670_lnorm` = 1.78977, `000000671_lnorm` = 1.13356, `000000672_lnorm` = 2.743, `000000673_lnorm` = 1.34269, `000000674_lnorm` = 0.835483, `000000675_lnorm` = 1.51503, `000000676_lnorm` = 1.99193, `000000677_lnorm` = 2.28651, `000000678_lnorm` = 1.16106, `000000679_lnorm` = 2.5245, `000000680_lnorm` = 3.11832, `000000681_lnorm` = 1.94279, `000000682_lnorm` = 2.47932, `000000683_lnorm` = 1.13269, `000000684_lnorm` = 1.69414, -`000000685_lnorm` = 2.28826, `000000686_lnorm` = 1.90979, `000000687_lnorm` = 2.65157, `000000688_lnorm` = 1.41765, `000000689_lnorm` = 2.99469, `000000690_lnorm` = 1.32353, `000000691_lnorm` = 1.45726, `000000692_lnorm` = 1.9734, `000000693_lnorm` = 1.7671, `000000694_lnorm` = 0.908387, `000000695_lnorm` = 2.0966, `000000696_lnorm` = 0.965909, `000000697_lnorm` = 1.44358, `000000698_lnorm` = 2.20382, `000000699_lnorm` = 2.45004, `000000700_lnorm` = 2.90881, `000000701_lnorm` = 1.06315, `000000702_lnorm` = 1.52948, -`000000703_lnorm` = 1.37854, `000000704_lnorm` = 2.45675, `000000705_lnorm` = 1.62565, `000000706_lnorm` = 1.45387, `000000707_lnorm` = 1.79233, `000000708_lnorm` = 1.45578, `000000709_lnorm` = 3.58953, `000000710_lnorm` = 2.75588, `000000711_lnorm` = 2.18121, `000000712_lnorm` = 1.96544, `000000713_lnorm` = 1.42123, `000000714_lnorm` = 1.88976, `000000715_lnorm` = 2.03469, `000000716_lnorm` = 1.83556, `000000717_lnorm` = 1.14725, `000000718_lnorm` = 2.15482, `000000719_lnorm` = 2.8368, `000000720_lnorm` = 1.35482, -`000000721_lnorm` = 1.31997, `000000722_lnorm` = 1.58891, `000000723_lnorm` = 4.39375, `000000724_lnorm` = 1.29783, `000000725_lnorm` = 2.57891, `000000726_lnorm` = 1.25922, `000000727_lnorm` = 1.23203, `000000728_lnorm` = 1.46578, `000000729_lnorm` = 1.29022, `000000730_lnorm` = 2.60901, `000000731_lnorm` = 1.98286, `000000732_lnorm` = 2.0439, `000000733_lnorm` = 2.82228, `000000734_lnorm` = 1.37751, `000000735_lnorm` = 2.45163, `000000736_lnorm` = 1.21816, `000000737_lnorm` = 1.15335, `000000738_lnorm` = 1.78975, -`000000739_lnorm` = 1.53569, `000000740_lnorm` = 2.21331, `000000741_lnorm` = 1.98769, `000000742_lnorm` = 1.87514, `000000743_lnorm` = 1.04263, `000000744_lnorm` = 1.86318, `000000745_lnorm` = 2.22433, `000000746_lnorm` = 2.00088, `000000747_lnorm` = 2.68541, `000000748_lnorm` = 3.36272, `000000749_lnorm` = 1.84895, `000000750_lnorm` = 1.67284, `000000751_lnorm` = 1.82971, `000000752_lnorm` = 0.966564, `000000753_lnorm` = 2.94891, `000000754_lnorm` = 2.02551, `000000755_lnorm` = 2.14384, `000000756_lnorm` = 1.6156, -`000000757_lnorm` = 1.3463, `000000758_lnorm` = 2.46316, `000000759_lnorm` = 1.82355, `000000760_lnorm` = 2.20365, `000000761_lnorm` = 1.81595, `000000762_lnorm` = 1.39895, `000000763_lnorm` = 1.11402, `000000764_lnorm` = 1.0403, `000000765_lnorm` = 3.46626, `000000766_lnorm` = 0.612317, `000000767_lnorm` = 2.21868, `000000768_lnorm` = 1.02169, `000000769_lnorm` = 1.85731, `000000770_lnorm` = 1.3162, `000000771_lnorm` = 1.3084, `000000772_lnorm` = 1.03984, `000000773_lnorm` = 2.21969, `000000774_lnorm` = 1.40523, -`000000775_lnorm` = 1.63671, `000000776_lnorm` = 2.35502, `000000777_lnorm` = 2.13487, `000000778_lnorm` = 1.59329, `000000779_lnorm` = 2.27574, `000000780_lnorm` = 0.656166, `000000781_lnorm` = 1.9215, `000000782_lnorm` = 1.50653, `000000783_lnorm` = 1.52454, `000000784_lnorm` = 1.40982, `000000785_lnorm` = 1.89923, `000000786_lnorm` = 3.55173, `000000787_lnorm` = 1.0151, `000000788_lnorm` = 1.73649, `000000789_lnorm` = 2.21852, `000000790_lnorm` = 1.67646, `000000791_lnorm` = 2.53567, `000000792_lnorm` = 1.78863, -`000000793_lnorm` = 1.38939, `000000794_lnorm` = 1.73823, `000000795_lnorm` = 1.93236, `000000796_lnorm` = 2.27247, `000000797_lnorm` = 1.9506, `000000798_lnorm` = 2.79071, `000000799_lnorm` = 1.85945, `000000800_lnorm` = 1.697, `000000801_lnorm` = 1.20041, `000000802_lnorm` = 2.30994, `000000803_lnorm` = 2.28004, `000000804_lnorm` = 2.12277, `000000805_lnorm` = 1.40852, `000000806_lnorm` = 2.70247, `000000807_lnorm` = 0.952191, `000000808_lnorm` = 1.76159, `000000809_lnorm` = 1.55078, `000000810_lnorm` = 1.46163, -`000000811_lnorm` = 2.11149, `000000812_lnorm` = 1.11352, `000000813_lnorm` = 2.7389, `000000814_lnorm` = 1.51083, `000000815_lnorm` = 1.2664, `000000816_lnorm` = 1.60513, `000000817_lnorm` = 1.05833, `000000818_lnorm` = 1.68812, `000000819_lnorm` = 2.66027, `000000820_lnorm` = 1.65418, `000000821_lnorm` = 1.08778, `000000822_lnorm` = 1.33578, `000000823_lnorm` = 1.09943, `000000824_lnorm` = 1.50982, `000000825_lnorm` = 1.619, `000000826_lnorm` = 2.30469, `000000827_lnorm` = 0.855125, `000000828_lnorm` = 2.42884, -`000000829_lnorm` = 1.38089, `000000830_lnorm` = 4.4522, `000000831_lnorm` = 1.66964, `000000832_lnorm` = 1.85568, `000000833_lnorm` = 1.08886, `000000834_lnorm` = 0.921413, `000000835_lnorm` = 1.46622, `000000836_lnorm` = 2.73844, `000000837_lnorm` = 1.58314, `000000838_lnorm` = 1.38034, `000000839_lnorm` = 4.41954, `000000840_lnorm` = 0.943256, `000000841_lnorm` = 2.27984, `000000842_lnorm` = 0.912846, `000000843_lnorm` = 3.55196, `000000844_lnorm` = 1.1334, `000000845_lnorm` = 1.32162, `000000846_lnorm` = 1.15393, -`000000847_lnorm` = 1.98562, `000000848_lnorm` = 2.20511, `000000849_lnorm` = 1.54514, `000000850_lnorm` = 2.42929, `000000851_lnorm` = 4.14374, `000000852_lnorm` = 1.43422, `000000853_lnorm` = 1.86874, `000000854_lnorm` = 2.12603, `000000855_lnorm` = 1.61319, `000000856_lnorm` = 2.90886, `000000857_lnorm` = 1.78374, `000000858_lnorm` = 2.71821, `000000859_lnorm` = 2.36495, `000000860_lnorm` = 1.34749, `000000861_lnorm` = 2.34658, `000000862_lnorm` = 1.52777, `000000863_lnorm` = 0.600718, `000000864_lnorm` = 1.09026, -`000000865_lnorm` = 2.03663, `000000866_lnorm` = 1.49139, `000000867_lnorm` = 1.12194, `000000868_lnorm` = 1.07614, `000000869_lnorm` = 1.8528, `000000870_lnorm` = 2.95831, `000000871_lnorm` = 2.98388, `000000872_lnorm` = 2.99172, `000000873_lnorm` = 2.63005, `000000874_lnorm` = 2.71377, `000000875_lnorm` = 2.88341, `000000876_lnorm` = 1.53379, `000000877_lnorm` = 1.38716, `000000878_lnorm` = 1.82626, `000000879_lnorm` = 2.14879, `000000880_lnorm` = 1.45224, `000000881_lnorm` = 2.03255, `000000882_lnorm` = 1.23025, -`000000883_lnorm` = 4.04123, `000000884_lnorm` = 1.87984, `000000885_lnorm` = 0.920501, `000000886_lnorm` = 1.39447, `000000887_lnorm` = 2.25379, `000000888_lnorm` = 1.17532, `000000889_lnorm` = 1.54539, `000000890_lnorm` = 1.16774, `000000891_lnorm` = 1.62573, `000000892_lnorm` = 0.973674, `000000893_lnorm` = 1.10345, `000000894_lnorm` = 1.55087, `000000895_lnorm` = 1.43027, `000000896_lnorm` = 0.962508, `000000897_lnorm` = 2.10172, `000000898_lnorm` = 1.45381, `000000899_lnorm` = 2.50912, `000000900_lnorm` = 0.829115, -`000000901_lnorm` = 1.49204, `000000902_lnorm` = 1.97533, `000000903_lnorm` = 1.08147, `000000904_lnorm` = 1.12325, `000000905_lnorm` = 1.646, `000000906_lnorm` = 0.996106, `000000907_lnorm` = 3.10322, `000000908_lnorm` = 1.11549, `000000909_lnorm` = 1.86724, `000000910_lnorm` = 1.93593, `000000911_lnorm` = 0.86112, `000000912_lnorm` = 2.97445, `000000913_lnorm` = 2.62286, `000000914_lnorm` = 3.12933, `000000915_lnorm` = 1.27296, `000000916_lnorm` = 1.42102, `000000917_lnorm` = 1.6307, `000000918_lnorm` = 3.45913, -`000000919_lnorm` = 2.76522, `000000920_lnorm` = 0.692321, `000000921_lnorm` = 1.22273, `000000922_lnorm` = 1.62976, `000000923_lnorm` = 1.63548, `000000924_lnorm` = 1.49555, `000000925_lnorm` = 2.0772, `000000926_lnorm` = 2.28571, `000000927_lnorm` = 2.10495, `000000928_lnorm` = 0.715006, `000000929_lnorm` = 1.32799, `000000930_lnorm` = 2.34716, `000000931_lnorm` = 1.48491, `000000932_lnorm` = 1.79497, `000000933_lnorm` = 2.20081, `000000934_lnorm` = 1.68292, `000000935_lnorm` = 3.47905, `000000936_lnorm` = 2.10751, -`000000937_lnorm` = 2.46339, `000000938_lnorm` = 2.88347, `000000939_lnorm` = 1.03523, `000000940_lnorm` = 1.82538, `000000941_lnorm` = 1.64746, `000000942_lnorm` = 1.83653, `000000943_lnorm` = 2.17435, `000000944_lnorm` = 2.34556, `000000945_lnorm` = 1.35487, `000000946_lnorm` = 2.66805, `000000947_lnorm` = 1.3845, `000000948_lnorm` = 0.992331, `000000949_lnorm` = 1.2798, `000000950_lnorm` = 2.11437, `000000951_lnorm` = 1.54769, `000000952_lnorm` = 1.28011, `000000953_lnorm` = 1.13938, `000000954_lnorm` = 2.31567, -`000000955_lnorm` = 1.23917, `000000956_lnorm` = 1.09096, `000000957_lnorm` = 1.80177, `000000958_lnorm` = 1.40609, `000000959_lnorm` = 2.03731, `000000960_lnorm` = 1.96243, `000000961_lnorm` = 1.47829, `000000962_lnorm` = 1.54191, `000000963_lnorm` = 1.50901, `000000964_lnorm` = 1.58542, `000000965_lnorm` = 1.30164, `000000966_lnorm` = 1.54642, `000000967_lnorm` = 0.985906, `000000968_lnorm` = 1.74622, `000000969_lnorm` = 2.40104, `000000970_lnorm` = 1.47237, `000000971_lnorm` = 1.01637, `000000972_lnorm` = 2.01739, -`000000973_lnorm` = 1.27309, `000000974_lnorm` = 1.34581, `000000975_lnorm` = 1.66014, `000000976_lnorm` = 1.64592, `000000977_lnorm` = 1.23841, `000000978_lnorm` = 1.86099, `000000979_lnorm` = 1.95426, `000000980_lnorm` = 0.994339, `000000981_lnorm` = 1.2769, `000000982_lnorm` = 1.25549, `000000983_lnorm` = 1.55396, `000000984_lnorm` = 1.32035, `000000985_lnorm` = 1.27725, `000000986_lnorm` = 2.93347, `000000987_lnorm` = 2.10903, `000000988_lnorm` = 1.23574, `000000989_lnorm` = 2.31355, `000000990_lnorm` = 2.02261, -`000000991_lnorm` = 1.98182, `000000992_lnorm` = 1.36425, `000000993_lnorm` = 1.3906, `000000994_lnorm` = 2.13309, `000000995_lnorm` = 1.17508, `000000996_lnorm` = 2.05745, `000000997_lnorm` = 2.25295, `000000998_lnorm` = 2.0945, `000000999_lnorm` = 1.28197, `000001000_lnorm` = 0.917713)" +average,0.05,1.68117,0.682856,1.11342,2.76012,1,parametric,1000,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344, `000000004_lnorm` = 1.434, `000000005_lnorm` = 1.81625, `000000006_lnorm` = 2.64477, `000000007_lnorm` = 1.9797, `000000008_lnorm` = 1.40648, `000000009_lnorm` = 1.75896, `000000010_lnorm` = 2.52819, `000000011_lnorm` = 1.75286, `000000012_lnorm` = 2.64467, `000000013_lnorm` = 1.89607, `000000014_lnorm` = 1.42891, `000000015_lnorm` = 2.04596, `000000016_lnorm` = 1.076, `000000017_lnorm` = 1.82926, `000000018_lnorm` = 1.77754, +`000000019_lnorm` = 1.81362, `000000020_lnorm` = 1.56522, `000000021_lnorm` = 1.31328, `000000022_lnorm` = 2.34267, `000000023_lnorm` = 1.95807, `000000024_lnorm` = 0.979763, `000000025_lnorm` = 1.90104, `000000026_lnorm` = 1.31927, `000000027_lnorm` = 1.22681, `000000028_lnorm` = 1.36297, `000000029_lnorm` = 2.03217, `000000030_lnorm` = 1.48939, `000000031_lnorm` = 2.32383, `000000032_lnorm` = 2.76469, `000000033_lnorm` = 2.12493, `000000034_lnorm` = 1.16584, `000000035_lnorm` = 2.24326, `000000036_lnorm` = 1.85553, +`000000037_lnorm` = 2.58016, `000000038_lnorm` = 2.13527, `000000039_lnorm` = 1.12606, `000000040_lnorm` = 1.92818, `000000041_lnorm` = 2.02068, `000000042_lnorm` = 1.98607, `000000043_lnorm` = 2.96207, `000000044_lnorm` = 1.00953, `000000045_lnorm` = 0.524815, `000000046_lnorm` = 2.7306, `000000047_lnorm` = 1.49194, `000000048_lnorm` = 1.52999, `000000049_lnorm` = 1.91416, `000000050_lnorm` = 0.919342, `000000051_lnorm` = 0.984983, `000000052_lnorm` = 1.63899, `000000053_lnorm` = 1.26687, `000000054_lnorm` = 1.31936, +`000000055_lnorm` = 1.15461, `000000056_lnorm` = 1.35223, `000000057_lnorm` = 2.41231, `000000058_lnorm` = 0.732407, `000000059_lnorm` = 1.9412, `000000060_lnorm` = 1.82985, `000000061_lnorm` = 1.80799, `000000062_lnorm` = 1.09987, `000000063_lnorm` = 1.46472, `000000064_lnorm` = 1.07241, `000000065_lnorm` = 1.27812, `000000066_lnorm` = 1.83395, `000000067_lnorm` = 1.30446, `000000068_lnorm` = 1.2981, `000000069_lnorm` = 1.20418, `000000070_lnorm` = 2.83823, `000000071_lnorm` = 1.18793, `000000072_lnorm` = 2.01091, +`000000073_lnorm` = 1.79121, `000000074_lnorm` = 1.15301, `000000075_lnorm` = 1.91059, `000000076_lnorm` = 1.57129, `000000077_lnorm` = 2.16167, `000000078_lnorm` = 1.9946, `000000079_lnorm` = 2.74488, `000000080_lnorm` = 2.45766, `000000081_lnorm` = 1.38901, `000000082_lnorm` = 1.77219, `000000083_lnorm` = 2.34755, `000000084_lnorm` = 1.99894, `000000085_lnorm` = 1.53281, `000000086_lnorm` = 2.63432, `000000087_lnorm` = 1.70809, `000000088_lnorm` = 1.86773, `000000089_lnorm` = 1.98204, `000000090_lnorm` = 2.62623, +`000000091_lnorm` = 2.31919, `000000092_lnorm` = 1.75354, `000000093_lnorm` = 1.59699, `000000094_lnorm` = 1.73771, `000000095_lnorm` = 2.15879, `000000096_lnorm` = 2.76178, `000000097_lnorm` = 1.34876, `000000098_lnorm` = 1.48579, `000000099_lnorm` = 2.35546, `000000100_lnorm` = 1.28161, `000000101_lnorm` = 1.40289, `000000102_lnorm` = 3.68421, `000000103_lnorm` = 2.36213, `000000104_lnorm` = 2.0522, `000000105_lnorm` = 1.14376, `000000106_lnorm` = 1.78657, `000000107_lnorm` = 1.74016, `000000108_lnorm` = 1.32566, +`000000109_lnorm` = 3.36174, `000000110_lnorm` = 1.49743, `000000111_lnorm` = 1.46767, `000000112_lnorm` = 1.47672, `000000113_lnorm` = 1.68099, `000000114_lnorm` = 2.33906, `000000115_lnorm` = 1.43903, `000000116_lnorm` = 0.709154, `000000117_lnorm` = 0.770378, `000000118_lnorm` = 2.2042, `000000119_lnorm` = 3.44236, `000000120_lnorm` = 1.3995, `000000121_lnorm` = 1.18715, `000000122_lnorm` = 1.64168, `000000123_lnorm` = 2.15108, `000000124_lnorm` = 2.45261, `000000125_lnorm` = 2.14768, `000000126_lnorm` = 2.24817, +`000000127_lnorm` = 2.55814, `000000128_lnorm` = 2.03521, `000000129_lnorm` = 2.90726, `000000130_lnorm` = 1.4112, `000000131_lnorm` = 2.47096, `000000132_lnorm` = 1.22084, `000000133_lnorm` = 2.69526, `000000134_lnorm` = 1.97344, `000000135_lnorm` = 1.71554, `000000136_lnorm` = 1.72117, `000000137_lnorm` = 4.51797, `000000138_lnorm` = 2.22872, `000000139_lnorm` = 3.48639, `000000140_lnorm` = 1.5389, `000000141_lnorm` = 2.00422, `000000142_lnorm` = 2.33338, `000000143_lnorm` = 1.37927, `000000144_lnorm` = 2.16221, +`000000145_lnorm` = 2.53269, `000000146_lnorm` = 1.38425, `000000147_lnorm` = 2.00788, `000000148_lnorm` = 1.31033, `000000149_lnorm` = 2.37918, `000000150_lnorm` = 0.949034, `000000151_lnorm` = 2.28725, `000000152_lnorm` = 1.29019, `000000153_lnorm` = 2.63461, `000000154_lnorm` = 1.64242, `000000155_lnorm` = 1.66381, `000000156_lnorm` = 1.61202, `000000157_lnorm` = 1.97332, `000000158_lnorm` = 1.39119, `000000159_lnorm` = 1.97515, `000000160_lnorm` = 2.93092, `000000161_lnorm` = 1.92314, `000000162_lnorm` = 1.31012, +`000000163_lnorm` = 1.77709, `000000164_lnorm` = 2.2523, `000000165_lnorm` = 1.61185, `000000166_lnorm` = 2.71488, `000000167_lnorm` = 1.53472, `000000168_lnorm` = 1.21652, `000000169_lnorm` = 2.29438, `000000170_lnorm` = 2.67321, `000000171_lnorm` = 1.12951, `000000172_lnorm` = 1.84354, `000000173_lnorm` = 4.08301, `000000174_lnorm` = 1.49518, `000000175_lnorm` = 1.34551, `000000176_lnorm` = 1.70373, `000000177_lnorm` = 1.6595, `000000178_lnorm` = 1.575, `000000179_lnorm` = 2.15906, `000000180_lnorm` = 1.7929, +`000000181_lnorm` = 1.96763, `000000182_lnorm` = 1.57101, `000000183_lnorm` = 2.83637, `000000184_lnorm` = 2.97611, `000000185_lnorm` = 1.1848, `000000186_lnorm` = 2.06271, `000000187_lnorm` = 1.76131, `000000188_lnorm` = 2.49662, `000000189_lnorm` = 0.683873, `000000190_lnorm` = 2.78282, `000000191_lnorm` = 0.923406, `000000192_lnorm` = 2.02137, `000000193_lnorm` = 2.34054, `000000194_lnorm` = 2.4864, `000000195_lnorm` = 1.8245, `000000196_lnorm` = 1.92975, `000000197_lnorm` = 2.12464, `000000198_lnorm` = 2.41836, +`000000199_lnorm` = 2.27514, `000000200_lnorm` = 1.68233, `000000201_lnorm` = 0.95175, `000000202_lnorm` = 1.79286, `000000203_lnorm` = 1.0225, `000000204_lnorm` = 3.65623, `000000205_lnorm` = 1.58279, `000000206_lnorm` = 2.56041, `000000207_lnorm` = 1.63661, `000000208_lnorm` = 2.37805, `000000209_lnorm` = 1.81253, `000000210_lnorm` = 1.19601, `000000211_lnorm` = 2.11508, `000000212_lnorm` = 1.5009, `000000213_lnorm` = 1.9014, `000000214_lnorm` = 1.18229, `000000215_lnorm` = 3.0938, `000000216_lnorm` = 1.52568, +`000000217_lnorm` = 1.5591, `000000218_lnorm` = 1.111, `000000219_lnorm` = 1.61811, `000000220_lnorm` = 1.40567, `000000221_lnorm` = 1.92318, `000000222_lnorm` = 2.01052, `000000223_lnorm` = 1.41332, `000000224_lnorm` = 2.93397, `000000225_lnorm` = 1.4652, `000000226_lnorm` = 1.30126, `000000227_lnorm` = 2.30988, `000000228_lnorm` = 1.19668, `000000229_lnorm` = 1.13458, `000000230_lnorm` = 2.25383, `000000231_lnorm` = 1.72354, `000000232_lnorm` = 2.94255, `000000233_lnorm` = 2.01322, `000000234_lnorm` = 2.41204, +`000000235_lnorm` = 2.23295, `000000236_lnorm` = 2.58725, `000000237_lnorm` = 1.81906, `000000238_lnorm` = 1.30274, `000000239_lnorm` = 2.29129, `000000240_lnorm` = 1.07857, `000000241_lnorm` = 1.00845, `000000242_lnorm` = 2.1734, `000000243_lnorm` = 2.80348, `000000244_lnorm` = 1.09174, `000000245_lnorm` = 1.57453, `000000246_lnorm` = 1.53233, `000000247_lnorm` = 1.13467, `000000248_lnorm` = 1.57223, `000000249_lnorm` = 1.3564, `000000250_lnorm` = 1.57845, `000000251_lnorm` = 3.4036, `000000252_lnorm` = 2.15519, +`000000253_lnorm` = 0.957093, `000000254_lnorm` = 1.71972, `000000255_lnorm` = 1.246, `000000256_lnorm` = 1.64064, `000000257_lnorm` = 1.85753, `000000258_lnorm` = 2.32516, `000000259_lnorm` = 1.53653, `000000260_lnorm` = 4.93481, `000000261_lnorm` = 2.92565, `000000262_lnorm` = 1.80186, `000000263_lnorm` = 1.30003, `000000264_lnorm` = 3.32539, `000000265_lnorm` = 1.0091, `000000266_lnorm` = 1.3714, `000000267_lnorm` = 1.49066, `000000268_lnorm` = 1.1618, `000000269_lnorm` = 2.1701, `000000270_lnorm` = 1.93628, +`000000271_lnorm` = 1.93382, `000000272_lnorm` = 1.56229, `000000273_lnorm` = 1.934, `000000274_lnorm` = 1.48944, `000000275_lnorm` = 1.56079, `000000276_lnorm` = 2.76426, `000000277_lnorm` = 1.41112, `000000278_lnorm` = 3.02989, `000000279_lnorm` = 1.20218, `000000280_lnorm` = 1.1792, `000000281_lnorm` = 3.31633, `000000282_lnorm` = 2.2934, `000000283_lnorm` = 1.75066, `000000284_lnorm` = 2.23802, `000000285_lnorm` = 1.73284, `000000286_lnorm` = 2.27552, `000000287_lnorm` = 1.06919, `000000288_lnorm` = 2.22348, +`000000289_lnorm` = 1.43162, `000000290_lnorm` = 2.38861, `000000291_lnorm` = 1.9776, `000000292_lnorm` = 1.75614, `000000293_lnorm` = 1.51279, `000000294_lnorm` = 4.17683, `000000295_lnorm` = 1.10022, `000000296_lnorm` = 3.42715, `000000297_lnorm` = 1.28568, `000000298_lnorm` = 1.91588, `000000299_lnorm` = 1.14508, `000000300_lnorm` = 1.36317, `000000301_lnorm` = 1.23333, `000000302_lnorm` = 1.07114, `000000303_lnorm` = 1.85, `000000304_lnorm` = 2.22284, `000000305_lnorm` = 1.22098, `000000306_lnorm` = 0.769896, +`000000307_lnorm` = 2.26782, `000000308_lnorm` = 2.76717, `000000309_lnorm` = 2.80311, `000000310_lnorm` = 1.79249, `000000311_lnorm` = 1.50201, `000000312_lnorm` = 2.33447, `000000313_lnorm` = 1.51844, `000000314_lnorm` = 1.4948, `000000315_lnorm` = 2.28877, `000000316_lnorm` = 2.50457, `000000317_lnorm` = 1.49333, `000000318_lnorm` = 1.2303, `000000319_lnorm` = 2.97666, `000000320_lnorm` = 2.11935, `000000321_lnorm` = 1.49001, `000000322_lnorm` = 1.68884, `000000323_lnorm` = 1.43209, `000000324_lnorm` = 1.93248, +`000000325_lnorm` = 1.48784, `000000326_lnorm` = 2.98808, `000000327_lnorm` = 2.30993, `000000328_lnorm` = 2.99876, `000000329_lnorm` = 1.74099, `000000330_lnorm` = 1.88756, `000000331_lnorm` = 2.04143, `000000332_lnorm` = 1.25144, `000000333_lnorm` = 1.57906, `000000334_lnorm` = 1.00787, `000000335_lnorm` = 1.2126, `000000336_lnorm` = 1.9552, `000000337_lnorm` = 2.82747, `000000338_lnorm` = 1.90187, `000000339_lnorm` = 1.42327, `000000340_lnorm` = 1.43655, `000000341_lnorm` = 1.09694, `000000342_lnorm` = 1.33248, +`000000343_lnorm` = 1.19027, `000000344_lnorm` = 1.97183, `000000345_lnorm` = 1.77387, `000000346_lnorm` = 1.07524, `000000347_lnorm` = 2.13797, `000000348_lnorm` = 2.16009, `000000349_lnorm` = 2.22319, `000000350_lnorm` = 2.71378, `000000351_lnorm` = 1.83287, `000000352_lnorm` = 2.48058, `000000353_lnorm` = 1.04259, `000000354_lnorm` = 1.55658, `000000355_lnorm` = 2.4289, `000000356_lnorm` = 3.13694, `000000357_lnorm` = 1.00273, `000000358_lnorm` = 1.32141, `000000359_lnorm` = 1.9265, `000000360_lnorm` = 1.34318, +`000000361_lnorm` = 1.42568, `000000362_lnorm` = 1.01439, `000000363_lnorm` = 1.49848, `000000364_lnorm` = 2.22676, `000000365_lnorm` = 1.62128, `000000366_lnorm` = 2.04695, `000000367_lnorm` = 1.18601, `000000368_lnorm` = 1.20376, `000000369_lnorm` = 1.2206, `000000370_lnorm` = 1.90946, `000000371_lnorm` = 1.13542, `000000372_lnorm` = 1.6593, `000000373_lnorm` = 1.46797, `000000374_lnorm` = 1.57447, `000000375_lnorm` = 1.85693, `000000376_lnorm` = 1.4851, `000000377_lnorm` = 1.42377, `000000378_lnorm` = 1.59597, +`000000379_lnorm` = 1.93396, `000000380_lnorm` = 1.23379, `000000381_lnorm` = 1.44014, `000000382_lnorm` = 1.83959, `000000383_lnorm` = 2.01984, `000000384_lnorm` = 1.50021, `000000385_lnorm` = 2.15706, `000000386_lnorm` = 2.04668, `000000387_lnorm` = 1.55483, `000000388_lnorm` = 2.37654, `000000389_lnorm` = 3.94267, `000000390_lnorm` = 2.21834, `000000391_lnorm` = 1.81093, `000000392_lnorm` = 4.19887, `000000393_lnorm` = 0.918212, `000000394_lnorm` = 1.45406, `000000395_lnorm` = 1.53526, `000000396_lnorm` = 2.26637, +`000000397_lnorm` = 2.57149, `000000398_lnorm` = 2.40347, `000000399_lnorm` = 1.73039, `000000400_lnorm` = 2.93577, `000000401_lnorm` = 2.69576, `000000402_lnorm` = 1.7978, `000000403_lnorm` = 1.82191, `000000404_lnorm` = 0.916132, `000000405_lnorm` = 0.894586, `000000406_lnorm` = 3.75364, `000000407_lnorm` = 1.03696, `000000408_lnorm` = 2.90402, `000000409_lnorm` = 1.64099, `000000410_lnorm` = 0.919569, `000000411_lnorm` = 2.21855, `000000412_lnorm` = 1.69848, `000000413_lnorm` = 1.73159, `000000414_lnorm` = 1.10058, +`000000415_lnorm` = 1.11313, `000000416_lnorm` = 1.2718, `000000417_lnorm` = 1.30444, `000000418_lnorm` = 2.21172, `000000419_lnorm` = 2.60012, `000000420_lnorm` = 2.44744, `000000421_lnorm` = 1.0187, `000000422_lnorm` = 2.21125, `000000423_lnorm` = 2.16267, `000000424_lnorm` = 1.94559, `000000425_lnorm` = 2.48945, `000000426_lnorm` = 1.13375, `000000427_lnorm` = 1.87002, `000000428_lnorm` = 2.00033, `000000429_lnorm` = 0.873976, `000000430_lnorm` = 0.832154, `000000431_lnorm` = 3.1563, `000000432_lnorm` = 1.42627, +`000000433_lnorm` = 1.64134, `000000434_lnorm` = 1.30208, `000000435_lnorm` = 1.56605, `000000436_lnorm` = 2.81942, `000000437_lnorm` = 2.1007, `000000438_lnorm` = 2.0308, `000000439_lnorm` = 1.14681, `000000440_lnorm` = 1.60425, `000000441_lnorm` = 1.94172, `000000442_lnorm` = 2.32118, `000000443_lnorm` = 1.3211, `000000444_lnorm` = 1.42303, `000000445_lnorm` = 2.13881, `000000446_lnorm` = 1.4268, `000000447_lnorm` = 2.18789, `000000448_lnorm` = 2.17622, `000000449_lnorm` = 3.41329, `000000450_lnorm` = 3.35896, +`000000451_lnorm` = 2.77879, `000000452_lnorm` = 1.8923, `000000453_lnorm` = 1.41733, `000000454_lnorm` = 1.33789, `000000455_lnorm` = 2.0997, `000000456_lnorm` = 1.26299, `000000457_lnorm` = 1.35083, `000000458_lnorm` = 1.44983, `000000459_lnorm` = 2.76589, `000000460_lnorm` = 1.53337, `000000461_lnorm` = 1.59673, `000000462_lnorm` = 2.08783, `000000463_lnorm` = 1.56069, `000000464_lnorm` = 1.12092, `000000465_lnorm` = 2.0189, `000000466_lnorm` = 2.2192, `000000467_lnorm` = 1.34221, `000000468_lnorm` = 2.11337, +`000000469_lnorm` = 2.22503, `000000470_lnorm` = 1.77325, `000000471_lnorm` = 1.74596, `000000472_lnorm` = 2.90492, `000000473_lnorm` = 0.953169, `000000474_lnorm` = 2.73462, `000000475_lnorm` = 2.16016, `000000476_lnorm` = 1.35835, `000000477_lnorm` = 1.27943, `000000478_lnorm` = 2.12858, `000000479_lnorm` = 1.28948, `000000480_lnorm` = 1.08294, `000000481_lnorm` = 1.88055, `000000482_lnorm` = 1.52331, `000000483_lnorm` = 2.08919, `000000484_lnorm` = 1.59584, `000000485_lnorm` = 1.52771, `000000486_lnorm` = 1.34335, +`000000487_lnorm` = 2.77588, `000000488_lnorm` = 1.26331, `000000489_lnorm` = 0.736362, `000000490_lnorm` = 2.87051, `000000491_lnorm` = 1.69302, `000000492_lnorm` = 1.11636, `000000493_lnorm` = 4.20855, `000000494_lnorm` = 1.93802, `000000495_lnorm` = 1.78429, `000000496_lnorm` = 2.07513, `000000497_lnorm` = 2.9275, `000000498_lnorm` = 1.59997, `000000499_lnorm` = 4.43423, `000000500_lnorm` = 3.1396, `000000501_lnorm` = 4.19754, `000000502_lnorm` = 1.43101, `000000503_lnorm` = 1.24887, `000000504_lnorm` = 1.33372, +`000000505_lnorm` = 3.32688, `000000506_lnorm` = 1.43877, `000000507_lnorm` = 2.73052, `000000508_lnorm` = 1.77473, `000000509_lnorm` = 3.87704, `000000510_lnorm` = 1.47882, `000000511_lnorm` = 1.62539, `000000512_lnorm` = 2.10461, `000000513_lnorm` = 1.69433, `000000514_lnorm` = 2.70887, `000000515_lnorm` = 2.54778, `000000516_lnorm` = 1.18788, `000000517_lnorm` = 0.947065, `000000518_lnorm` = 1.88539, `000000519_lnorm` = 1.71256, `000000520_lnorm` = 1.14461, `000000521_lnorm` = 1.27008, `000000522_lnorm` = 2.97766, +`000000523_lnorm` = 1.77179, `000000524_lnorm` = 2.46649, `000000525_lnorm` = 1.14346, `000000526_lnorm` = 1.89514, `000000527_lnorm` = 1.99545, `000000528_lnorm` = 1.14086, `000000529_lnorm` = 1.29784, `000000530_lnorm` = 1.25107, `000000531_lnorm` = 1.15474, `000000532_lnorm` = 1.24787, `000000533_lnorm` = 2.71133, `000000534_lnorm` = 1.79474, `000000535_lnorm` = 2.32162, `000000536_lnorm` = 3.3785, `000000537_lnorm` = 4.36059, `000000538_lnorm` = 2.60727, `000000539_lnorm` = 2.75091, `000000540_lnorm` = 1.5868, +`000000541_lnorm` = 1.1833, `000000542_lnorm` = 1.89416, `000000543_lnorm` = 2.7693, `000000544_lnorm` = 2.34744, `000000545_lnorm` = 2.2746, `000000546_lnorm` = 3.32722, `000000547_lnorm` = 1.95779, `000000548_lnorm` = 1.86548, `000000549_lnorm` = 0.480989, `000000550_lnorm` = 1.47263, `000000551_lnorm` = 1.47392, `000000552_lnorm` = 1.54194, `000000553_lnorm` = 2.22219, `000000554_lnorm` = 0.919689, `000000555_lnorm` = 1.39214, `000000556_lnorm` = 1.32837, `000000557_lnorm` = 2.04919, `000000558_lnorm` = 1.79051, +`000000559_lnorm` = 2.30908, `000000560_lnorm` = 0.631205, `000000561_lnorm` = 3.11303, `000000562_lnorm` = 2.4509, `000000563_lnorm` = 2.13419, `000000564_lnorm` = 2.32479, `000000565_lnorm` = 1.99135, `000000566_lnorm` = 1.94901, `000000567_lnorm` = 2.55599, `000000568_lnorm` = 1.05623, `000000569_lnorm` = 1.34003, `000000570_lnorm` = 1.3575, `000000571_lnorm` = 2.1116, `000000572_lnorm` = 1.63934, `000000573_lnorm` = 1.52701, `000000574_lnorm` = 1.45555, `000000575_lnorm` = 2.01982, `000000576_lnorm` = 2.75215, +`000000577_lnorm` = 0.977079, `000000578_lnorm` = 1.3253, `000000579_lnorm` = 2.14799, `000000580_lnorm` = 2.0086, `000000581_lnorm` = 1.60626, `000000582_lnorm` = 2.3921, `000000583_lnorm` = 2.40397, `000000584_lnorm` = 2.9732, `000000585_lnorm` = 2.70107, `000000586_lnorm` = 1.17736, `000000587_lnorm` = 1.5737, `000000588_lnorm` = 1.62547, `000000589_lnorm` = 1.91191, `000000590_lnorm` = 2.45269, `000000591_lnorm` = 1.52415, `000000592_lnorm` = 1.99608, `000000593_lnorm` = 1.6286, `000000594_lnorm` = 1.97753, +`000000595_lnorm` = 1.37223, `000000596_lnorm` = 1.07541, `000000597_lnorm` = 0.854059, `000000598_lnorm` = 1.53575, `000000599_lnorm` = 1.44919, `000000600_lnorm` = 2.04786, `000000601_lnorm` = 2.24641, `000000602_lnorm` = 2.61384, `000000603_lnorm` = 1.65474, `000000604_lnorm` = 2.95766, `000000605_lnorm` = 4.66151, `000000606_lnorm` = 2.22262, `000000607_lnorm` = 2.01574, `000000608_lnorm` = 1.48518, `000000609_lnorm` = 0.862165, `000000610_lnorm` = 1.29857, `000000611_lnorm` = 3.1189, `000000612_lnorm` = 1.72007, +`000000613_lnorm` = 1.09522, `000000614_lnorm` = 1.65267, `000000615_lnorm` = 2.7714, `000000616_lnorm` = 1.2399, `000000617_lnorm` = 1.39014, `000000618_lnorm` = 1.43025, `000000619_lnorm` = 1.06787, `000000620_lnorm` = 1.22254, `000000621_lnorm` = 1.72323, `000000622_lnorm` = 1.71684, `000000623_lnorm` = 2.70181, `000000624_lnorm` = 1.51176, `000000625_lnorm` = 1.2505, `000000626_lnorm` = 1.35754, `000000627_lnorm` = 0.978435, `000000628_lnorm` = 2.75994, `000000629_lnorm` = 2.95654, `000000630_lnorm` = 1.64154, +`000000631_lnorm` = 2.44981, `000000632_lnorm` = 1.65048, `000000633_lnorm` = 1.77068, `000000634_lnorm` = 2.26647, `000000635_lnorm` = 2.08989, `000000636_lnorm` = 2.02098, `000000637_lnorm` = 1.06716, `000000638_lnorm` = 1.11345, `000000639_lnorm` = 1.41083, `000000640_lnorm` = 1.73914, `000000641_lnorm` = 1.44619, `000000642_lnorm` = 2.17064, `000000643_lnorm` = 1.81502, `000000644_lnorm` = 1.74061, `000000645_lnorm` = 1.35165, `000000646_lnorm` = 1.15518, `000000647_lnorm` = 1.87199, `000000648_lnorm` = 2.62931, +`000000649_lnorm` = 2.31078, `000000650_lnorm` = 2.68424, `000000651_lnorm` = 1.7598, `000000652_lnorm` = 1.60339, `000000653_lnorm` = 3.59301, `000000654_lnorm` = 1.10603, `000000655_lnorm` = 2.32442, `000000656_lnorm` = 1.77175, `000000657_lnorm` = 2.20971, `000000658_lnorm` = 1.9106, `000000659_lnorm` = 2.25715, `000000660_lnorm` = 2.06905, `000000661_lnorm` = 2.30817, `000000662_lnorm` = 2.07573, `000000663_lnorm` = 1.77407, `000000664_lnorm` = 2.43578, `000000665_lnorm` = 2.12828, `000000666_lnorm` = 2.20591, +`000000667_lnorm` = 1.17683, `000000668_lnorm` = 1.66624, `000000669_lnorm` = 1.35763, `000000670_lnorm` = 1.78977, `000000671_lnorm` = 1.13355, `000000672_lnorm` = 2.743, `000000673_lnorm` = 1.34269, `000000674_lnorm` = 0.83548, `000000675_lnorm` = 1.51502, `000000676_lnorm` = 1.99193, `000000677_lnorm` = 2.28651, `000000678_lnorm` = 1.16106, `000000679_lnorm` = 2.5245, `000000680_lnorm` = 3.11831, `000000681_lnorm` = 1.94279, `000000682_lnorm` = 2.47932, `000000683_lnorm` = 1.13268, `000000684_lnorm` = 1.69413, +`000000685_lnorm` = 2.28826, `000000686_lnorm` = 1.90979, `000000687_lnorm` = 2.65157, `000000688_lnorm` = 1.41764, `000000689_lnorm` = 2.99469, `000000690_lnorm` = 1.32353, `000000691_lnorm` = 1.45726, `000000692_lnorm` = 1.97339, `000000693_lnorm` = 1.7671, `000000694_lnorm` = 0.908384, `000000695_lnorm` = 2.0966, `000000696_lnorm` = 0.965906, `000000697_lnorm` = 1.44357, `000000698_lnorm` = 2.20382, `000000699_lnorm` = 2.45003, `000000700_lnorm` = 2.9088, `000000701_lnorm` = 1.06315, `000000702_lnorm` = 1.52948, +`000000703_lnorm` = 1.37854, `000000704_lnorm` = 2.45674, `000000705_lnorm` = 1.62565, `000000706_lnorm` = 1.45386, `000000707_lnorm` = 1.79233, `000000708_lnorm` = 1.45578, `000000709_lnorm` = 3.58953, `000000710_lnorm` = 2.75587, `000000711_lnorm` = 2.18121, `000000712_lnorm` = 1.96543, `000000713_lnorm` = 1.42123, `000000714_lnorm` = 1.88975, `000000715_lnorm` = 2.03468, `000000716_lnorm` = 1.83555, `000000717_lnorm` = 1.14725, `000000718_lnorm` = 2.15482, `000000719_lnorm` = 2.83679, `000000720_lnorm` = 1.35482, +`000000721_lnorm` = 1.31996, `000000722_lnorm` = 1.58891, `000000723_lnorm` = 4.39374, `000000724_lnorm` = 1.29783, `000000725_lnorm` = 2.57891, `000000726_lnorm` = 1.25922, `000000727_lnorm` = 1.23203, `000000728_lnorm` = 1.46578, `000000729_lnorm` = 1.29022, `000000730_lnorm` = 2.609, `000000731_lnorm` = 1.98286, `000000732_lnorm` = 2.04389, `000000733_lnorm` = 2.82228, `000000734_lnorm` = 1.3775, `000000735_lnorm` = 2.45162, `000000736_lnorm` = 1.21815, `000000737_lnorm` = 1.15335, `000000738_lnorm` = 1.78975, +`000000739_lnorm` = 1.53569, `000000740_lnorm` = 2.2133, `000000741_lnorm` = 1.98769, `000000742_lnorm` = 1.87513, `000000743_lnorm` = 1.04263, `000000744_lnorm` = 1.86318, `000000745_lnorm` = 2.22433, `000000746_lnorm` = 2.00087, `000000747_lnorm` = 2.68541, `000000748_lnorm` = 3.36272, `000000749_lnorm` = 1.84894, `000000750_lnorm` = 1.67284, `000000751_lnorm` = 1.8297, `000000752_lnorm` = 0.96656, `000000753_lnorm` = 2.94891, `000000754_lnorm` = 2.02551, `000000755_lnorm` = 2.14384, `000000756_lnorm` = 1.61559, +`000000757_lnorm` = 1.34629, `000000758_lnorm` = 2.46315, `000000759_lnorm` = 1.82355, `000000760_lnorm` = 2.20364, `000000761_lnorm` = 1.81595, `000000762_lnorm` = 1.39895, `000000763_lnorm` = 1.11401, `000000764_lnorm` = 1.0403, `000000765_lnorm` = 3.46626, `000000766_lnorm` = 0.612314, `000000767_lnorm` = 2.21868, `000000768_lnorm` = 1.02168, `000000769_lnorm` = 1.85731, `000000770_lnorm` = 1.3162, `000000771_lnorm` = 1.3084, `000000772_lnorm` = 1.03984, `000000773_lnorm` = 2.21968, `000000774_lnorm` = 1.40523, +`000000775_lnorm` = 1.63671, `000000776_lnorm` = 2.35501, `000000777_lnorm` = 2.13487, `000000778_lnorm` = 1.59329, `000000779_lnorm` = 2.27573, `000000780_lnorm` = 0.656163, `000000781_lnorm` = 1.92149, `000000782_lnorm` = 1.50652, `000000783_lnorm` = 1.52454, `000000784_lnorm` = 1.40981, `000000785_lnorm` = 1.89922, `000000786_lnorm` = 3.55173, `000000787_lnorm` = 1.01509, `000000788_lnorm` = 1.73648, `000000789_lnorm` = 2.21852, `000000790_lnorm` = 1.67645, `000000791_lnorm` = 2.53566, `000000792_lnorm` = 1.78863, +`000000793_lnorm` = 1.38939, `000000794_lnorm` = 1.73823, `000000795_lnorm` = 1.93236, `000000796_lnorm` = 2.27246, `000000797_lnorm` = 1.9506, `000000798_lnorm` = 2.79071, `000000799_lnorm` = 1.85945, `000000800_lnorm` = 1.69699, `000000801_lnorm` = 1.20041, `000000802_lnorm` = 2.30994, `000000803_lnorm` = 2.28003, `000000804_lnorm` = 2.12277, `000000805_lnorm` = 1.40851, `000000806_lnorm` = 2.70246, `000000807_lnorm` = 0.952187, `000000808_lnorm` = 1.76158, `000000809_lnorm` = 1.55078, `000000810_lnorm` = 1.46163, +`000000811_lnorm` = 2.11148, `000000812_lnorm` = 1.11351, `000000813_lnorm` = 2.73889, `000000814_lnorm` = 1.51083, `000000815_lnorm` = 1.2664, `000000816_lnorm` = 1.60512, `000000817_lnorm` = 1.05833, `000000818_lnorm` = 1.68812, `000000819_lnorm` = 2.66026, `000000820_lnorm` = 1.65418, `000000821_lnorm` = 1.08777, `000000822_lnorm` = 1.33578, `000000823_lnorm` = 1.09943, `000000824_lnorm` = 1.50981, `000000825_lnorm` = 1.619, `000000826_lnorm` = 2.30468, `000000827_lnorm` = 0.855122, `000000828_lnorm` = 2.42884, +`000000829_lnorm` = 1.38089, `000000830_lnorm` = 4.4522, `000000831_lnorm` = 1.66963, `000000832_lnorm` = 1.85567, `000000833_lnorm` = 1.08886, `000000834_lnorm` = 0.92141, `000000835_lnorm` = 1.46622, `000000836_lnorm` = 2.73844, `000000837_lnorm` = 1.58313, `000000838_lnorm` = 1.38034, `000000839_lnorm` = 4.41954, `000000840_lnorm` = 0.943253, `000000841_lnorm` = 2.27984, `000000842_lnorm` = 0.912843, `000000843_lnorm` = 3.55196, `000000844_lnorm` = 1.1334, `000000845_lnorm` = 1.32161, `000000846_lnorm` = 1.15393, +`000000847_lnorm` = 1.98561, `000000848_lnorm` = 2.20511, `000000849_lnorm` = 1.54514, `000000850_lnorm` = 2.42928, `000000851_lnorm` = 4.14373, `000000852_lnorm` = 1.43421, `000000853_lnorm` = 1.86873, `000000854_lnorm` = 2.12602, `000000855_lnorm` = 1.61318, `000000856_lnorm` = 2.90885, `000000857_lnorm` = 1.78374, `000000858_lnorm` = 2.71821, `000000859_lnorm` = 2.36494, `000000860_lnorm` = 1.34748, `000000861_lnorm` = 2.34658, `000000862_lnorm` = 1.52776, `000000863_lnorm` = 0.600716, `000000864_lnorm` = 1.09026, +`000000865_lnorm` = 2.03663, `000000866_lnorm` = 1.49139, `000000867_lnorm` = 1.12194, `000000868_lnorm` = 1.07614, `000000869_lnorm` = 1.85279, `000000870_lnorm` = 2.95831, `000000871_lnorm` = 2.98388, `000000872_lnorm` = 2.99171, `000000873_lnorm` = 2.63004, `000000874_lnorm` = 2.71376, `000000875_lnorm` = 2.88341, `000000876_lnorm` = 1.53379, `000000877_lnorm` = 1.38715, `000000878_lnorm` = 1.82625, `000000879_lnorm` = 2.14879, `000000880_lnorm` = 1.45223, `000000881_lnorm` = 2.03254, `000000882_lnorm` = 1.23025, +`000000883_lnorm` = 4.04122, `000000884_lnorm` = 1.87983, `000000885_lnorm` = 0.920497, `000000886_lnorm` = 1.39447, `000000887_lnorm` = 2.25378, `000000888_lnorm` = 1.17531, `000000889_lnorm` = 1.54539, `000000890_lnorm` = 1.16774, `000000891_lnorm` = 1.62572, `000000892_lnorm` = 0.97367, `000000893_lnorm` = 1.10345, `000000894_lnorm` = 1.55087, `000000895_lnorm` = 1.43027, `000000896_lnorm` = 0.962504, `000000897_lnorm` = 2.10172, `000000898_lnorm` = 1.45381, `000000899_lnorm` = 2.50912, `000000900_lnorm` = 0.829112, +`000000901_lnorm` = 1.49204, `000000902_lnorm` = 1.97533, `000000903_lnorm` = 1.08147, `000000904_lnorm` = 1.12325, `000000905_lnorm` = 1.646, `000000906_lnorm` = 0.996103, `000000907_lnorm` = 3.10322, `000000908_lnorm` = 1.11548, `000000909_lnorm` = 1.86724, `000000910_lnorm` = 1.93593, `000000911_lnorm` = 0.861117, `000000912_lnorm` = 2.97444, `000000913_lnorm` = 2.62286, `000000914_lnorm` = 3.12932, `000000915_lnorm` = 1.27295, `000000916_lnorm` = 1.42102, `000000917_lnorm` = 1.63069, `000000918_lnorm` = 3.45913, +`000000919_lnorm` = 2.76521, `000000920_lnorm` = 0.692318, `000000921_lnorm` = 1.22273, `000000922_lnorm` = 1.62976, `000000923_lnorm` = 1.63547, `000000924_lnorm` = 1.49555, `000000925_lnorm` = 2.0772, `000000926_lnorm` = 2.2857, `000000927_lnorm` = 2.10495, `000000928_lnorm` = 0.715004, `000000929_lnorm` = 1.32799, `000000930_lnorm` = 2.34715, `000000931_lnorm` = 1.48491, `000000932_lnorm` = 1.79496, `000000933_lnorm` = 2.20081, `000000934_lnorm` = 1.68291, `000000935_lnorm` = 3.47905, `000000936_lnorm` = 2.10751, +`000000937_lnorm` = 2.46338, `000000938_lnorm` = 2.88346, `000000939_lnorm` = 1.03523, `000000940_lnorm` = 1.82537, `000000941_lnorm` = 1.64746, `000000942_lnorm` = 1.83653, `000000943_lnorm` = 2.17434, `000000944_lnorm` = 2.34556, `000000945_lnorm` = 1.35487, `000000946_lnorm` = 2.66805, `000000947_lnorm` = 1.38449, `000000948_lnorm` = 0.992328, `000000949_lnorm` = 1.2798, `000000950_lnorm` = 2.11436, `000000951_lnorm` = 1.54768, `000000952_lnorm` = 1.2801, `000000953_lnorm` = 1.13938, `000000954_lnorm` = 2.31566, +`000000955_lnorm` = 1.23916, `000000956_lnorm` = 1.09096, `000000957_lnorm` = 1.80177, `000000958_lnorm` = 1.40609, `000000959_lnorm` = 2.03731, `000000960_lnorm` = 1.96242, `000000961_lnorm` = 1.47829, `000000962_lnorm` = 1.54191, `000000963_lnorm` = 1.50901, `000000964_lnorm` = 1.58541, `000000965_lnorm` = 1.30164, `000000966_lnorm` = 1.54642, `000000967_lnorm` = 0.985902, `000000968_lnorm` = 1.74622, `000000969_lnorm` = 2.40104, `000000970_lnorm` = 1.47236, `000000971_lnorm` = 1.01637, `000000972_lnorm` = 2.01739, +`000000973_lnorm` = 1.27309, `000000974_lnorm` = 1.3458, `000000975_lnorm` = 1.66014, `000000976_lnorm` = 1.64592, `000000977_lnorm` = 1.23841, `000000978_lnorm` = 1.86099, `000000979_lnorm` = 1.95426, `000000980_lnorm` = 0.994335, `000000981_lnorm` = 1.2769, `000000982_lnorm` = 1.25548, `000000983_lnorm` = 1.55396, `000000984_lnorm` = 1.32034, `000000985_lnorm` = 1.27724, `000000986_lnorm` = 2.93347, `000000987_lnorm` = 2.10903, `000000988_lnorm` = 1.23573, `000000989_lnorm` = 2.31355, `000000990_lnorm` = 2.0226, +`000000991_lnorm` = 1.98181, `000000992_lnorm` = 1.36425, `000000993_lnorm` = 1.39059, `000000994_lnorm` = 2.13309, `000000995_lnorm` = 1.17508, `000000996_lnorm` = 2.05744, `000000997_lnorm` = 2.25295, `000000998_lnorm` = 2.09449, `000000999_lnorm` = 1.28196, `000001000_lnorm` = 0.91771)" diff --git a/tests/testthat/_snaps/hc/hc_fix.csv b/tests/testthat/_snaps/hc/hc_fix.csv index 3a6e0bb82..df9a5aee4 100644 --- a/tests/testthat/_snaps/hc/hc_fix.csv +++ b/tests/testthat/_snaps/hc/hc_fix.csv @@ -1,7 +1,7 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68948,0.528954,0.921855,2.9542,1,parametric,100,1,"c(`000000001_multi` = 1.10357, `000000002_multi` = 1.5793, `000000003_multi` = 2.08053, `000000004_multi` = 2.5379, `000000005_multi` = 2.12302, `000000006_multi` = 0.594467, `000000007_multi` = 2.36327, `000000008_multi` = 1.5254, `000000009_multi` = 1.46631, `000000010_multi` = 2.90172, `000000011_multi` = 1.25872, `000000012_multi` = 1.24921, `000000013_multi` = 1.15486, `000000014_multi` = 2.20717, `000000015_multi` = 2.03111, `000000016_multi` = 2.02476, `000000017_multi` = 1.47117, `000000018_multi` = 1.20611, -`000000019_multi` = 1.64373, `000000020_multi` = 1.12373, `000000021_multi` = 1.44884, `000000022_multi` = 1.88826, `000000023_multi` = 1.35737, `000000024_multi` = 1.18552, `000000025_multi` = 3.19108, `000000026_multi` = 2.14461, `000000027_multi` = 1.90261, `000000028_multi` = 1.58645, `000000029_multi` = 1.54456, `000000030_multi` = 1.5049, `000000031_multi` = 1.16407, `000000032_multi` = 1.78668, `000000033_multi` = 1.1176, `000000034_multi` = 1.80586, `000000035_multi` = 1.95938, `000000036_multi` = 1.1355, -`000000037_multi` = 1.54796, `000000038_multi` = 1.6452, `000000039_multi` = 1.43524, `000000040_multi` = 2.46175, `000000041_multi` = 1.35686, `000000042_multi` = 3.28089, `000000043_multi` = 2.65473, `000000044_multi` = 1.09977, `000000045_multi` = 0.643491, `000000046_multi` = 2.17548, `000000047_multi` = 1.51608, `000000048_multi` = 2.14445, `000000049_multi` = 2.25366, `000000050_multi` = 1.65013, `000000051_multi` = 1.39619, `000000052_multi` = 0.997737, `000000053_multi` = 1.45141, `000000054_multi` = 2.00728, -`000000055_multi` = 1.41036, `000000056_multi` = 1.01034, `000000057_multi` = 1.55153, `000000058_multi` = 1.73587, `000000059_multi` = 1.65547, `000000060_multi` = 1.90811, `000000061_multi` = 1.24248, `000000062_multi` = 1.02031, `000000063_multi` = 0.91667, `000000064_multi` = 1.88522, `000000065_multi` = 1.24127, `000000066_multi` = 1.9307, `000000067_multi` = 1.6957, `000000068_multi` = 1.34167, `000000069_multi` = 0.927587, `000000070_multi` = 1.76922, `000000071_multi` = 1.82752, `000000072_multi` = 1.71645, -`000000073_multi` = 2.21984, `000000074_multi` = 1.8827, `000000075_multi` = 1.03369, `000000076_multi` = 1.37502, `000000077_multi` = 2.64564, `000000078_multi` = 1.81289, `000000079_multi` = 2.16417, `000000080_multi` = 1.32974, `000000081_multi` = 1.40578, `000000082_multi` = 2.18212, `000000083_multi` = 3.00168, `000000084_multi` = 1.88522, `000000085_multi` = 1.57575, `000000086_multi` = 2.32654, `000000087_multi` = 1.65958, `000000088_multi` = 2.47507, `000000089_multi` = 1.2999, `000000090_multi` = 1.77762, -`000000091_multi` = 1.90183, `000000092_multi` = 2.06413, `000000093_multi` = 2.53541, `000000094_multi` = 1.84156, `000000095_multi` = 2.4838, `000000096_multi` = 1.32366, `000000097_multi` = 1.79193, `000000098_multi` = 1.46452, `000000099_multi` = 1.64755, `000000100_multi` = 1.40725)" +average,0.05,1.68947,0.528954,0.921853,2.95419,1,parametric,100,1,"c(`000000001_multi` = 1.10357, `000000002_multi` = 1.5793, `000000003_multi` = 2.08052, `000000004_multi` = 2.53789, `000000005_multi` = 2.12301, `000000006_multi` = 0.594466, `000000007_multi` = 2.36326, `000000008_multi` = 1.52539, `000000009_multi` = 1.4663, `000000010_multi` = 2.90171, `000000011_multi` = 1.25871, `000000012_multi` = 1.24921, `000000013_multi` = 1.15486, `000000014_multi` = 2.20717, `000000015_multi` = 2.0311, `000000016_multi` = 2.02475, `000000017_multi` = 1.47116, `000000018_multi` = 1.20611, +`000000019_multi` = 1.64372, `000000020_multi` = 1.12373, `000000021_multi` = 1.44884, `000000022_multi` = 1.88825, `000000023_multi` = 1.35736, `000000024_multi` = 1.18551, `000000025_multi` = 3.19107, `000000026_multi` = 2.1446, `000000027_multi` = 1.9026, `000000028_multi` = 1.58645, `000000029_multi` = 1.54455, `000000030_multi` = 1.50489, `000000031_multi` = 1.16407, `000000032_multi` = 1.78667, `000000033_multi` = 1.1176, `000000034_multi` = 1.80585, `000000035_multi` = 1.95938, `000000036_multi` = 1.1355, +`000000037_multi` = 1.54795, `000000038_multi` = 1.6452, `000000039_multi` = 1.43524, `000000040_multi` = 2.46175, `000000041_multi` = 1.35685, `000000042_multi` = 3.28089, `000000043_multi` = 2.65472, `000000044_multi` = 1.09977, `000000045_multi` = 0.643481, `000000046_multi` = 2.17547, `000000047_multi` = 1.51608, `000000048_multi` = 2.14445, `000000049_multi` = 2.25366, `000000050_multi` = 1.65013, `000000051_multi` = 1.39619, `000000052_multi` = 0.997733, `000000053_multi` = 1.4514, `000000054_multi` = 2.00727, +`000000055_multi` = 1.41036, `000000056_multi` = 1.01034, `000000057_multi` = 1.55153, `000000058_multi` = 1.73587, `000000059_multi` = 1.65546, `000000060_multi` = 1.9081, `000000061_multi` = 1.24247, `000000062_multi` = 1.0203, `000000063_multi` = 0.916668, `000000064_multi` = 1.88521, `000000065_multi` = 1.24127, `000000066_multi` = 1.93069, `000000067_multi` = 1.6957, `000000068_multi` = 1.34166, `000000069_multi` = 0.927584, `000000070_multi` = 1.76922, `000000071_multi` = 1.82751, `000000072_multi` = 1.71645, +`000000073_multi` = 2.21984, `000000074_multi` = 1.88269, `000000075_multi` = 1.03368, `000000076_multi` = 1.37501, `000000077_multi` = 2.64563, `000000078_multi` = 1.81289, `000000079_multi` = 2.16417, `000000080_multi` = 1.32974, `000000081_multi` = 1.40577, `000000082_multi` = 2.18211, `000000083_multi` = 3.00167, `000000084_multi` = 1.88522, `000000085_multi` = 1.57574, `000000086_multi` = 2.32654, `000000087_multi` = 1.65958, `000000088_multi` = 2.47507, `000000089_multi` = 1.29989, `000000090_multi` = 1.77761, +`000000091_multi` = 1.90182, `000000092_multi` = 2.06413, `000000093_multi` = 2.5354, `000000094_multi` = 1.84156, `000000095_multi` = 2.48379, `000000096_multi` = 1.32366, `000000097_multi` = 1.79192, `000000098_multi` = 1.46451, `000000099_multi` = 1.64755, `000000100_multi` = 1.40724)" diff --git a/tests/testthat/_snaps/hc/hc_fixmulti.csv b/tests/testthat/_snaps/hc/hc_fixmulti.csv index 13aef03dd..664beaf18 100644 --- a/tests/testthat/_snaps/hc/hc_fixmulti.csv +++ b/tests/testthat/_snaps/hc/hc_fixmulti.csv @@ -1,13 +1,13 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68948,0.528954,0.921855,2.9542,1,parametric,100,1,"c(`000000001_multi` = 1.10357, `000000002_multi` = 1.5793, `000000003_multi` = 2.08053, `000000004_multi` = 2.5379, `000000005_multi` = 2.12302, `000000006_multi` = 0.594467, `000000007_multi` = 2.36327, `000000008_multi` = 1.5254, `000000009_multi` = 1.46631, `000000010_multi` = 2.90172, `000000011_multi` = 1.25872, `000000012_multi` = 1.24921, `000000013_multi` = 1.15486, `000000014_multi` = 2.20717, `000000015_multi` = 2.03111, `000000016_multi` = 2.02476, `000000017_multi` = 1.47117, `000000018_multi` = 1.20611, -`000000019_multi` = 1.64373, `000000020_multi` = 1.12373, `000000021_multi` = 1.44884, `000000022_multi` = 1.88826, `000000023_multi` = 1.35737, `000000024_multi` = 1.18552, `000000025_multi` = 3.19108, `000000026_multi` = 2.14461, `000000027_multi` = 1.90261, `000000028_multi` = 1.58645, `000000029_multi` = 1.54456, `000000030_multi` = 1.5049, `000000031_multi` = 1.16407, `000000032_multi` = 1.78668, `000000033_multi` = 1.1176, `000000034_multi` = 1.80586, `000000035_multi` = 1.95938, `000000036_multi` = 1.1355, -`000000037_multi` = 1.54796, `000000038_multi` = 1.6452, `000000039_multi` = 1.43524, `000000040_multi` = 2.46175, `000000041_multi` = 1.35686, `000000042_multi` = 3.28089, `000000043_multi` = 2.65473, `000000044_multi` = 1.09977, `000000045_multi` = 0.643491, `000000046_multi` = 2.17548, `000000047_multi` = 1.51608, `000000048_multi` = 2.14445, `000000049_multi` = 2.25366, `000000050_multi` = 1.65013, `000000051_multi` = 1.39619, `000000052_multi` = 0.997737, `000000053_multi` = 1.45141, `000000054_multi` = 2.00728, -`000000055_multi` = 1.41036, `000000056_multi` = 1.01034, `000000057_multi` = 1.55153, `000000058_multi` = 1.73587, `000000059_multi` = 1.65547, `000000060_multi` = 1.90811, `000000061_multi` = 1.24248, `000000062_multi` = 1.02031, `000000063_multi` = 0.91667, `000000064_multi` = 1.88522, `000000065_multi` = 1.24127, `000000066_multi` = 1.9307, `000000067_multi` = 1.6957, `000000068_multi` = 1.34167, `000000069_multi` = 0.927587, `000000070_multi` = 1.76922, `000000071_multi` = 1.82752, `000000072_multi` = 1.71645, -`000000073_multi` = 2.21984, `000000074_multi` = 1.8827, `000000075_multi` = 1.03369, `000000076_multi` = 1.37502, `000000077_multi` = 2.64564, `000000078_multi` = 1.81289, `000000079_multi` = 2.16417, `000000080_multi` = 1.32974, `000000081_multi` = 1.40578, `000000082_multi` = 2.18212, `000000083_multi` = 3.00168, `000000084_multi` = 1.88522, `000000085_multi` = 1.57575, `000000086_multi` = 2.32654, `000000087_multi` = 1.65958, `000000088_multi` = 2.47507, `000000089_multi` = 1.2999, `000000090_multi` = 1.77762, -`000000091_multi` = 1.90183, `000000092_multi` = 2.06413, `000000093_multi` = 2.53541, `000000094_multi` = 1.84156, `000000095_multi` = 2.4838, `000000096_multi` = 1.32366, `000000097_multi` = 1.79193, `000000098_multi` = 1.46452, `000000099_multi` = 1.64755, `000000100_multi` = 1.40725)" -average,0.1,2.62061,0.716273,1.55146,4.31161,1,parametric,100,1,"c(`000000001_multi` = 1.82402, `000000002_multi` = 2.32699, `000000003_multi` = 3.22592, `000000004_multi` = 3.64993, `000000005_multi` = 3.10779, `000000006_multi` = 1.16191, `000000007_multi` = 3.52109, `000000008_multi` = 2.29988, `000000009_multi` = 2.37397, `000000010_multi` = 4.07896, `000000011_multi` = 2.01553, `000000012_multi` = 1.97231, `000000013_multi` = 1.93611, `000000014_multi` = 3.24353, `000000015_multi` = 3.09526, `000000016_multi` = 3.0417, `000000017_multi` = 2.29106, `000000018_multi` = 1.98955, -`000000019_multi` = 2.60701, `000000020_multi` = 1.80894, `000000021_multi` = 2.19029, `000000022_multi` = 2.89539, `000000023_multi` = 2.1398, `000000024_multi` = 1.86534, `000000025_multi` = 4.78972, `000000026_multi` = 2.95229, `000000027_multi` = 2.96665, `000000028_multi` = 2.52057, `000000029_multi` = 2.38531, `000000030_multi` = 2.37175, `000000031_multi` = 1.77224, `000000032_multi` = 2.83251, `000000033_multi` = 1.72931, `000000034_multi` = 2.89062, `000000035_multi` = 2.81184, `000000036_multi` = 1.77005, -`000000037_multi` = 2.43421, `000000038_multi` = 2.55564, `000000039_multi` = 2.33062, `000000040_multi` = 3.70623, `000000041_multi` = 2.11151, `000000042_multi` = 4.58724, `000000043_multi` = 3.9469, `000000044_multi` = 1.79426, `000000045_multi` = 1.23643, `000000046_multi` = 3.38107, `000000047_multi` = 2.54854, `000000048_multi` = 3.18269, `000000049_multi` = 3.43254, `000000050_multi` = 2.46235, `000000051_multi` = 2.30611, `000000052_multi` = 1.66493, `000000053_multi` = 2.45863, `000000054_multi` = 3.30073, -`000000055_multi` = 2.26193, `000000056_multi` = 1.56458, `000000057_multi` = 2.6473, `000000058_multi` = 2.91121, `000000059_multi` = 2.58856, `000000060_multi` = 3.01314, `000000061_multi` = 2.04336, `000000062_multi` = 1.6123, `000000063_multi` = 1.82995, `000000064_multi` = 2.97824, `000000065_multi` = 2.01763, `000000066_multi` = 3.08398, `000000067_multi` = 2.63015, `000000068_multi` = 2.10575, `000000069_multi` = 1.53959, `000000070_multi` = 2.75804, `000000071_multi` = 2.9988, `000000072_multi` = 2.53558, -`000000073_multi` = 3.18422, `000000074_multi` = 2.96023, `000000075_multi` = 1.71418, `000000076_multi` = 2.10618, `000000077_multi` = 4.22168, `000000078_multi` = 2.681, `000000079_multi` = 3.00262, `000000080_multi` = 2.23357, `000000081_multi` = 2.15058, `000000082_multi` = 3.23409, `000000083_multi` = 4.39298, `000000084_multi` = 2.76505, `000000085_multi` = 2.48446, `000000086_multi` = 3.49336, `000000087_multi` = 2.47304, `000000088_multi` = 3.59876, `000000089_multi` = 2.06417, `000000090_multi` = 2.75417, -`000000091_multi` = 2.80391, `000000092_multi` = 3.07869, `000000093_multi` = 3.52742, `000000094_multi` = 2.62146, `000000095_multi` = 3.60672, `000000096_multi` = 2.14366, `000000097_multi` = 2.78642, `000000098_multi` = 2.26998, `000000099_multi` = 2.62749, `000000100_multi` = 2.16079)" +average,0.05,1.68947,0.528954,0.921853,2.95419,1,parametric,100,1,"c(`000000001_multi` = 1.10357, `000000002_multi` = 1.5793, `000000003_multi` = 2.08052, `000000004_multi` = 2.53789, `000000005_multi` = 2.12301, `000000006_multi` = 0.594466, `000000007_multi` = 2.36326, `000000008_multi` = 1.52539, `000000009_multi` = 1.4663, `000000010_multi` = 2.90171, `000000011_multi` = 1.25871, `000000012_multi` = 1.24921, `000000013_multi` = 1.15486, `000000014_multi` = 2.20717, `000000015_multi` = 2.0311, `000000016_multi` = 2.02475, `000000017_multi` = 1.47116, `000000018_multi` = 1.20611, +`000000019_multi` = 1.64372, `000000020_multi` = 1.12373, `000000021_multi` = 1.44884, `000000022_multi` = 1.88825, `000000023_multi` = 1.35736, `000000024_multi` = 1.18551, `000000025_multi` = 3.19107, `000000026_multi` = 2.1446, `000000027_multi` = 1.9026, `000000028_multi` = 1.58645, `000000029_multi` = 1.54455, `000000030_multi` = 1.50489, `000000031_multi` = 1.16407, `000000032_multi` = 1.78667, `000000033_multi` = 1.1176, `000000034_multi` = 1.80585, `000000035_multi` = 1.95938, `000000036_multi` = 1.1355, +`000000037_multi` = 1.54795, `000000038_multi` = 1.6452, `000000039_multi` = 1.43524, `000000040_multi` = 2.46175, `000000041_multi` = 1.35685, `000000042_multi` = 3.28089, `000000043_multi` = 2.65472, `000000044_multi` = 1.09977, `000000045_multi` = 0.643481, `000000046_multi` = 2.17547, `000000047_multi` = 1.51608, `000000048_multi` = 2.14445, `000000049_multi` = 2.25366, `000000050_multi` = 1.65013, `000000051_multi` = 1.39619, `000000052_multi` = 0.997733, `000000053_multi` = 1.4514, `000000054_multi` = 2.00727, +`000000055_multi` = 1.41036, `000000056_multi` = 1.01034, `000000057_multi` = 1.55153, `000000058_multi` = 1.73587, `000000059_multi` = 1.65546, `000000060_multi` = 1.9081, `000000061_multi` = 1.24247, `000000062_multi` = 1.0203, `000000063_multi` = 0.916668, `000000064_multi` = 1.88521, `000000065_multi` = 1.24127, `000000066_multi` = 1.93069, `000000067_multi` = 1.6957, `000000068_multi` = 1.34166, `000000069_multi` = 0.927584, `000000070_multi` = 1.76922, `000000071_multi` = 1.82751, `000000072_multi` = 1.71645, +`000000073_multi` = 2.21984, `000000074_multi` = 1.88269, `000000075_multi` = 1.03368, `000000076_multi` = 1.37501, `000000077_multi` = 2.64563, `000000078_multi` = 1.81289, `000000079_multi` = 2.16417, `000000080_multi` = 1.32974, `000000081_multi` = 1.40577, `000000082_multi` = 2.18211, `000000083_multi` = 3.00167, `000000084_multi` = 1.88522, `000000085_multi` = 1.57574, `000000086_multi` = 2.32654, `000000087_multi` = 1.65958, `000000088_multi` = 2.47507, `000000089_multi` = 1.29989, `000000090_multi` = 1.77761, +`000000091_multi` = 1.90182, `000000092_multi` = 2.06413, `000000093_multi` = 2.5354, `000000094_multi` = 1.84156, `000000095_multi` = 2.48379, `000000096_multi` = 1.32366, `000000097_multi` = 1.79192, `000000098_multi` = 1.46451, `000000099_multi` = 1.64755, `000000100_multi` = 1.40724)" +average,0.1,2.6206,0.716273,1.55146,4.31161,1,parametric,100,1,"c(`000000001_multi` = 1.82402, `000000002_multi` = 2.32698, `000000003_multi` = 3.22591, `000000004_multi` = 3.64992, `000000005_multi` = 3.10778, `000000006_multi` = 1.16191, `000000007_multi` = 3.52109, `000000008_multi` = 2.29987, `000000009_multi` = 2.37396, `000000010_multi` = 4.07895, `000000011_multi` = 2.01552, `000000012_multi` = 1.9723, `000000013_multi` = 1.93611, `000000014_multi` = 3.24353, `000000015_multi` = 3.09525, `000000016_multi` = 3.04169, `000000017_multi` = 2.29105, `000000018_multi` = 1.98955, +`000000019_multi` = 2.607, `000000020_multi` = 1.80894, `000000021_multi` = 2.19029, `000000022_multi` = 2.89538, `000000023_multi` = 2.13979, `000000024_multi` = 1.86534, `000000025_multi` = 4.78972, `000000026_multi` = 2.95229, `000000027_multi` = 2.96664, `000000028_multi` = 2.52057, `000000029_multi` = 2.3853, `000000030_multi` = 2.37174, `000000031_multi` = 1.77223, `000000032_multi` = 2.8325, `000000033_multi` = 1.7293, `000000034_multi` = 2.89062, `000000035_multi` = 2.81184, `000000036_multi` = 1.77005, +`000000037_multi` = 2.4342, `000000038_multi` = 2.55563, `000000039_multi` = 2.33062, `000000040_multi` = 3.70623, `000000041_multi` = 2.1115, `000000042_multi` = 4.58723, `000000043_multi` = 3.94689, `000000044_multi` = 1.79426, `000000045_multi` = 1.23642, `000000046_multi` = 3.38106, `000000047_multi` = 2.54854, `000000048_multi` = 3.18268, `000000049_multi` = 3.43254, `000000050_multi` = 2.46234, `000000051_multi` = 2.30611, `000000052_multi` = 1.66492, `000000053_multi` = 2.45862, `000000054_multi` = 3.30073, +`000000055_multi` = 2.26193, `000000056_multi` = 1.56457, `000000057_multi` = 2.64729, `000000058_multi` = 2.91121, `000000059_multi` = 2.58855, `000000060_multi` = 3.01313, `000000061_multi` = 2.04336, `000000062_multi` = 1.61229, `000000063_multi` = 1.82995, `000000064_multi` = 2.97823, `000000065_multi` = 2.01762, `000000066_multi` = 3.08397, `000000067_multi` = 2.63014, `000000068_multi` = 2.10574, `000000069_multi` = 1.53959, `000000070_multi` = 2.75803, `000000071_multi` = 2.9988, `000000072_multi` = 2.53558, +`000000073_multi` = 3.18422, `000000074_multi` = 2.96022, `000000075_multi` = 1.71417, `000000076_multi` = 2.10617, `000000077_multi` = 4.22167, `000000078_multi` = 2.68099, `000000079_multi` = 3.00261, `000000080_multi` = 2.23357, `000000081_multi` = 2.15058, `000000082_multi` = 3.23408, `000000083_multi` = 4.39298, `000000084_multi` = 2.76504, `000000085_multi` = 2.48445, `000000086_multi` = 3.49336, `000000087_multi` = 2.47304, `000000088_multi` = 3.59875, `000000089_multi` = 2.06416, `000000090_multi` = 2.75416, +`000000091_multi` = 2.80391, `000000092_multi` = 3.07868, `000000093_multi` = 3.52741, `000000094_multi` = 2.62145, `000000095_multi` = 3.60671, `000000096_multi` = 2.14366, `000000097_multi` = 2.78641, `000000098_multi` = 2.26997, `000000099_multi` = 2.62749, `000000100_multi` = 2.16078)" diff --git a/tests/testthat/_snaps/hc/hc_save_to.csv b/tests/testthat/_snaps/hc/hc_save_to.csv index fb60cf26b..2f1d02a7a 100644 --- a/tests/testthat/_snaps/hc/hc_save_to.csv +++ b/tests/testthat/_snaps/hc/hc_save_to.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.515647,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.5904, `000000003_multi` = 2.13742)" +average,0.05,1.68117,0.515645,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.59039, `000000003_multi` = 2.13742)" diff --git a/tests/testthat/_snaps/hc/hc_save_to1.csv b/tests/testthat/_snaps/hc/hc_save_to1.csv index fb60cf26b..2f1d02a7a 100644 --- a/tests/testthat/_snaps/hc/hc_save_to1.csv +++ b/tests/testthat/_snaps/hc/hc_save_to1.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.515647,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.5904, `000000003_multi` = 2.13742)" +average,0.05,1.68117,0.515645,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.59039, `000000003_multi` = 2.13742)" diff --git a/tests/testthat/_snaps/hc/hc_save_to11.csv b/tests/testthat/_snaps/hc/hc_save_to11.csv index 63640735b..567508c48 100644 --- a/tests/testthat/_snaps/hc/hc_save_to11.csv +++ b/tests/testthat/_snaps/hc/hc_save_to11.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,NA,1.10678,1.10678,1,parametric,1,1,c(`000000001_multi` = 1.10678) +average,0.05,1.68117,NA,1.10678,1.10678,1,parametric,1,1,c(`000000001_multi` = 1.10678) diff --git a/tests/testthat/_snaps/hc/hc_save_to1_not_multi.csv b/tests/testthat/_snaps/hc/hc_save_to1_not_multi.csv index d06ec24a9..92643414f 100644 --- a/tests/testthat/_snaps/hc/hc_save_to1_not_multi.csv +++ b/tests/testthat/_snaps/hc/hc_save_to1_not_multi.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.52617100000000006,1.30754,2.28692,1,parametric,3,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344)" +average,0.05,1.68117,0.52617100000000006,1.30753,2.28691,1,parametric,3,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344)" diff --git a/tests/testthat/_snaps/hc/hc_save_to1_not_multi_default.csv b/tests/testthat/_snaps/hc/hc_save_to1_not_multi_default.csv index 481562805..98b4c9a3b 100644 --- a/tests/testthat/_snaps/hc/hc_save_to1_not_multi_default.csv +++ b/tests/testthat/_snaps/hc/hc_save_to1_not_multi_default.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.24152,NA,1.62613,1.62613,1,parametric,1,1,"c(`000000001_gamma` = 0.987785, `000000001_lgumbel` = 2.2833, `000000001_llogis` = 0.751505, `000000001_lnorm` = 3.09184, `000000001_lnorm_lnorm` = 1.64164, `000000001_weibull` = 1.67077)" +average,0.05,1.24152,NA,1.62613,1.62613,1,parametric,1,1,"c(`000000001_gamma` = 0.987785, `000000001_lgumbel` = 2.2833, `000000001_llogis` = 0.751505, `000000001_lnorm` = 3.09183, `000000001_lnorm_lnorm` = 1.64167, `000000001_weibull` = 1.67077)" diff --git a/tests/testthat/_snaps/hc/hc_save_to1_rescale.csv b/tests/testthat/_snaps/hc/hc_save_to1_rescale.csv index 061fe1add..9d02ffba5 100644 --- a/tests/testthat/_snaps/hc/hc_save_to1_rescale.csv +++ b/tests/testthat/_snaps/hc/hc_save_to1_rescale.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68135,0.515647,1.13118,2.11029,1,parametric,3,1,"c(`000000001_multi` = 1.107, `000000002_multi` = 1.59058, `000000003_multi` = 2.13764)" +average,0.05,1.68118,0.515644,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.5904, `000000003_multi` = 2.13742)" diff --git a/tests/testthat/_snaps/hc/hc_save_to1data.csv b/tests/testthat/_snaps/hc/hc_save_to1data.csv index fb60cf26b..2f1d02a7a 100644 --- a/tests/testthat/_snaps/hc/hc_save_to1data.csv +++ b/tests/testthat/_snaps/hc/hc_save_to1data.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.515647,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.5904, `000000003_multi` = 2.13742)" +average,0.05,1.68117,0.515645,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.59039, `000000003_multi` = 2.13742)" diff --git a/tests/testthat/_snaps/hc/hc_save_to_not_multi.csv b/tests/testthat/_snaps/hc/hc_save_to_not_multi.csv index d06ec24a9..92643414f 100644 --- a/tests/testthat/_snaps/hc/hc_save_to_not_multi.csv +++ b/tests/testthat/_snaps/hc/hc_save_to_not_multi.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.52617100000000006,1.30754,2.28692,1,parametric,3,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344)" +average,0.05,1.68117,0.52617100000000006,1.30753,2.28691,1,parametric,3,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344)" diff --git a/tests/testthat/_snaps/hc/hc_save_to_not_multi_default.csv b/tests/testthat/_snaps/hc/hc_save_to_not_multi_default.csv index 481562805..98b4c9a3b 100644 --- a/tests/testthat/_snaps/hc/hc_save_to_not_multi_default.csv +++ b/tests/testthat/_snaps/hc/hc_save_to_not_multi_default.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.24152,NA,1.62613,1.62613,1,parametric,1,1,"c(`000000001_gamma` = 0.987785, `000000001_lgumbel` = 2.2833, `000000001_llogis` = 0.751505, `000000001_lnorm` = 3.09184, `000000001_lnorm_lnorm` = 1.64164, `000000001_weibull` = 1.67077)" +average,0.05,1.24152,NA,1.62613,1.62613,1,parametric,1,1,"c(`000000001_gamma` = 0.987785, `000000001_lgumbel` = 2.2833, `000000001_llogis` = 0.751505, `000000001_lnorm` = 3.09183, `000000001_lnorm_lnorm` = 1.64167, `000000001_weibull` = 1.67077)" diff --git a/tests/testthat/_snaps/hc/hc_save_to_rescale.csv b/tests/testthat/_snaps/hc/hc_save_to_rescale.csv index 061fe1add..9d02ffba5 100644 --- a/tests/testthat/_snaps/hc/hc_save_to_rescale.csv +++ b/tests/testthat/_snaps/hc/hc_save_to_rescale.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68135,0.515647,1.13118,2.11029,1,parametric,3,1,"c(`000000001_multi` = 1.107, `000000002_multi` = 1.59058, `000000003_multi` = 2.13764)" +average,0.05,1.68118,0.515644,1.13096,2.11007,1,parametric,3,1,"c(`000000001_multi` = 1.10678, `000000002_multi` = 1.5904, `000000003_multi` = 2.13742)" diff --git a/tests/testthat/_snaps/hc/hc_unfix.csv b/tests/testthat/_snaps/hc/hc_unfix.csv index 297c58624..d9e4fe48b 100644 --- a/tests/testthat/_snaps/hc/hc_unfix.csv +++ b/tests/testthat/_snaps/hc/hc_unfix.csv @@ -1,7 +1,7 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68948,0.592321,1.02257,3.2918,1,parametric,100,1,"c(`000000001_multi` = 1.45262, `000000002_multi` = 1.58557, `000000003_multi` = 3.24936, `000000004_multi` = 3.21476, `000000005_multi` = 2.15219, `000000006_multi` = 1.2048, `000000007_multi` = 2.37592, `000000008_multi` = 1.86563, `000000009_multi` = 2.30867, `000000010_multi` = 3.41163, `000000011_multi` = 1.25971, `000000012_multi` = 1.40021, `000000013_multi` = 1.16299, `000000014_multi` = 2.21335, `000000015_multi` = 2.03861, `000000016_multi` = 2.02796, `000000017_multi` = 1.58609, `000000018_multi` = 1.21924, -`000000019_multi` = 1.98269, `000000020_multi` = 1.25104, `000000021_multi` = 1.7565, `000000022_multi` = 1.93252, `000000023_multi` = 1.35673, `000000024_multi` = 1.203, `000000025_multi` = 3.20701, `000000026_multi` = 2.14475, `000000027_multi` = 1.91108, `000000028_multi` = 1.75644, `000000029_multi` = 1.62452, `000000030_multi` = 1.50485, `000000031_multi` = 1.20255, `000000032_multi` = 2.04425, `000000033_multi` = 1.15761, `000000034_multi` = 2.18345, `000000035_multi` = 1.97293, `000000036_multi` = 1.17297, -`000000037_multi` = 1.77922, `000000038_multi` = 1.75526, `000000039_multi` = 1.43667, `000000040_multi` = 2.60677, `000000041_multi` = 1.36859, `000000042_multi` = 3.33019, `000000043_multi` = 2.6593, `000000044_multi` = 1.11495, `000000045_multi` = 0.644655, `000000046_multi` = 2.2529, `000000047_multi` = 1.78445, `000000048_multi` = 2.15256, `000000049_multi` = 3.39669, `000000050_multi` = 1.64949, `000000051_multi` = 1.49385, `000000052_multi` = 0.998236, `000000053_multi` = 1.49073, `000000054_multi` = 2.01825, -`000000055_multi` = 1.54084, `000000056_multi` = 1.01563, `000000057_multi` = 1.91904, `000000058_multi` = 2.20484, `000000059_multi` = 1.70218, `000000060_multi` = 2.41098, `000000061_multi` = 1.70376, `000000062_multi` = 1.03025, `000000063_multi` = 1.76254, `000000064_multi` = 2.56699, `000000065_multi` = 1.38515, `000000066_multi` = 1.99689, `000000067_multi` = 1.73917, `000000068_multi` = 1.38247, `000000069_multi` = 1.50739, `000000070_multi` = 1.77172, `000000071_multi` = 1.84241, `000000072_multi` = 1.72608, -`000000073_multi` = 2.79901, `000000074_multi` = 1.88272, `000000075_multi` = 1.05176, `000000076_multi` = 1.40962, `000000077_multi` = 2.96666, `000000078_multi` = 1.86154, `000000079_multi` = 2.29814, `000000080_multi` = 2.10876, `000000081_multi` = 1.82326, `000000082_multi` = 2.26361, `000000083_multi` = 3.00164, `000000084_multi` = 1.89378, `000000085_multi` = 1.68721, `000000086_multi` = 2.3597, `000000087_multi` = 1.79505, `000000088_multi` = 2.88805, `000000089_multi` = 1.31557, `000000090_multi` = 1.84391, -`000000091_multi` = 1.90107, `000000092_multi` = 2.30511, `000000093_multi` = 2.57291, `000000094_multi` = 1.86754, `000000095_multi` = 2.79027, `000000096_multi` = 1.342, `000000097_multi` = 1.80368, `000000098_multi` = 1.46858, `000000099_multi` = 1.9727, `000000100_multi` = 2.03696)" +average,0.05,1.68947,0.592321,1.02257,3.29179,1,parametric,100,1,"c(`000000001_multi` = 1.45261, `000000002_multi` = 1.58556, `000000003_multi` = 3.24936, `000000004_multi` = 3.21476, `000000005_multi` = 2.15219, `000000006_multi` = 1.20479, `000000007_multi` = 2.37591, `000000008_multi` = 1.86562, `000000009_multi` = 2.30867, `000000010_multi` = 3.41163, `000000011_multi` = 1.2597, `000000012_multi` = 1.4002, `000000013_multi` = 1.16298, `000000014_multi` = 2.21334, `000000015_multi` = 2.03861, `000000016_multi` = 2.02795, `000000017_multi` = 1.58608, `000000018_multi` = 1.21924, +`000000019_multi` = 1.98269, `000000020_multi` = 1.25104, `000000021_multi` = 1.75649, `000000022_multi` = 1.93251, `000000023_multi` = 1.35672, `000000024_multi` = 1.203, `000000025_multi` = 3.20701, `000000026_multi` = 2.14475, `000000027_multi` = 1.91108, `000000028_multi` = 1.75643, `000000029_multi` = 1.62451, `000000030_multi` = 1.50484, `000000031_multi` = 1.20254, `000000032_multi` = 2.04424, `000000033_multi` = 1.1576, `000000034_multi` = 2.18345, `000000035_multi` = 1.97292, `000000036_multi` = 1.17296, +`000000037_multi` = 1.77922, `000000038_multi` = 1.75525, `000000039_multi` = 1.43666, `000000040_multi` = 2.60677, `000000041_multi` = 1.36858, `000000042_multi` = 3.33018, `000000043_multi` = 2.6593, `000000044_multi` = 1.11495, `000000045_multi` = 0.644645, `000000046_multi` = 2.25289, `000000047_multi` = 1.78444, `000000048_multi` = 2.15256, `000000049_multi` = 3.39668, `000000050_multi` = 1.64949, `000000051_multi` = 1.49384, `000000052_multi` = 0.998232, `000000053_multi` = 1.49073, `000000054_multi` = 2.01825, +`000000055_multi` = 1.54083, `000000056_multi` = 1.01562, `000000057_multi` = 1.91903, `000000058_multi` = 2.20484, `000000059_multi` = 1.70217, `000000060_multi` = 2.41098, `000000061_multi` = 1.70376, `000000062_multi` = 1.03025, `000000063_multi` = 1.76254, `000000064_multi` = 2.56699, `000000065_multi` = 1.38514, `000000066_multi` = 1.99688, `000000067_multi` = 1.73916, `000000068_multi` = 1.38246, `000000069_multi` = 1.50739, `000000070_multi` = 1.77171, `000000071_multi` = 1.8424, `000000072_multi` = 1.72607, +`000000073_multi` = 2.799, `000000074_multi` = 1.88272, `000000075_multi` = 1.05176, `000000076_multi` = 1.40961, `000000077_multi` = 2.96666, `000000078_multi` = 1.86154, `000000079_multi` = 2.29813, `000000080_multi` = 2.10876, `000000081_multi` = 1.82325, `000000082_multi` = 2.26361, `000000083_multi` = 3.00163, `000000084_multi` = 1.89377, `000000085_multi` = 1.6872, `000000086_multi` = 2.3597, `000000087_multi` = 1.79505, `000000088_multi` = 2.88804, `000000089_multi` = 1.31556, `000000090_multi` = 1.8439, +`000000091_multi` = 1.90107, `000000092_multi` = 2.3051, `000000093_multi` = 2.57291, `000000094_multi` = 1.86754, `000000095_multi` = 2.79026, `000000096_multi` = 1.342, `000000097_multi` = 1.80368, `000000098_multi` = 1.46857, `000000099_multi` = 1.9727, `000000100_multi` = 2.03696)" diff --git a/tests/testthat/_snaps/hc/hc_unfixmulti.csv b/tests/testthat/_snaps/hc/hc_unfixmulti.csv index f2dd50e9c..1aa5e47e7 100644 --- a/tests/testthat/_snaps/hc/hc_unfixmulti.csv +++ b/tests/testthat/_snaps/hc/hc_unfixmulti.csv @@ -1,13 +1,13 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68948,0.592321,1.02257,3.2918,1,parametric,100,1,"c(`000000001_multi` = 1.45262, `000000002_multi` = 1.58557, `000000003_multi` = 3.24936, `000000004_multi` = 3.21476, `000000005_multi` = 2.15219, `000000006_multi` = 1.2048, `000000007_multi` = 2.37592, `000000008_multi` = 1.86563, `000000009_multi` = 2.30867, `000000010_multi` = 3.41163, `000000011_multi` = 1.25971, `000000012_multi` = 1.40021, `000000013_multi` = 1.16299, `000000014_multi` = 2.21335, `000000015_multi` = 2.03861, `000000016_multi` = 2.02796, `000000017_multi` = 1.58609, `000000018_multi` = 1.21924, -`000000019_multi` = 1.98269, `000000020_multi` = 1.25104, `000000021_multi` = 1.7565, `000000022_multi` = 1.93252, `000000023_multi` = 1.35673, `000000024_multi` = 1.203, `000000025_multi` = 3.20701, `000000026_multi` = 2.14475, `000000027_multi` = 1.91108, `000000028_multi` = 1.75644, `000000029_multi` = 1.62452, `000000030_multi` = 1.50485, `000000031_multi` = 1.20255, `000000032_multi` = 2.04425, `000000033_multi` = 1.15761, `000000034_multi` = 2.18345, `000000035_multi` = 1.97293, `000000036_multi` = 1.17297, -`000000037_multi` = 1.77922, `000000038_multi` = 1.75526, `000000039_multi` = 1.43667, `000000040_multi` = 2.60677, `000000041_multi` = 1.36859, `000000042_multi` = 3.33019, `000000043_multi` = 2.6593, `000000044_multi` = 1.11495, `000000045_multi` = 0.644655, `000000046_multi` = 2.2529, `000000047_multi` = 1.78445, `000000048_multi` = 2.15256, `000000049_multi` = 3.39669, `000000050_multi` = 1.64949, `000000051_multi` = 1.49385, `000000052_multi` = 0.998236, `000000053_multi` = 1.49073, `000000054_multi` = 2.01825, -`000000055_multi` = 1.54084, `000000056_multi` = 1.01563, `000000057_multi` = 1.91904, `000000058_multi` = 2.20484, `000000059_multi` = 1.70218, `000000060_multi` = 2.41098, `000000061_multi` = 1.70376, `000000062_multi` = 1.03025, `000000063_multi` = 1.76254, `000000064_multi` = 2.56699, `000000065_multi` = 1.38515, `000000066_multi` = 1.99689, `000000067_multi` = 1.73917, `000000068_multi` = 1.38247, `000000069_multi` = 1.50739, `000000070_multi` = 1.77172, `000000071_multi` = 1.84241, `000000072_multi` = 1.72608, -`000000073_multi` = 2.79901, `000000074_multi` = 1.88272, `000000075_multi` = 1.05176, `000000076_multi` = 1.40962, `000000077_multi` = 2.96666, `000000078_multi` = 1.86154, `000000079_multi` = 2.29814, `000000080_multi` = 2.10876, `000000081_multi` = 1.82326, `000000082_multi` = 2.26361, `000000083_multi` = 3.00164, `000000084_multi` = 1.89378, `000000085_multi` = 1.68721, `000000086_multi` = 2.3597, `000000087_multi` = 1.79505, `000000088_multi` = 2.88805, `000000089_multi` = 1.31557, `000000090_multi` = 1.84391, -`000000091_multi` = 1.90107, `000000092_multi` = 2.30511, `000000093_multi` = 2.57291, `000000094_multi` = 1.86754, `000000095_multi` = 2.79027, `000000096_multi` = 1.342, `000000097_multi` = 1.80368, `000000098_multi` = 1.46858, `000000099_multi` = 1.9727, `000000100_multi` = 2.03696)" -average,0.1,2.62061,0.741085,1.65498,4.39449,1,parametric,100,1,"c(`000000001_multi` = 2.0653, `000000002_multi` = 2.32152, `000000003_multi` = 4.1392, `000000004_multi` = 4.09276, `000000005_multi` = 3.10276, `000000006_multi` = 1.7419, `000000007_multi` = 3.51009, `000000008_multi` = 2.51011, `000000009_multi` = 3.04733, `000000010_multi` = 4.37278, `000000011_multi` = 2.02624, `000000012_multi` = 2.04602, `000000013_multi` = 1.92981, `000000014_multi` = 3.27118, `000000015_multi` = 3.12354, `000000016_multi` = 3.06158, `000000017_multi` = 2.33394, `000000018_multi` = 1.98309, -`000000019_multi` = 2.81332, `000000020_multi` = 1.86875, `000000021_multi` = 2.37771, `000000022_multi` = 2.89637, `000000023_multi` = 2.14425, `000000024_multi` = 1.86082, `000000025_multi` = 4.7761, `000000026_multi` = 2.9607, `000000027_multi` = 2.95929, `000000028_multi` = 2.59848, `000000029_multi` = 2.40737, `000000030_multi` = 2.37188, `000000031_multi` = 1.77783, `000000032_multi` = 2.96954, `000000033_multi` = 1.73585, `000000034_multi` = 3.12053, `000000035_multi` = 2.84467, `000000036_multi` = 1.77466, -`000000037_multi` = 2.55892, `000000038_multi` = 2.59335, `000000039_multi` = 2.34664, `000000040_multi` = 3.75011, `000000041_multi` = 2.10564, `000000042_multi` = 4.58075, `000000043_multi` = 3.94081, `000000044_multi` = 1.78813, `000000045_multi` = 1.24825, `000000046_multi` = 3.38999, `000000047_multi` = 2.70451, `000000048_multi` = 3.17523, `000000049_multi` = 4.30122, `000000050_multi` = 2.46469, `000000051_multi` = 2.33763, `000000052_multi` = 1.67443, `000000053_multi` = 2.45528, `000000054_multi` = 3.29218, -`000000055_multi` = 2.31535, `000000056_multi` = 1.56046, `000000057_multi` = 2.88259, `000000058_multi` = 3.22329, `000000059_multi` = 2.59145, `000000060_multi` = 3.34164, `000000061_multi` = 2.37449, `000000062_multi` = 1.63739, `000000063_multi` = 2.62528, `000000064_multi` = 3.46002, `000000065_multi` = 2.08574, `000000066_multi` = 3.09124, `000000067_multi` = 2.63003, `000000068_multi` = 2.10856, `000000069_multi` = 2.01031, `000000070_multi` = 2.75426, `000000071_multi` = 2.98879, `000000072_multi` = 2.52871, -`000000073_multi` = 3.55823, `000000074_multi` = 2.9735, `000000075_multi` = 1.70991, `000000076_multi` = 2.10582, `000000077_multi` = 4.37741, `000000078_multi` = 2.68316, `000000079_multi` = 3.05195, `000000080_multi` = 2.85603, `000000081_multi` = 2.43144, `000000082_multi` = 3.24816, `000000083_multi` = 4.40994, `000000084_multi` = 2.75942, `000000085_multi` = 2.52261, `000000086_multi` = 3.48791, `000000087_multi` = 2.52922, `000000088_multi` = 3.83178, `000000089_multi` = 2.10091, `000000090_multi` = 2.7646, -`000000091_multi` = 2.80748, `000000092_multi` = 3.19752, `000000093_multi` = 3.52458, `000000094_multi` = 2.66733, `000000095_multi` = 3.76118, `000000096_multi` = 2.18615, `000000097_multi` = 2.82125, `000000098_multi` = 2.26462, `000000099_multi` = 2.82183, `000000100_multi` = 2.62939)" +average,0.05,1.68947,0.592321,1.02257,3.29179,1,parametric,100,1,"c(`000000001_multi` = 1.45261, `000000002_multi` = 1.58556, `000000003_multi` = 3.24936, `000000004_multi` = 3.21476, `000000005_multi` = 2.15219, `000000006_multi` = 1.20479, `000000007_multi` = 2.37591, `000000008_multi` = 1.86562, `000000009_multi` = 2.30867, `000000010_multi` = 3.41163, `000000011_multi` = 1.2597, `000000012_multi` = 1.4002, `000000013_multi` = 1.16298, `000000014_multi` = 2.21334, `000000015_multi` = 2.03861, `000000016_multi` = 2.02795, `000000017_multi` = 1.58608, `000000018_multi` = 1.21924, +`000000019_multi` = 1.98269, `000000020_multi` = 1.25104, `000000021_multi` = 1.75649, `000000022_multi` = 1.93251, `000000023_multi` = 1.35672, `000000024_multi` = 1.203, `000000025_multi` = 3.20701, `000000026_multi` = 2.14475, `000000027_multi` = 1.91108, `000000028_multi` = 1.75643, `000000029_multi` = 1.62451, `000000030_multi` = 1.50484, `000000031_multi` = 1.20254, `000000032_multi` = 2.04424, `000000033_multi` = 1.1576, `000000034_multi` = 2.18345, `000000035_multi` = 1.97292, `000000036_multi` = 1.17296, +`000000037_multi` = 1.77922, `000000038_multi` = 1.75525, `000000039_multi` = 1.43666, `000000040_multi` = 2.60677, `000000041_multi` = 1.36858, `000000042_multi` = 3.33018, `000000043_multi` = 2.6593, `000000044_multi` = 1.11495, `000000045_multi` = 0.644645, `000000046_multi` = 2.25289, `000000047_multi` = 1.78444, `000000048_multi` = 2.15256, `000000049_multi` = 3.39668, `000000050_multi` = 1.64949, `000000051_multi` = 1.49384, `000000052_multi` = 0.998232, `000000053_multi` = 1.49073, `000000054_multi` = 2.01825, +`000000055_multi` = 1.54083, `000000056_multi` = 1.01562, `000000057_multi` = 1.91903, `000000058_multi` = 2.20484, `000000059_multi` = 1.70217, `000000060_multi` = 2.41098, `000000061_multi` = 1.70376, `000000062_multi` = 1.03025, `000000063_multi` = 1.76254, `000000064_multi` = 2.56699, `000000065_multi` = 1.38514, `000000066_multi` = 1.99688, `000000067_multi` = 1.73916, `000000068_multi` = 1.38246, `000000069_multi` = 1.50739, `000000070_multi` = 1.77171, `000000071_multi` = 1.8424, `000000072_multi` = 1.72607, +`000000073_multi` = 2.799, `000000074_multi` = 1.88272, `000000075_multi` = 1.05176, `000000076_multi` = 1.40961, `000000077_multi` = 2.96666, `000000078_multi` = 1.86154, `000000079_multi` = 2.29813, `000000080_multi` = 2.10876, `000000081_multi` = 1.82325, `000000082_multi` = 2.26361, `000000083_multi` = 3.00163, `000000084_multi` = 1.89377, `000000085_multi` = 1.6872, `000000086_multi` = 2.3597, `000000087_multi` = 1.79505, `000000088_multi` = 2.88804, `000000089_multi` = 1.31556, `000000090_multi` = 1.8439, +`000000091_multi` = 1.90107, `000000092_multi` = 2.3051, `000000093_multi` = 2.57291, `000000094_multi` = 1.86754, `000000095_multi` = 2.79026, `000000096_multi` = 1.342, `000000097_multi` = 1.80368, `000000098_multi` = 1.46857, `000000099_multi` = 1.9727, `000000100_multi` = 2.03696)" +average,0.1,2.6206,0.741085,1.65498,4.39448,1,parametric,100,1,"c(`000000001_multi` = 2.0653, `000000002_multi` = 2.32151, `000000003_multi` = 4.1392, `000000004_multi` = 4.09275, `000000005_multi` = 3.10275, `000000006_multi` = 1.7419, `000000007_multi` = 3.51008, `000000008_multi` = 2.5101, `000000009_multi` = 3.04733, `000000010_multi` = 4.37277, `000000011_multi` = 2.02624, `000000012_multi` = 2.04602, `000000013_multi` = 1.92981, `000000014_multi` = 3.27117, `000000015_multi` = 3.12353, `000000016_multi` = 3.06158, `000000017_multi` = 2.33394, `000000018_multi` = 1.98309, +`000000019_multi` = 2.81331, `000000020_multi` = 1.86874, `000000021_multi` = 2.37771, `000000022_multi` = 2.89637, `000000023_multi` = 2.14424, `000000024_multi` = 1.86082, `000000025_multi` = 4.7761, `000000026_multi` = 2.9607, `000000027_multi` = 2.95928, `000000028_multi` = 2.59848, `000000029_multi` = 2.40736, `000000030_multi` = 2.37186, `000000031_multi` = 1.77782, `000000032_multi` = 2.96954, `000000033_multi` = 1.73584, `000000034_multi` = 3.12053, `000000035_multi` = 2.84466, `000000036_multi` = 1.77466, +`000000037_multi` = 2.55891, `000000038_multi` = 2.59334, `000000039_multi` = 2.34664, `000000040_multi` = 3.7501, `000000041_multi` = 2.10563, `000000042_multi` = 4.58074, `000000043_multi` = 3.94081, `000000044_multi` = 1.78813, `000000045_multi` = 1.24824, `000000046_multi` = 3.38999, `000000047_multi` = 2.70451, `000000048_multi` = 3.17522, `000000049_multi` = 4.30121, `000000050_multi` = 2.46468, `000000051_multi` = 2.33762, `000000052_multi` = 1.67442, `000000053_multi` = 2.45527, `000000054_multi` = 3.29217, +`000000055_multi` = 2.31535, `000000056_multi` = 1.56046, `000000057_multi` = 2.88259, `000000058_multi` = 3.22329, `000000059_multi` = 2.59144, `000000060_multi` = 3.34163, `000000061_multi` = 2.37449, `000000062_multi` = 1.63739, `000000063_multi` = 2.62527, `000000064_multi` = 3.46001, `000000065_multi` = 2.08574, `000000066_multi` = 3.09123, `000000067_multi` = 2.63002, `000000068_multi` = 2.10855, `000000069_multi` = 2.0103, `000000070_multi` = 2.75425, `000000071_multi` = 2.98879, `000000072_multi` = 2.52871, +`000000073_multi` = 3.55822, `000000074_multi` = 2.97349, `000000075_multi` = 1.70991, `000000076_multi` = 2.10581, `000000077_multi` = 4.37741, `000000078_multi` = 2.68315, `000000079_multi` = 3.05195, `000000080_multi` = 2.85602, `000000081_multi` = 2.43144, `000000082_multi` = 3.24816, `000000083_multi` = 4.40993, `000000084_multi` = 2.75942, `000000085_multi` = 2.5226, `000000086_multi` = 3.4879, `000000087_multi` = 2.52921, `000000088_multi` = 3.83178, `000000089_multi` = 2.1009, `000000090_multi` = 2.76459, +`000000091_multi` = 2.80747, `000000092_multi` = 3.19751, `000000093_multi` = 3.52457, `000000094_multi` = 2.66732, `000000095_multi` = 3.76118, `000000096_multi` = 2.18614, `000000097_multi` = 2.82124, `000000098_multi` = 2.26461, `000000099_multi` = 2.82182, `000000100_multi` = 2.62939)" diff --git a/tests/testthat/_snaps/hc/hc_unweighted2.csv b/tests/testthat/_snaps/hc/hc_unweighted2.csv index 925e70ca6..6345e8e54 100644 --- a/tests/testthat/_snaps/hc/hc_unweighted2.csv +++ b/tests/testthat/_snaps/hc/hc_unweighted2.csv @@ -1,5 +1,5 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,samples -average,0.05,1.24152,0.886735,0.806144,3.20382,1,parametric,10,"c(`000000001_gamma` = 0.987785, `000000002_gamma` = 3.15112, `000000003_gamma` = 0.84656, `000000004_gamma` = 0.70604, `000000005_gamma` = 1.98672, `000000006_gamma` = 0.873452, `000000007_gamma` = 1.18798, `000000008_gamma` = 0.836688, `000000009_gamma` = 0.719689, `000000010_gamma` = 3.20738, `000000001_lgumbel` = 2.2833, `000000002_lgumbel` = 1.48094, `000000003_lgumbel` = 2.12922, `000000004_lgumbel` = 2.36856, `000000005_lgumbel` = 1.81154, `000000006_lgumbel` = 1.96535, `000000007_lgumbel` = 1.36401, -`000000008_lgumbel` = 1.93797, `000000009_lgumbel` = 2.70632, `000000010_lgumbel` = 2.09232, `000000001_llogis` = 0.751505, `000000002_llogis` = 3.04268, `000000003_llogis` = 2.10953, `000000004_llogis` = 2.22634, `000000005_llogis` = 1.30249, `000000006_llogis` = 2.52802, `000000007_llogis` = 3.46857, `000000008_llogis` = 2.04533, `000000009_llogis` = 1.85618, `000000010_llogis` = 1.19654, `000000001_lnorm` = 3.09184, `000000002_lnorm` = 2.42899, `000000003_lnorm` = 1.325, `000000004_lnorm` = 1.61081, -`000000005_lnorm` = 2.6033, `000000006_lnorm` = 0.865976, `000000007_lnorm` = 2.77742, `000000008_lnorm` = 1.19715, `000000009_lnorm` = 2.45546, `000000010_lnorm` = 0.970096, `000000001_lnorm_lnorm` = 1.64164, `000000002_lnorm_lnorm` = 1.67905, `000000003_lnorm_lnorm` = 1.80859, `000000004_lnorm_lnorm` = 0.921876, `000000005_lnorm_lnorm` = 1.68554, `000000006_lnorm_lnorm` = 1.28523, `000000007_lnorm_lnorm` = 1.82566, `000000008_lnorm_lnorm` = 1.05662, `000000009_lnorm_lnorm` = 1.20995, `000000010_lnorm_lnorm` = 1.67571, +average,0.05,1.24152,0.886735,0.806146,3.20382,1,parametric,10,"c(`000000001_gamma` = 0.987785, `000000002_gamma` = 3.15112, `000000003_gamma` = 0.84656, `000000004_gamma` = 0.70604, `000000005_gamma` = 1.98672, `000000006_gamma` = 0.873452, `000000007_gamma` = 1.18798, `000000008_gamma` = 0.836688, `000000009_gamma` = 0.719689, `000000010_gamma` = 3.20738, `000000001_lgumbel` = 2.2833, `000000002_lgumbel` = 1.48094, `000000003_lgumbel` = 2.12922, `000000004_lgumbel` = 2.36856, `000000005_lgumbel` = 1.81154, `000000006_lgumbel` = 1.96535, `000000007_lgumbel` = 1.36401, +`000000008_lgumbel` = 1.93797, `000000009_lgumbel` = 2.70632, `000000010_lgumbel` = 2.09232, `000000001_llogis` = 0.751505, `000000002_llogis` = 3.04268, `000000003_llogis` = 2.10953, `000000004_llogis` = 2.22634, `000000005_llogis` = 1.30249, `000000006_llogis` = 2.52802, `000000007_llogis` = 3.46857, `000000008_llogis` = 2.04533, `000000009_llogis` = 1.85618, `000000010_llogis` = 1.19654, `000000001_lnorm` = 3.09183, `000000002_lnorm` = 2.42899, `000000003_lnorm` = 1.325, `000000004_lnorm` = 1.6108, +`000000005_lnorm` = 2.60329, `000000006_lnorm` = 0.865972, `000000007_lnorm` = 2.77742, `000000008_lnorm` = 1.19715, `000000009_lnorm` = 2.45546, `000000010_lnorm` = 0.970093, `000000001_lnorm_lnorm` = 1.64167, `000000002_lnorm_lnorm` = 1.6791, `000000003_lnorm_lnorm` = 1.80861, `000000004_lnorm_lnorm` = 0.921958, `000000005_lnorm_lnorm` = 1.68551, `000000006_lnorm_lnorm` = 1.28531, `000000007_lnorm_lnorm` = 1.82585, `000000008_lnorm_lnorm` = 1.0567, `000000009_lnorm_lnorm` = 1.21003, `000000010_lnorm_lnorm` = 1.67576, `000000001_weibull` = 1.67077, `000000002_weibull` = 0.93999, `000000003_weibull` = 1.45323, `000000004_weibull` = 3.60435, `000000005_weibull` = 1.0464, `000000006_weibull` = 1.48364, `000000007_weibull` = 2.08463, `000000008_weibull` = 1.05416, `000000009_weibull` = 2.73428, `000000010_weibull` = 0.784157)" diff --git a/tests/testthat/_snaps/hc/hc_weighted2.csv b/tests/testthat/_snaps/hc/hc_weighted2.csv index 34d89a9b1..b25ed385b 100644 --- a/tests/testthat/_snaps/hc/hc_weighted2.csv +++ b/tests/testthat/_snaps/hc/hc_weighted2.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,samples -average,0.05,1.24152,0.875982,0.702735,3.12015,1,parametric,10,"c(`000000001_gamma` = 0.987785, `000000002_gamma` = 3.15112, `000000003_gamma` = 0.84656, `000000004_gamma` = 0.70604, `000000001_llogis` = 1.80721, `000000001_lnorm` = 0.921875, `000000002_lnorm` = 1.73559, `000000001_weibull` = 1.97675, `000000002_weibull` = 0.701634, `000000003_weibull` = 1.43587, `000000004_weibull` = 3.02724)" +average,0.05,1.24152,0.875982,0.702735,3.12015,1,parametric,10,"c(`000000001_gamma` = 0.987785, `000000002_gamma` = 3.15112, `000000003_gamma` = 0.84656, `000000004_gamma` = 0.70604, `000000001_llogis` = 1.80721, `000000001_lnorm` = 0.921872, `000000002_lnorm` = 1.73558, `000000001_weibull` = 1.97675, `000000002_weibull` = 0.701634, `000000003_weibull` = 1.43587, `000000004_weibull` = 3.02724)" diff --git a/tests/testthat/_snaps/hc/hc_weighted_samples.csv b/tests/testthat/_snaps/hc/hc_weighted_samples.csv index 8b947c1bb..785e23eea 100644 --- a/tests/testthat/_snaps/hc/hc_weighted_samples.csv +++ b/tests/testthat/_snaps/hc/hc_weighted_samples.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.27579,0.569545,0.492722,2.1647,1,parametric,10,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344, `000000001_gamma` = 0.508842, `000000002_gamma` = 1.14031, `000000003_gamma` = 0.859883, `000000004_gamma` = 0.65392, `000000005_gamma` = 0.488042, `000000006_gamma` = 1.15914, `000000007_gamma` = 0.732169)" +average,0.05,1.27578,0.569544,0.492722,2.16469,1,parametric,10,1,"c(`000000001_lnorm` = 1.29091, `000000002_lnorm` = 2.32183, `000000003_lnorm` = 1.62344, `000000001_gamma` = 0.508842, `000000002_gamma` = 1.14031, `000000003_gamma` = 0.859883, `000000004_gamma` = 0.65392, `000000005_gamma` = 0.488042, `000000006_gamma` = 1.15914, `000000007_gamma` = 0.732169)" diff --git a/tests/testthat/_snaps/hc/hcici.csv b/tests/testthat/_snaps/hc/hcici.csv index 5b8bc8e05..7a376d575 100644 --- a/tests/testthat/_snaps/hc/hcici.csv +++ b/tests/testthat/_snaps/hc/hcici.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.45582,0.9984,2.43078,1,parametric,10,1,"c(`000000001_lnorm` = 0.934608, `000000002_lnorm` = 1.21813, `000000003_lnorm` = 1.45945, `000000004_lnorm` = 1.76623, `000000005_lnorm` = 1.65195, `000000006_lnorm` = 1.84673, `000000007_lnorm` = 1.60237, `000000008_lnorm` = 2.28777, `000000009_lnorm` = 2.4723, `000000010_lnorm` = 1.56512)" +average,0.05,1.68117,0.455819,0.998396,2.43078,1,parametric,10,1,"c(`000000001_lnorm` = 0.934604, `000000002_lnorm` = 1.21812, `000000003_lnorm` = 1.45944, `000000004_lnorm` = 1.76622, `000000005_lnorm` = 1.65194, `000000006_lnorm` = 1.84673, `000000007_lnorm` = 1.60237, `000000008_lnorm` = 2.28776, `000000009_lnorm` = 2.4723, `000000010_lnorm` = 1.56512)" diff --git a/tests/testthat/_snaps/hc/hcici_multi.csv b/tests/testthat/_snaps/hc/hcici_multi.csv index 5b8bc8e05..7a376d575 100644 --- a/tests/testthat/_snaps/hc/hcici_multi.csv +++ b/tests/testthat/_snaps/hc/hcici_multi.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,0.45582,0.9984,2.43078,1,parametric,10,1,"c(`000000001_lnorm` = 0.934608, `000000002_lnorm` = 1.21813, `000000003_lnorm` = 1.45945, `000000004_lnorm` = 1.76623, `000000005_lnorm` = 1.65195, `000000006_lnorm` = 1.84673, `000000007_lnorm` = 1.60237, `000000008_lnorm` = 2.28777, `000000009_lnorm` = 2.4723, `000000010_lnorm` = 1.56512)" +average,0.05,1.68117,0.455819,0.998396,2.43078,1,parametric,10,1,"c(`000000001_lnorm` = 0.934604, `000000002_lnorm` = 1.21812, `000000003_lnorm` = 1.45944, `000000004_lnorm` = 1.76622, `000000005_lnorm` = 1.65194, `000000006_lnorm` = 1.84673, `000000007_lnorm` = 1.60237, `000000008_lnorm` = 2.28776, `000000009_lnorm` = 2.4723, `000000010_lnorm` = 1.56512)" diff --git a/tests/testthat/_snaps/hc/partialeft.csv b/tests/testthat/_snaps/hc/partialeft.csv new file mode 100644 index 000000000..14b95452c --- /dev/null +++ b/tests/testthat/_snaps/hc/partialeft.csv @@ -0,0 +1,2 @@ +dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples +lnorm,0.05,1.31771,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/partialeftfull.csv b/tests/testthat/_snaps/hc/partialeftfull.csv new file mode 100644 index 000000000..4341a63f0 --- /dev/null +++ b/tests/testthat/_snaps/hc/partialeftfull.csv @@ -0,0 +1,2 @@ +dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples +lnorm,0.05,1.83148,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hc/partialeftnonpara.csv b/tests/testthat/_snaps/hc/partialeftnonpara.csv new file mode 100644 index 000000000..20a00ef9e --- /dev/null +++ b/tests/testthat/_snaps/hc/partialeftnonpara.csv @@ -0,0 +1,2 @@ +dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples +lnorm,0.05,1.31771,0.360883,0.716321,1.81154,1,non-parametric,10,1,numeric(0) diff --git a/tests/testthat/_snaps/hp/hc_fix.csv b/tests/testthat/_snaps/hp/hc_fix.csv index d6823de3a..7aa93bbb6 100644 --- a/tests/testthat/_snaps/hp/hc_fix.csv +++ b/tests/testthat/_snaps/hp/hc_fix.csv @@ -1,7 +1,7 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,1.87688,1.5501,0.365884,5.53174,1,parametric,100,1,"c(`000000001_multi` = 4.31286, `000000002_multi` = 1.90648, `000000003_multi` = 1.26987, `000000004_multi` = 0.539056, `000000005_multi` = 0.922972, `000000006_multi` = 8.63337, `000000007_multi` = 0.765493, `000000008_multi` = 2.20943, `000000009_multi` = 2.69634, `000000010_multi` = 0.300657, `000000011_multi` = 3.41079, `000000012_multi` = 3.43168, `000000013_multi` = 4.03754, `000000014_multi` = 0.826089, `000000015_multi` = 1.18607, `000000016_multi` = 1.1333, `000000017_multi` = 2.50294, `000000018_multi` = 3.74452, -`000000019_multi` = 2.11863, `000000020_multi` = 4.14995, `000000021_multi` = 2.46299, `000000022_multi` = 1.45917, `000000023_multi` = 2.93786, `000000024_multi` = 3.74221, `000000025_multi` = 0.376346, `000000026_multi` = 0.597984, `000000027_multi` = 1.49931, `000000028_multi` = 2.25579, `000000029_multi` = 2.2438, `000000030_multi` = 2.42837, `000000031_multi` = 3.78669, `000000032_multi` = 1.80485, `000000033_multi` = 4.11677, `000000034_multi` = 1.81453, `000000035_multi` = 0.991034, `000000036_multi` = 4.01653, -`000000037_multi` = 2.32196, `000000038_multi` = 2.00871, `000000039_multi` = 2.75868, `000000040_multi` = 0.750699, `000000041_multi` = 2.89909, `000000042_multi` = 0.180922, `000000043_multi` = 0.564682, `000000044_multi` = 4.31187, `000000045_multi` = 8.08822, `000000046_multi` = 1.13275, `000000047_multi` = 2.66366, `000000048_multi` = 0.95343, `000000049_multi` = 0.99921, `000000050_multi` = 1.78209, `000000051_multi` = 2.968, `000000052_multi` = 5.01668, `000000053_multi` = 2.86175, `000000054_multi` = 1.56625, -`000000055_multi` = 2.8206, `000000056_multi` = 4.91224, `000000057_multi` = 2.61966, `000000058_multi` = 2.13416, `000000059_multi` = 2.00602, `000000060_multi` = 1.58297, `000000061_multi` = 3.58273, `000000062_multi` = 4.83648, `000000063_multi` = 5.48442, `000000064_multi` = 1.63127, `000000065_multi` = 3.54827, `000000066_multi` = 1.57208, `000000067_multi` = 1.8757, `000000068_multi` = 2.99633, `000000069_multi` = 5.57454, `000000070_multi` = 1.7333, `000000071_multi` = 1.84462, `000000072_multi` = 1.58762, -`000000073_multi` = 0.764203, `000000074_multi` = 1.55603, `000000075_multi` = 4.75897, `000000076_multi` = 2.76912, `000000077_multi` = 0.849541, `000000078_multi` = 1.41306, `000000079_multi` = 0.650068, `000000080_multi` = 3.2829, `000000081_multi` = 2.67207, `000000082_multi` = 0.922477, `000000083_multi` = 0.356419, `000000084_multi` = 1.24127, `000000085_multi` = 2.24717, `000000086_multi` = 0.838075, `000000087_multi` = 1.78429, `000000088_multi` = 0.617971, `000000089_multi` = 3.19473, `000000090_multi` = 1.70554, -`000000091_multi` = 1.22935, `000000092_multi` = 1.09921, `000000093_multi` = 0.39991, `000000094_multi` = 1.12011, `000000095_multi` = 0.60378, `000000096_multi` = 3.15654, `000000097_multi` = 1.65801, `000000098_multi` = 2.48815, `000000099_multi` = 2.12929, `000000100_multi` = 2.69046)" +average,1,1.87689,1.55011,0.365888,5.53175,1,parametric,100,1,"c(`000000001_multi` = 4.31288, `000000002_multi` = 1.9065, `000000003_multi` = 1.26989, `000000004_multi` = 0.539061, `000000005_multi` = 0.922982, `000000006_multi` = 8.63338, `000000007_multi` = 0.765501, `000000008_multi` = 2.20945, `000000009_multi` = 2.69635, `000000010_multi` = 0.30066, `000000011_multi` = 3.41082, `000000012_multi` = 3.4317, `000000013_multi` = 4.03756, `000000014_multi` = 0.826098, `000000015_multi` = 1.18608, `000000016_multi` = 1.13332, `000000017_multi` = 2.50298, `000000018_multi` = 3.74454, +`000000019_multi` = 2.11866, `000000020_multi` = 4.14998, `000000021_multi` = 2.46302, `000000022_multi` = 1.45919, `000000023_multi` = 2.93791, `000000024_multi` = 3.74223, `000000025_multi` = 0.37635, `000000026_multi` = 0.59799, `000000027_multi` = 1.49933, `000000028_multi` = 2.2558, `000000029_multi` = 2.24383, `000000030_multi` = 2.4284, `000000031_multi` = 3.78674, `000000032_multi` = 1.80487, `000000033_multi` = 4.11683, `000000034_multi` = 1.81454, `000000035_multi` = 0.991044, `000000036_multi` = 4.01655, +`000000037_multi` = 2.322, `000000038_multi` = 2.00874, `000000039_multi` = 2.7587, `000000040_multi` = 0.750708, `000000041_multi` = 2.89913, `000000042_multi` = 0.180924, `000000043_multi` = 0.564688, `000000044_multi` = 4.3119, `000000045_multi` = 8.08831, `000000046_multi` = 1.13276, `000000047_multi` = 2.66367, `000000048_multi` = 0.95344, `000000049_multi` = 0.999222, `000000050_multi` = 1.7821, `000000051_multi` = 2.96802, `000000052_multi` = 5.01671, `000000053_multi` = 2.86176, `000000054_multi` = 1.56626, +`000000055_multi` = 2.82062, `000000056_multi` = 4.91228, `000000057_multi` = 2.61967, `000000058_multi` = 2.13417, `000000059_multi` = 2.00604, `000000060_multi` = 1.58299, `000000061_multi` = 3.58274, `000000062_multi` = 4.83651, `000000063_multi` = 5.48443, `000000064_multi` = 1.63129, `000000065_multi` = 3.54829, `000000066_multi` = 1.5721, `000000067_multi` = 1.87572, `000000068_multi` = 2.99637, `000000069_multi` = 5.57457, `000000070_multi` = 1.73332, `000000071_multi` = 1.84463, `000000072_multi` = 1.58764, +`000000073_multi` = 0.764211, `000000074_multi` = 1.55605, `000000075_multi` = 4.75899, `000000076_multi` = 2.76916, `000000077_multi` = 0.849553, `000000078_multi` = 1.41308, `000000079_multi` = 0.650074, `000000080_multi` = 3.28291, `000000081_multi` = 2.67211, `000000082_multi` = 0.922486, `000000083_multi` = 0.356423, `000000084_multi` = 1.24128, `000000085_multi` = 2.24721, `000000086_multi` = 0.838084, `000000087_multi` = 1.78431, `000000088_multi` = 0.617978, `000000089_multi` = 3.19475, `000000090_multi` = 1.70557, +`000000091_multi` = 1.22937, `000000092_multi` = 1.09922, `000000093_multi` = 0.399914, `000000094_multi` = 1.12012, `000000095_multi` = 0.603786, `000000096_multi` = 3.15656, `000000097_multi` = 1.65803, `000000098_multi` = 2.48818, `000000099_multi` = 2.1293, `000000100_multi` = 2.69049)" diff --git a/tests/testthat/_snaps/hp/hc_unfix.csv b/tests/testthat/_snaps/hp/hc_unfix.csv index 4c3952124..4e8c06f0a 100644 --- a/tests/testthat/_snaps/hp/hc_unfix.csv +++ b/tests/testthat/_snaps/hp/hc_unfix.csv @@ -1,7 +1,7 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,1.87688,1.37402,0.0959764,4.81699,1,parametric,100,1,"c(`000000001_multi` = 2.07427, `000000002_multi` = 1.85446, `000000003_multi` = 0.0412627, `000000004_multi` = 0.0895147, `000000005_multi` = 0.8359, `000000006_multi` = 3.27389, `000000007_multi` = 0.724317, `000000008_multi` = 0.855615, `000000009_multi` = 0.213416, `000000010_multi` = 0.103118, `000000011_multi` = 3.42286, `000000012_multi` = 2.46331, `000000013_multi` = 3.97422, `000000014_multi` = 0.853205, `000000015_multi` = 1.21222, `000000016_multi` = 1.15932, `000000017_multi` = 1.9029, -`000000018_multi` = 3.64394, `000000019_multi` = 1.01581, `000000020_multi` = 3.2291, `000000021_multi` = 1.03549, `000000022_multi` = 1.29693, `000000023_multi` = 2.9515, `000000024_multi` = 3.59744, `000000025_multi` = 0.356279, `000000026_multi` = 0.611675, `000000027_multi` = 1.45436, `000000028_multi` = 1.55298, `000000029_multi` = 1.84628, `000000030_multi` = 2.42895, `000000031_multi` = 3.46566, `000000032_multi` = 1.04541, `000000033_multi` = 3.78427, `000000034_multi` = 0.818122, `000000035_multi` = 1.01387, -`000000036_multi` = 3.71218, `000000037_multi` = 1.37172, `000000038_multi` = 1.54844, `000000039_multi` = 2.78088, `000000040_multi` = 0.539161, `000000041_multi` = 2.8049, `000000042_multi` = 0.156592, `000000043_multi` = 0.552686, `000000044_multi` = 4.19023, `000000045_multi` = 8.02719, `000000046_multi` = 0.938229, `000000047_multi` = 1.62258, `000000048_multi` = 0.919227, `000000049_multi` = 0.0434705, `000000050_multi` = 1.79129, `000000051_multi` = 2.44566, `000000052_multi` = 5.01284, `000000053_multi` = 2.6418, -`000000054_multi` = 1.51864, `000000055_multi` = 2.12563, `000000056_multi` = 4.86558, `000000057_multi` = 1.33087, `000000058_multi` = 0.838105, `000000059_multi` = 1.7842, `000000060_multi` = 0.498212, `000000061_multi` = 1.25229, `000000062_multi` = 4.76328, `000000063_multi` = 1.33566, `000000064_multi` = 0.325321, `000000065_multi` = 2.65782, `000000066_multi` = 1.35302, `000000067_multi` = 1.66817, `000000068_multi` = 2.72064, `000000069_multi` = 1.33937, `000000070_multi` = 1.71485, `000000071_multi` = 1.76947, -`000000072_multi` = 1.52315, `000000073_multi` = 0.146503, `000000074_multi` = 1.58014, `000000075_multi` = 4.62103, `000000076_multi` = 2.52375, `000000077_multi` = 0.491889, `000000078_multi` = 1.21002, `000000079_multi` = 0.435756, `000000080_multi` = 0.457126, `000000081_multi` = 0.792205, `000000082_multi` = 0.737757, `000000083_multi` = 0.366822, `000000084_multi` = 1.19687, `000000085_multi` = 1.73861, `000000086_multi` = 0.761153, `000000087_multi` = 1.2497, `000000088_multi` = 0.24357, `000000089_multi` = 3.15826, -`000000090_multi` = 1.4441, `000000091_multi` = 1.23971, `000000092_multi` = 0.624244, `000000093_multi` = 0.351436, `000000094_multi` = 1.12366, `000000095_multi` = 0.301418, `000000096_multi` = 3.11511, `000000097_multi` = 1.67857, `000000098_multi` = 2.4501, `000000099_multi` = 1.04751, `000000100_multi` = 0.322632)" +average,1,1.87689,1.37403,0.0959774,4.81702,1,parametric,100,1,"c(`000000001_multi` = 2.07429, `000000002_multi` = 1.85448, `000000003_multi` = 0.0412633, `000000004_multi` = 0.0895156, `000000005_multi` = 0.835909, `000000006_multi` = 3.27391, `000000007_multi` = 0.724325, `000000008_multi` = 0.855626, `000000009_multi` = 0.213419, `000000010_multi` = 0.103119, `000000011_multi` = 3.42288, `000000012_multi` = 2.46332, `000000013_multi` = 3.97425, `000000014_multi` = 0.853213, `000000015_multi` = 1.21224, `000000016_multi` = 1.15934, `000000017_multi` = 1.90293, +`000000018_multi` = 3.64396, `000000019_multi` = 1.01582, `000000020_multi` = 3.22912, `000000021_multi` = 1.0355, `000000022_multi` = 1.29695, `000000023_multi` = 2.95155, `000000024_multi` = 3.59746, `000000025_multi` = 0.356283, `000000026_multi` = 0.611681, `000000027_multi` = 1.45437, `000000028_multi` = 1.55299, `000000029_multi` = 1.8463, `000000030_multi` = 2.42898, `000000031_multi` = 3.4657, `000000032_multi` = 1.04543, `000000033_multi` = 3.78432, `000000034_multi` = 0.818129, `000000035_multi` = 1.01388, +`000000036_multi` = 3.7122, `000000037_multi` = 1.37174, `000000038_multi` = 1.54846, `000000039_multi` = 2.78089, `000000040_multi` = 0.539168, `000000041_multi` = 2.80494, `000000042_multi` = 0.156594, `000000043_multi` = 0.552692, `000000044_multi` = 4.19026, `000000045_multi` = 8.0273, `000000046_multi` = 0.93824, `000000047_multi` = 1.62259, `000000048_multi` = 0.919237, `000000049_multi` = 0.0434711, `000000050_multi` = 1.79131, `000000051_multi` = 2.44568, `000000052_multi` = 5.01287, `000000053_multi` = 2.64182, +`000000054_multi` = 1.51865, `000000055_multi` = 2.12564, `000000056_multi` = 4.86561, `000000057_multi` = 1.33088, `000000058_multi` = 0.838115, `000000059_multi` = 1.78423, `000000060_multi` = 0.49822, `000000061_multi` = 1.2523, `000000062_multi` = 4.7633, `000000063_multi` = 1.33568, `000000064_multi` = 0.325326, `000000065_multi` = 2.65784, `000000066_multi` = 1.35304, `000000067_multi` = 1.66819, `000000068_multi` = 2.72068, `000000069_multi` = 1.33939, `000000070_multi` = 1.71487, `000000071_multi` = 1.76948, +`000000072_multi` = 1.52316, `000000073_multi` = 0.146504, `000000074_multi` = 1.58016, `000000075_multi` = 4.62105, `000000076_multi` = 2.52378, `000000077_multi` = 0.491896, `000000078_multi` = 1.21004, `000000079_multi` = 0.43576, `000000080_multi` = 0.457131, `000000081_multi` = 0.792217, `000000082_multi` = 0.737765, `000000083_multi` = 0.366826, `000000084_multi` = 1.19688, `000000085_multi` = 1.73864, `000000086_multi` = 0.761162, `000000087_multi` = 1.24972, `000000088_multi` = 0.243573, +`000000089_multi` = 3.15828, `000000090_multi` = 1.44412, `000000091_multi` = 1.23973, `000000092_multi` = 0.624251, `000000093_multi` = 0.351439, `000000094_multi` = 1.12367, `000000095_multi` = 0.301422, `000000096_multi` = 3.11513, `000000097_multi` = 1.67859, `000000098_multi` = 2.45013, `000000099_multi` = 1.04751, `000000100_multi` = 0.322637)" diff --git a/tests/testthat/_snaps/hp/hp.csv b/tests/testthat/_snaps/hp/hp.csv index c0769b3c1..e5325ed8a 100644 --- a/tests/testthat/_snaps/hp/hp.csv +++ b/tests/testthat/_snaps/hp/hp.csv @@ -2,6 +2,6 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples gamma,1,4.67759,2.14332,0.993989,6.55631,0.356574,parametric,10,1,numeric(0) lgumbel,1,0.856452,0.732699,0.0636536,2.21195,0.0134466,parametric,10,1,numeric(0) llogis,1,2.80047,1.89766,0.460372,6.09523,0.0656452,parametric,10,1,numeric(0) -lnorm,1,1.95429,2.09645,0.409858,5.86466,0.177236,parametric,10,1,numeric(0) -lnorm_lnorm,1,1.23428,1.92474,0.251385,5.72094,0.0296268,parametric,10,1,numeric(0) +lnorm,1,1.95431,2.09646,0.409862,5.86469,0.177236,parametric,10,1,numeric(0) +lnorm_lnorm,1,1.23379,1.92431,0.251332,5.71961,0.0296268,parametric,10,1,numeric(0) weibull,1,4.62301,1.81696,0.79621,6.01478,0.357472,parametric,10,1,numeric(0) diff --git a/tests/testthat/_snaps/hp/hp106.csv b/tests/testthat/_snaps/hp/hp106.csv index facd0431d..54eb9cfb9 100644 --- a/tests/testthat/_snaps/hp/hp106.csv +++ b/tests/testthat/_snaps/hp/hp106.csv @@ -1,2 +1,2 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,3.89879,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,1,3.89878,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hp/hp114.csv b/tests/testthat/_snaps/hp/hp114.csv index 8933a3929..75a0b2dbb 100644 --- a/tests/testthat/_snaps/hp/hp114.csv +++ b/tests/testthat/_snaps/hp/hp114.csv @@ -2,6 +2,6 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples gamma,1,4.67759,NA,NA,NA,0.356574,parametric,0,NA,numeric(0) lgumbel,1,0.856452,NA,NA,NA,0.0134466,parametric,0,NA,numeric(0) llogis,1,2.80047,NA,NA,NA,0.0656452,parametric,0,NA,numeric(0) -lnorm,1,1.95429,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm_lnorm,1,1.23428,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm,1,1.95431,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm_lnorm,1,1.23379,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) weibull,1,4.62301,NA,NA,NA,0.357472,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hp/hp81.csv b/tests/testthat/_snaps/hp/hp81.csv index 4db24128e..74bc94727 100644 --- a/tests/testthat/_snaps/hp/hp81.csv +++ b/tests/testthat/_snaps/hp/hp81.csv @@ -1,2 +1,2 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,1.95429,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,1,1.95431,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hp/hp89.csv b/tests/testthat/_snaps/hp/hp89.csv index a7c472ba7..ae63cb3a6 100644 --- a/tests/testthat/_snaps/hp/hp89.csv +++ b/tests/testthat/_snaps/hp/hp89.csv @@ -1,3 +1,3 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,2.5,9.25435,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,1,1.95429,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,2.5,9.25437,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,1,1.95431,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/hp/hp98.csv b/tests/testthat/_snaps/hp/hp98.csv index 9f45b8d2e..696b1ce8a 100644 --- a/tests/testthat/_snaps/hp/hp98.csv +++ b/tests/testthat/_snaps/hp/hp98.csv @@ -1,2 +1,2 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,1.95429,1.45515,0.636765,5.11972,1,parametric,10,1,"c(`000000001_lnorm` = 5.5825, `000000002_lnorm` = 3.52571, `000000003_lnorm` = 2.55716, `000000004_lnorm` = 1.8239, `000000005_lnorm` = 1.75669, `000000006_lnorm` = 1.26998, `000000007_lnorm` = 2.16264, `000000008_lnorm` = 0.819774, `000000009_lnorm` = 0.583634, `000000010_lnorm` = 2.37149)" +average,1,1.95431,1.45516,0.636771,5.11975,1,parametric,10,1,"c(`000000001_lnorm` = 5.58253, `000000002_lnorm` = 3.52573, `000000003_lnorm` = 2.55718, `000000004_lnorm` = 1.82391, `000000005_lnorm` = 1.7567, `000000006_lnorm` = 1.27, `000000007_lnorm` = 2.16266, `000000008_lnorm` = 0.819781, `000000009_lnorm` = 0.583639, `000000010_lnorm` = 2.3715)" diff --git a/tests/testthat/_snaps/hp/hp_1.csv b/tests/testthat/_snaps/hp/hp_1.csv index bd22faccb..10774fd55 100644 --- a/tests/testthat/_snaps/hp/hp_1.csv +++ b/tests/testthat/_snaps/hp/hp_1.csv @@ -1,2 +1,2 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,1.95429,NA,5.5825,5.5825,1,parametric,1,1,c(`000000001_lnorm` = 5.5825) +average,1,1.95431,NA,5.58253,5.58253,1,parametric,1,1,c(`000000001_lnorm` = 5.58253) diff --git a/tests/testthat/_snaps/hp/hp_30.csv b/tests/testthat/_snaps/hp/hp_30.csv index ef9a47e16..367913842 100644 --- a/tests/testthat/_snaps/hp/hp_30.csv +++ b/tests/testthat/_snaps/hp/hp_30.csv @@ -1,8 +1,8 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,14.0374,3.67826,7.70998,26.3187,1,parametric,100,0.98,"c(`000000001_lnorm_lnorm` = 21.905, `000000002_lnorm_lnorm` = 19.0983, `000000003_lnorm_lnorm` = 19.71, `000000004_lnorm_lnorm` = 18.9176, `000000005_lnorm_lnorm` = 19.7671, `000000006_lnorm_lnorm` = 22.2544, `000000007_lnorm_lnorm` = 17.6754, `000000008_lnorm_lnorm` = 21.776, `000000009_lnorm_lnorm` = 23.5248, `000000010_lnorm_lnorm` = 26.3775, `000000011_lnorm_lnorm` = 23.9471, `000000012_lnorm_lnorm` = 20.689, `000000013_lnorm_lnorm` = 18.506, `000000014_lnorm_lnorm` = 21.7032, `000000015_lnorm_lnorm` = 21.1386, -`000000016_lnorm_lnorm` = 21.6936, `000000017_lnorm_lnorm` = 22.5682, `000000018_lnorm_lnorm` = 22.5325, `000000019_lnorm_lnorm` = 6.60413, `000000020_lnorm_lnorm` = 22.7357, `000000021_lnorm_lnorm` = 21.329, `000000022_lnorm_lnorm` = 18.3077, `000000023_lnorm_lnorm` = 21.3177, `000000024_lnorm_lnorm` = 21.0771, `000000025_lnorm_lnorm` = 20.8326, `000000026_lnorm_lnorm` = 8.05139, `000000027_lnorm_lnorm` = 19.8596, `000000028_lnorm_lnorm` = 27.3051, `000000029_lnorm_lnorm` = 23.5009, `000000030_lnorm_lnorm` = 23.8008, -`000000031_lnorm_lnorm` = 7.45763, `000000032_lnorm_lnorm` = 23.6515, `000000033_lnorm_lnorm` = 23.9128, `000000034_lnorm_lnorm` = 17.7636, `000000035_lnorm_lnorm` = 19.7889, `000000036_lnorm_lnorm` = 23.8406, `000000037_lnorm_lnorm` = 20.1804, `000000038_lnorm_lnorm` = 19.8814, `000000039_lnorm_lnorm` = 22.1944, `000000040_lnorm_lnorm` = 23.1972, `000000041_lnorm_lnorm` = 19.5315, `000000042_lnorm_lnorm` = 22.7875, `000000043_lnorm_lnorm` = 22.87, `000000044_lnorm_lnorm` = 18.9929, `000000045_lnorm_lnorm` = 20.7767, -`000000046_lnorm_lnorm` = 18.068, `000000047_lnorm_lnorm` = 25.5756, `000000048_lnorm_lnorm` = 21.04, `000000049_lnorm_lnorm` = 22.6465, `000000050_lnorm_lnorm` = 24.4121, `000000052_lnorm_lnorm` = 22.8454, `000000053_lnorm_lnorm` = 21.8701, `000000054_lnorm_lnorm` = 23.241, `000000055_lnorm_lnorm` = 24.0348, `000000056_lnorm_lnorm` = 21.0385, `000000057_lnorm_lnorm` = 21.5912, `000000058_lnorm_lnorm` = 19.8793, `000000059_lnorm_lnorm` = 19.0142, `000000060_lnorm_lnorm` = 15.5952, `000000061_lnorm_lnorm` = 20.2947, -`000000062_lnorm_lnorm` = 22.4467, `000000063_lnorm_lnorm` = 21.3009, `000000064_lnorm_lnorm` = 24.4895, `000000065_lnorm_lnorm` = 15.7785, `000000066_lnorm_lnorm` = 20.1206, `000000067_lnorm_lnorm` = 18.4226, `000000068_lnorm_lnorm` = 17.402, `000000069_lnorm_lnorm` = 20.094, `000000070_lnorm_lnorm` = 23.9461, `000000071_lnorm_lnorm` = 24.3473, `000000072_lnorm_lnorm` = 22.713, `000000073_lnorm_lnorm` = 27.4184, `000000074_lnorm_lnorm` = 19.2073, `000000075_lnorm_lnorm` = 19.1551, `000000076_lnorm_lnorm` = 19.1136, -`000000077_lnorm_lnorm` = 6.92779, `000000078_lnorm_lnorm` = 25.3851, `000000079_lnorm_lnorm` = 25.0586, `000000080_lnorm_lnorm` = 17.9099, `000000081_lnorm_lnorm` = 21.2841, `000000082_lnorm_lnorm` = 20.8871, `000000083_lnorm_lnorm` = 17.7219, `000000084_lnorm_lnorm` = 19.6936, `000000085_lnorm_lnorm` = 20.6515, `000000086_lnorm_lnorm` = 18.7977, `000000087_lnorm_lnorm` = 21.0113, `000000088_lnorm_lnorm` = 23.6375, `000000089_lnorm_lnorm` = 22.2086, `000000091_lnorm_lnorm` = 21.1708, `000000092_lnorm_lnorm` = 20.0883, -`000000093_lnorm_lnorm` = 23.3406, `000000094_lnorm_lnorm` = 18.1018, `000000095_lnorm_lnorm` = 22.3362, `000000096_lnorm_lnorm` = 20.5784, `000000097_lnorm_lnorm` = 26.2392, `000000098_lnorm_lnorm` = 21.2252, `000000099_lnorm_lnorm` = 21.967, `000000100_lnorm_lnorm` = 23.0762)" +average,1,14.0375,3.7122,7.66497,26.329,1,parametric,100,0.95,"c(`000000001_lnorm_lnorm` = 21.9048, `000000002_lnorm_lnorm` = 19.0984, `000000003_lnorm_lnorm` = 19.7098, `000000004_lnorm_lnorm` = 18.9173, `000000005_lnorm_lnorm` = 19.7669, `000000006_lnorm_lnorm` = 22.2542, `000000007_lnorm_lnorm` = 17.6752, `000000008_lnorm_lnorm` = 21.7758, `000000009_lnorm_lnorm` = 23.5247, `000000010_lnorm_lnorm` = 26.3773, `000000012_lnorm_lnorm` = 20.6888, `000000014_lnorm_lnorm` = 21.703, `000000015_lnorm_lnorm` = 21.1384, `000000016_lnorm_lnorm` = 21.6932, `000000017_lnorm_lnorm` = 22.5676, +`000000018_lnorm_lnorm` = 22.5328, `000000019_lnorm_lnorm` = 6.60594, `000000020_lnorm_lnorm` = 22.7354, `000000021_lnorm_lnorm` = 21.3289, `000000022_lnorm_lnorm` = 18.3075, `000000023_lnorm_lnorm` = 21.3175, `000000024_lnorm_lnorm` = 21.077, `000000025_lnorm_lnorm` = 20.8324, `000000026_lnorm_lnorm` = 8.05119, `000000027_lnorm_lnorm` = 19.8597, `000000028_lnorm_lnorm` = 27.3051, `000000029_lnorm_lnorm` = 23.5006, `000000030_lnorm_lnorm` = 23.8007, `000000031_lnorm_lnorm` = 7.45701, `000000032_lnorm_lnorm` = 23.6514, +`000000033_lnorm_lnorm` = 23.9126, `000000034_lnorm_lnorm` = 17.7634, `000000035_lnorm_lnorm` = 19.7886, `000000036_lnorm_lnorm` = 23.8404, `000000038_lnorm_lnorm` = 19.8812, `000000039_lnorm_lnorm` = 22.1943, `000000040_lnorm_lnorm` = 23.1973, `000000041_lnorm_lnorm` = 19.5314, `000000042_lnorm_lnorm` = 22.7873, `000000043_lnorm_lnorm` = 22.8698, `000000044_lnorm_lnorm` = 18.9926, `000000045_lnorm_lnorm` = 20.7766, `000000046_lnorm_lnorm` = 18.0683, `000000047_lnorm_lnorm` = 25.5754, `000000048_lnorm_lnorm` = 21.0398, +`000000049_lnorm_lnorm` = 22.6463, `000000050_lnorm_lnorm` = 24.4119, `000000051_lnorm_lnorm` = 22.261, `000000052_lnorm_lnorm` = 22.8452, `000000053_lnorm_lnorm` = 21.8698, `000000054_lnorm_lnorm` = 23.2408, `000000055_lnorm_lnorm` = 24.0347, `000000056_lnorm_lnorm` = 21.0383, `000000057_lnorm_lnorm` = 21.5909, `000000058_lnorm_lnorm` = 19.8791, `000000059_lnorm_lnorm` = 19.0136, `000000060_lnorm_lnorm` = 15.5949, `000000061_lnorm_lnorm` = 20.2945, `000000062_lnorm_lnorm` = 22.4464, `000000063_lnorm_lnorm` = 21.3007, +`000000064_lnorm_lnorm` = 24.4892, `000000065_lnorm_lnorm` = 15.7782, `000000066_lnorm_lnorm` = 20.1205, `000000067_lnorm_lnorm` = 18.422, `000000068_lnorm_lnorm` = 17.4014, `000000069_lnorm_lnorm` = 20.0939, `000000070_lnorm_lnorm` = 23.946, `000000071_lnorm_lnorm` = 24.3471, `000000072_lnorm_lnorm` = 22.713, `000000073_lnorm_lnorm` = 27.4183, `000000074_lnorm_lnorm` = 19.207, `000000075_lnorm_lnorm` = 19.155, `000000077_lnorm_lnorm` = 6.92782, `000000078_lnorm_lnorm` = 25.385, `000000079_lnorm_lnorm` = 25.0585, +`000000080_lnorm_lnorm` = 17.9097, `000000081_lnorm_lnorm` = 21.284, `000000082_lnorm_lnorm` = 20.887, `000000083_lnorm_lnorm` = 17.7218, `000000084_lnorm_lnorm` = 19.6934, `000000085_lnorm_lnorm` = 20.6512, `000000086_lnorm_lnorm` = 18.7977, `000000087_lnorm_lnorm` = 21.0112, `000000088_lnorm_lnorm` = 23.6375, `000000089_lnorm_lnorm` = 22.2089, `000000090_lnorm_lnorm` = 20.429, `000000091_lnorm_lnorm` = 21.1707, `000000093_lnorm_lnorm` = 23.3401, `000000094_lnorm_lnorm` = 18.1016, `000000095_lnorm_lnorm` = 22.3362, +`000000096_lnorm_lnorm` = 20.5781, `000000097_lnorm_lnorm` = 26.2392, `000000098_lnorm_lnorm` = 21.2249, `000000099_lnorm_lnorm` = 21.9668, `000000100_lnorm_lnorm` = 23.0759)" diff --git a/tests/testthat/_snaps/hp/hp_unweighted2.csv b/tests/testthat/_snaps/hp/hp_unweighted2.csv index adbfc0cd7..f8fc83a8d 100644 --- a/tests/testthat/_snaps/hp/hp_unweighted2.csv +++ b/tests/testthat/_snaps/hp/hp_unweighted2.csv @@ -1,5 +1,5 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,samples -average,1,3.89879,1.97678,0.750219,6.12671,1,parametric,10,"c(`000000001_gamma` = 5.0567, `000000002_gamma` = 0.957638, `000000003_gamma` = 5.80091, `000000004_gamma` = 6.58178, `000000005_gamma` = 2.53177, `000000006_gamma` = 5.72599, `000000007_gamma` = 4.16365, `000000008_gamma` = 5.81366, `000000009_gamma` = 6.46855, `000000010_gamma` = 1.1192, `000000001_lgumbel` = 0.50565, `000000002_lgumbel` = 1.51489, `000000003_lgumbel` = 0.169421, `000000004_lgumbel` = 0.110891, `000000005_lgumbel` = 0.432524, `000000006_lgumbel` = 0.711895, `000000007_lgumbel` = 2.41432, -`000000008_lgumbel` = 0.475696, `000000009_lgumbel` = 0.0499396, `000000010_lgumbel` = 0.565725, `000000001_llogis` = 6.68504, `000000002_llogis` = 0.735387, `000000003_llogis` = 1.95738, `000000004_llogis` = 1.47453, `000000005_llogis` = 3.6057, `000000006_llogis` = 1.42314, `000000007_llogis` = 0.380529, `000000008_llogis` = 1.73678, `000000009_llogis` = 1.66622, `000000010_llogis` = 4.06367, `000000001_lnorm` = 0.370443, `000000002_lnorm` = 0.794092, `000000003_lnorm` = 3.2461, `000000004_lnorm` = 2.22353, -`000000005_lnorm` = 0.690968, `000000006_lnorm` = 6.05028, `000000007_lnorm` = 0.545622, `000000008_lnorm` = 3.83026, `000000009_lnorm` = 0.850274, `000000010_lnorm` = 5.2253, `000000001_lnorm_lnorm` = 0.507638, `000000002_lnorm_lnorm` = 0.317903, `000000003_lnorm_lnorm` = 1.60724, `000000004_lnorm_lnorm` = 6.18641, `000000005_lnorm_lnorm` = 1.40696, `000000006_lnorm_lnorm` = 1.36387, `000000007_lnorm_lnorm` = 0.232073, `000000008_lnorm_lnorm` = 4.11767, `000000009_lnorm_lnorm` = 1.46189, `000000010_lnorm_lnorm` = 0.413313, +average,1,3.89878,1.97677,0.750218,6.12667,1,parametric,10,"c(`000000001_gamma` = 5.0567, `000000002_gamma` = 0.957638, `000000003_gamma` = 5.80091, `000000004_gamma` = 6.58178, `000000005_gamma` = 2.53177, `000000006_gamma` = 5.72599, `000000007_gamma` = 4.16365, `000000008_gamma` = 5.81366, `000000009_gamma` = 6.46855, `000000010_gamma` = 1.1192, `000000001_lgumbel` = 0.50565, `000000002_lgumbel` = 1.51489, `000000003_lgumbel` = 0.169421, `000000004_lgumbel` = 0.110891, `000000005_lgumbel` = 0.432524, `000000006_lgumbel` = 0.711895, `000000007_lgumbel` = 2.41432, +`000000008_lgumbel` = 0.475696, `000000009_lgumbel` = 0.0499396, `000000010_lgumbel` = 0.565725, `000000001_llogis` = 6.68504, `000000002_llogis` = 0.735387, `000000003_llogis` = 1.95738, `000000004_llogis` = 1.47453, `000000005_llogis` = 3.6057, `000000006_llogis` = 1.42314, `000000007_llogis` = 0.380529, `000000008_llogis` = 1.73678, `000000009_llogis` = 1.66622, `000000010_llogis` = 4.06367, `000000001_lnorm` = 0.370446, `000000002_lnorm` = 0.794099, `000000003_lnorm` = 3.24612, `000000004_lnorm` = 2.22354, +`000000005_lnorm` = 0.690974, `000000006_lnorm` = 6.05031, `000000007_lnorm` = 0.545627, `000000008_lnorm` = 3.83028, `000000009_lnorm` = 0.85028, `000000010_lnorm` = 5.22533, `000000001_lnorm_lnorm` = 0.507438, `000000002_lnorm_lnorm` = 0.31772, `000000003_lnorm_lnorm` = 1.60708, `000000004_lnorm_lnorm` = 6.18503, `000000005_lnorm_lnorm` = 1.40697, `000000006_lnorm_lnorm` = 1.36304, `000000007_lnorm_lnorm` = 0.232059, `000000008_lnorm_lnorm` = 4.11648, `000000009_lnorm_lnorm` = 1.46101, `000000010_lnorm_lnorm` = 0.413094, `000000001_weibull` = 2.94983, `000000002_weibull` = 5.27778, `000000003_weibull` = 3.42488, `000000004_weibull` = 0.677379, `000000005_weibull` = 4.77613, `000000006_weibull` = 3.38944, `000000007_weibull` = 1.97221, `000000008_weibull` = 4.7655, `000000009_weibull` = 1.20551, `000000010_weibull` = 6.22875)" diff --git a/tests/testthat/_snaps/hp/hp_weighted2.csv b/tests/testthat/_snaps/hp/hp_weighted2.csv index 945a4729a..42bc3dea1 100644 --- a/tests/testthat/_snaps/hp/hp_weighted2.csv +++ b/tests/testthat/_snaps/hp/hp_weighted2.csv @@ -1,2 +1,2 @@ dist,conc,est,se,lcl,ucl,wt,method,nboot,samples -average,1,3.89879,2.20838,0.995932,6.6479799999999996,1,parametric,10,"c(`000000001_gamma` = 5.0567, `000000002_gamma` = 0.957638, `000000003_gamma` = 5.80091, `000000004_gamma` = 6.58178, `000000001_llogis` = 2.54292, `000000001_lnorm` = 5.60305, `000000002_lnorm` = 1.69196, `000000001_weibull` = 2.214, `000000002_weibull` = 6.67005, `000000003_weibull` = 3.46739, `000000004_weibull` = 1.11081)" +average,1,3.89878,2.20838,0.995932,6.6479799999999996,1,parametric,10,"c(`000000001_gamma` = 5.0567, `000000002_gamma` = 0.957638, `000000003_gamma` = 5.80091, `000000004_gamma` = 6.58178, `000000001_llogis` = 2.54292, `000000001_lnorm` = 5.60308, `000000002_lnorm` = 1.69197, `000000001_weibull` = 2.214, `000000002_weibull` = 6.67005, `000000003_weibull` = 3.46739, `000000004_weibull` = 1.11081)" diff --git a/tests/testthat/_snaps/lnorm.md b/tests/testthat/_snaps/lnorm.md deleted file mode 100644 index 9311544fe..000000000 --- a/tests/testthat/_snaps/lnorm.md +++ /dev/null @@ -1,4 +0,0 @@ -# lnorm with pearson1000 converges - - list(lnorm.weight = 1, lnorm.meanlog = 4.93885899015782, lnorm.sdlog = 0.132416313227444) - diff --git a/tests/testthat/_snaps/plot-cdf/fits.png b/tests/testthat/_snaps/plot-cdf/fits.png index 35812fa7a..4eb0f4563 100644 Binary files a/tests/testthat/_snaps/plot-cdf/fits.png and b/tests/testthat/_snaps/plot-cdf/fits.png differ diff --git a/tests/testthat/_snaps/plot-cdf/fits_average.png b/tests/testthat/_snaps/plot-cdf/fits_average.png index 83c41393e..ac58e83d6 100644 Binary files a/tests/testthat/_snaps/plot-cdf/fits_average.png and b/tests/testthat/_snaps/plot-cdf/fits_average.png differ diff --git a/tests/testthat/_snaps/plot-cdf/fits_average_na.png b/tests/testthat/_snaps/plot-cdf/fits_average_na.png index 73d2fda96..858c0bd4d 100644 Binary files a/tests/testthat/_snaps/plot-cdf/fits_average_na.png and b/tests/testthat/_snaps/plot-cdf/fits_average_na.png differ diff --git a/tests/testthat/_snaps/plot-cdf/fits_bigmark.png b/tests/testthat/_snaps/plot-cdf/fits_bigmark.png new file mode 100644 index 000000000..46d861dd7 Binary files /dev/null and b/tests/testthat/_snaps/plot-cdf/fits_bigmark.png differ diff --git a/tests/testthat/_snaps/plot-cdf/fits_delta.png b/tests/testthat/_snaps/plot-cdf/fits_delta.png index 2d85e592f..e7afa2d4d 100644 Binary files a/tests/testthat/_snaps/plot-cdf/fits_delta.png and b/tests/testthat/_snaps/plot-cdf/fits_delta.png differ diff --git a/tests/testthat/_snaps/plot-cdf/fits_rescale.png b/tests/testthat/_snaps/plot-cdf/fits_rescale.png index 1adef0ed8..aa73439ce 100644 Binary files a/tests/testthat/_snaps/plot-cdf/fits_rescale.png and b/tests/testthat/_snaps/plot-cdf/fits_rescale.png differ diff --git a/tests/testthat/_snaps/plot-cdf/suffix.png b/tests/testthat/_snaps/plot-cdf/suffix.png new file mode 100644 index 000000000..15850c1d7 Binary files /dev/null and b/tests/testthat/_snaps/plot-cdf/suffix.png differ diff --git a/tests/testthat/_snaps/plot-cf/ccme_boron.png b/tests/testthat/_snaps/plot-cf/ccme_boron.png deleted file mode 100644 index 0ada0de9d..000000000 Binary files a/tests/testthat/_snaps/plot-cf/ccme_boron.png and /dev/null differ diff --git a/tests/testthat/_snaps/plot-data/big_mark_comma.png b/tests/testthat/_snaps/plot-data/big_mark_comma.png new file mode 100644 index 000000000..77a5108e8 Binary files /dev/null and b/tests/testthat/_snaps/plot-data/big_mark_comma.png differ diff --git a/tests/testthat/_snaps/plot-data/big_mark_space.png b/tests/testthat/_snaps/plot-data/big_mark_space.png new file mode 100644 index 000000000..2c40f6d13 Binary files /dev/null and b/tests/testthat/_snaps/plot-data/big_mark_space.png differ diff --git a/tests/testthat/_snaps/plot-data/suffix.png b/tests/testthat/_snaps/plot-data/suffix.png new file mode 100644 index 000000000..58b6706c1 Binary files /dev/null and b/tests/testthat/_snaps/plot-data/suffix.png differ diff --git a/tests/testthat/_snaps/predict/ave5.csv b/tests/testthat/_snaps/predict/ave5.csv index 2d4663e1b..256ec3cd2 100644 --- a/tests/testthat/_snaps/predict/ave5.csv +++ b/tests/testthat/_snaps/predict/ave5.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,909.744,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.05,909.745,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/predict/multi5.csv b/tests/testthat/_snaps/predict/multi5.csv index 07a592172..c0a4f7365 100644 --- a/tests/testthat/_snaps/predict/multi5.csv +++ b/tests/testthat/_snaps/predict/multi5.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,913.773,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.05,913.772,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/predict/pred_cis.csv b/tests/testthat/_snaps/predict/pred_cis.csv index 82be1a8f6..16fb0b6b4 100644 --- a/tests/testthat/_snaps/predict/pred_cis.csv +++ b/tests/testthat/_snaps/predict/pred_cis.csv @@ -1,100 +1,100 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.01,0.341191,0.222045,0.152496,0.793525,1,parametric,10,1,numeric(0) -average,0.02,0.573299,0.343027,0.26209,1.25376,1,parametric,10,1,numeric(0) -average,0.03,0.797571,0.44575,0.377278,1.66537,1,parametric,10,1,numeric(0) -average,0.04,1.01963,0.538075,0.499045,2.051,1,parametric,10,1,numeric(0) -average,0.05,1.24152,0.623279,0.625225,2.42088,1,parametric,10,1,numeric(0) -average,0.06,1.46426,0.703141,0.756962,2.78042,1,parametric,10,1,numeric(0) -average,0.07,1.68846,0.778772,0.89439,3.13267,1,parametric,10,1,numeric(0) -average,0.08,1.91453,0.850938,1.03784,3.47976,1,parametric,10,1,numeric(0) -average,0.09,2.14276,0.920198,1.18715,3.82278,1,parametric,10,1,numeric(0) -average,0.1,2.37337,0.986985,1.34237,4.1627,1,parametric,10,1,numeric(0) -average,0.11,2.60657,1.05164,1.5034,4.50043,1,parametric,10,1,numeric(0) -average,0.12,2.84252,1.11446,1.6699600000000001,4.83668,1,parametric,10,1,numeric(0) -average,0.13,3.08137,1.17568,1.84226,5.17382,1,parametric,10,1,numeric(0) -average,0.14,3.32326,1.2355,2.01825,5.51521,1,parametric,10,1,numeric(0) -average,0.15,3.56835,1.29412,2.19428,5.85713,1,parametric,10,1,numeric(0) -average,0.16,3.81676,1.35168,2.37516,6.2013,1,parametric,10,1,numeric(0) -average,0.17,4.06864,1.40832,2.56097,6.54938,1,parametric,10,1,numeric(0) -average,0.18,4.32414,1.46418,2.75181,6.8994,1,parametric,10,1,numeric(0) -average,0.19,4.5834,1.51934,2.94785,7.25161,1,parametric,10,1,numeric(0) -average,0.2,4.84661,1.57387,3.14909,7.60621,1,parametric,10,1,numeric(0) -average,0.21,5.11393,1.62782,3.35488,7.96341,1,parametric,10,1,numeric(0) -average,0.22,5.38556,1.68124,3.56525,8.32451,1,parametric,10,1,numeric(0) -average,0.23,5.66171,1.73423,3.78082,8.68861,1,parametric,10,1,numeric(0) -average,0.24,5.94264,1.78695,4.0017,9.05584,1,parametric,10,1,numeric(0) -average,0.25,6.22858,1.83957,4.22783,9.42633,1,parametric,10,1,numeric(0) -average,0.26,6.51983,1.89226,4.45949,9.80022,1,parametric,10,1,numeric(0) -average,0.27,6.81662,1.94512,4.69678,10.1777,1,parametric,10,1,numeric(0) -average,0.28,7.1192,1.99813,4.93949,10.5588,1,parametric,10,1,numeric(0) -average,0.29,7.42767,2.05128,5.18821,10.9438,1,parametric,10,1,numeric(0) -average,0.3,7.74204,2.10452,5.44322,11.3328,1,parametric,10,1,numeric(0) -average,0.31,8.06221,2.15775,5.693,11.7259,1,parametric,10,1,numeric(0) -average,0.32,8.38803,2.21078,5.94595,12.1235,1,parametric,10,1,numeric(0) -average,0.33,8.71939,2.26359,6.20624,12.5255,1,parametric,10,1,numeric(0) -average,0.34,9.05629,2.31698,6.47309,12.9323,1,parametric,10,1,numeric(0) -average,0.35,9.39879,2.37157,6.74282,13.3453,1,parametric,10,1,numeric(0) -average,0.36,9.74701,2.42789,7.01945,13.7685,1,parametric,10,1,numeric(0) -average,0.37,10.1012,2.48712,7.30382,14.198,1,parametric,10,1,numeric(0) -average,0.38,10.4614,2.5499,7.59745,14.6379,1,parametric,10,1,numeric(0) -average,0.39,10.8281,2.61396,7.90294,15.1186,1,parametric,10,1,numeric(0) -average,0.4,11.2014,2.6778,8.22079,15.5999,1,parametric,10,1,numeric(0) -average,0.41,11.5816,2.74233,8.54554,16.0953,1,parametric,10,1,numeric(0) -average,0.42,11.969,2.80809,8.87207,16.5944,1,parametric,10,1,numeric(0) -average,0.43,12.3639,2.87519,9.20016,17.0987,1,parametric,10,1,numeric(0) -average,0.44,12.7666,2.9438,9.53466,17.6095,1,parametric,10,1,numeric(0) -average,0.45,13.1775,3.01412,9.87692,18.1277,1,parametric,10,1,numeric(0) -average,0.46,13.5969,3.08642,10.226,18.654,1,parametric,10,1,numeric(0) -average,0.47,14.0252,3.16096,10.551,19.1969,1,parametric,10,1,numeric(0) -average,0.48,14.4627,3.238,10.8832,19.7623,1,parametric,10,1,numeric(0) -average,0.49,14.91,3.31773,11.2225,20.3402,1,parametric,10,1,numeric(0) -average,0.5,15.3673,3.40032,11.5692,20.9299,1,parametric,10,1,numeric(0) -average,0.51,15.8353,3.48592,11.9245,21.5322,1,parametric,10,1,numeric(0) -average,0.52,16.3143,3.57468,12.2851,22.1478,1,parametric,10,1,numeric(0) -average,0.53,16.805,3.66676,12.6511,22.7774,1,parametric,10,1,numeric(0) -average,0.54,17.3078,3.76234,13.0264,23.4217,1,parametric,10,1,numeric(0) -average,0.55,17.8234,3.8616,13.4113,24.1039,1,parametric,10,1,numeric(0) -average,0.56,18.3523,3.96474,13.8039,24.8378,1,parametric,10,1,numeric(0) -average,0.57,18.8954,4.07198,14.2053,25.592,1,parametric,10,1,numeric(0) -average,0.58,19.4534,4.18354,14.6176,26.3674,1,parametric,10,1,numeric(0) -average,0.59,20.027,4.29968,15.0413,27.1654,1,parametric,10,1,numeric(0) -average,0.6,20.6171,4.42066,15.4772,27.987,1,parametric,10,1,numeric(0) -average,0.61,21.2246,4.54678,15.9257,28.8338,1,parametric,10,1,numeric(0) -average,0.62,21.8506,4.67834,16.3878,29.7072,1,parametric,10,1,numeric(0) -average,0.63,22.4961,4.8157,16.8641,30.6089,1,parametric,10,1,numeric(0) -average,0.64,23.1624,4.95924,17.3531,31.5406,1,parametric,10,1,numeric(0) -average,0.65,23.8508,5.10936,17.8518,32.5044,1,parametric,10,1,numeric(0) -average,0.66,24.5626,5.26655,18.3668,33.5028,1,parametric,10,1,numeric(0) -average,0.67,25.2995,5.43131,18.8994,34.5382,1,parametric,10,1,numeric(0) -average,0.68,26.0632,5.60422,19.4495,35.6127,1,parametric,10,1,numeric(0) -average,0.69,26.8556,5.78593,20.0191,36.7417,1,parametric,10,1,numeric(0) -average,0.7,27.6788,5.97717,20.6097,37.9219,1,parametric,10,1,numeric(0) -average,0.71,28.5351,6.17876,21.2231,39.1519,1,parametric,10,1,numeric(0) -average,0.72,29.4272,6.39163,21.8609,40.4357,1,parametric,10,1,numeric(0) -average,0.73,30.358,6.61686,22.523,41.7779,1,parametric,10,1,numeric(0) -average,0.74,31.3308,6.85566,23.2078,43.1836,1,parametric,10,1,numeric(0) -average,0.75,32.3493,7.10945,23.9225,44.6588,1,parametric,10,1,numeric(0) -average,0.76,33.4177,7.37987,24.6675,46.2102,1,parametric,10,1,numeric(0) -average,0.77,34.5409,7.66881,25.4436,47.8455,1,parametric,10,1,numeric(0) -average,0.78,35.7244,7.97853,26.2479,49.5737,1,parametric,10,1,numeric(0) -average,0.79,36.9746,8.31166,27.0937,51.4052,1,parametric,10,1,numeric(0) -average,0.8,38.2989,8.67137,27.9855,53.3557,1,parametric,10,1,numeric(0) -average,0.81,39.706,9.06146,28.9284,55.446,1,parametric,10,1,numeric(0) -average,0.82,41.2063,9.48654,29.9283,57.6916,1,parametric,10,1,numeric(0) -average,0.83,42.8118,9.95229,30.991,60.1113,1,parametric,10,1,numeric(0) -average,0.84,44.5375,10.4658,32.1175,62.7292,1,parametric,10,1,numeric(0) -average,0.85,46.4012,11.0359,33.3165,65.5773,1,parametric,10,1,numeric(0) -average,0.86,48.4253,11.6741,34.5851,68.6964,1,parametric,10,1,numeric(0) -average,0.87,50.6373,12.3954,35.9594,72.1617,1,parametric,10,1,numeric(0) -average,0.88,53.0729,13.2196,37.4577,76.0711,1,parametric,10,1,numeric(0) -average,0.89,55.7779,14.1741,39.1039,80.5633,1,parametric,10,1,numeric(0) -average,0.9,58.8136,15.2974,40.9198,85.7395,1,parametric,10,1,numeric(0) -average,0.91,62.2636,16.6457,42.9533,91.7803,1,parametric,10,1,numeric(0) -average,0.92,66.2464,18.3047,45.2624,98.9849,1,parametric,10,1,numeric(0) -average,0.93,70.9363,20.4117,47.8675,107.823,1,parametric,10,1,numeric(0) -average,0.94,76.6047,23.2033,50.8284,119.092,1,parametric,10,1,numeric(0) -average,0.95,83.7044,27.1235,54.4206,134.268,1,parametric,10,1,numeric(0) -average,0.96,93.067,33.1168,58.9674,156.395,1,parametric,10,1,numeric(0) -average,0.97,106.456,43.5908,65.1123,192.96,1,parametric,10,1,numeric(0) -average,0.98,128.602,66.8453,74.431,268.383,1,parametric,10,1,numeric(0) -average,0.99,180.146,156.616,92.7806,534.267,1,parametric,10,1,numeric(0) +average,0.01,0.341193,0.22218,0.152495,0.793733,1,parametric,10,1,numeric(0) +average,0.02,0.573301,0.343373,0.262088,1.25501,1,parametric,10,1,numeric(0) +average,0.03,0.797574,0.446326,0.377276,1.66709,1,parametric,10,1,numeric(0) +average,0.04,1.01963,0.538868,0.499047,2.05316,1,parametric,10,1,numeric(0) +average,0.05,1.24152,0.62426,0.625226,2.42346,1,parametric,10,1,numeric(0) +average,0.06,1.46426,0.704277,0.756962,2.78341,1,parametric,10,1,numeric(0) +average,0.07,1.68847,0.780037,0.89439,3.13607,1,parametric,10,1,numeric(0) +average,0.08,1.91453,0.852308,1.03784,3.48357,1,parametric,10,1,numeric(0) +average,0.09,2.14276,0.921654,1.18715,3.82701,1,parametric,10,1,numeric(0) +average,0.1,2.37337,0.988511,1.34237,4.16735,1,parametric,10,1,numeric(0) +average,0.11,2.60657,1.0532300000000001,1.5034,4.50549,1,parametric,10,1,numeric(0) +average,0.12,2.84252,1.11609,1.6699600000000001,4.84217,1,parametric,10,1,numeric(0) +average,0.13,3.08137,1.17734,1.84225,5.17973,1,parametric,10,1,numeric(0) +average,0.14,3.32327,1.23719,2.01825,5.52156,1,parametric,10,1,numeric(0) +average,0.15,3.56835,1.29582,2.19428,5.86393,1,parametric,10,1,numeric(0) +average,0.16,3.81676,1.35338,2.37516,6.20784,1,parametric,10,1,numeric(0) +average,0.17,4.06864,1.41003,2.56097,6.55309,1,parametric,10,1,numeric(0) +average,0.18,4.32414,1.46587,2.75181,6.90177,1,parametric,10,1,numeric(0) +average,0.19,4.58341,1.52101,2.94784,7.25412,1,parametric,10,1,numeric(0) +average,0.2,4.84661,1.57551,3.14909,7.60887,1,parametric,10,1,numeric(0) +average,0.21,5.11393,1.62944,3.35488,7.96619,1,parametric,10,1,numeric(0) +average,0.22,5.38556,1.68281,3.56525,8.32624,1,parametric,10,1,numeric(0) +average,0.23,5.66172,1.73575,3.78081,8.68912,1,parametric,10,1,numeric(0) +average,0.24,5.94264,1.7884,4.0017,9.05582,1,parametric,10,1,numeric(0) +average,0.25,6.22859,1.84094,4.22783,9.42631,1,parametric,10,1,numeric(0) +average,0.26,6.51983,1.89353,4.45949,9.8002,1,parametric,10,1,numeric(0) +average,0.27,6.81664,1.94628,4.69678,10.1776,1,parametric,10,1,numeric(0) +average,0.28,7.11921,1.99918,4.93949,10.5588,1,parametric,10,1,numeric(0) +average,0.29,7.42769,2.05223,5.1882,10.9437,1,parametric,10,1,numeric(0) +average,0.3,7.74206,2.10536,5.44322,11.3327,1,parametric,10,1,numeric(0) +average,0.31,8.06222,2.15848,5.69299,11.7259,1,parametric,10,1,numeric(0) +average,0.32,8.38804,2.21139,5.94595,12.1234,1,parametric,10,1,numeric(0) +average,0.33,8.7194,2.26405,6.20624,12.5255,1,parametric,10,1,numeric(0) +average,0.34,9.0563,2.31727,6.47308,12.9322,1,parametric,10,1,numeric(0) +average,0.35,9.39879,2.37167,6.74281,13.3453,1,parametric,10,1,numeric(0) +average,0.36,9.74701,2.42776,7.01944,13.7684,1,parametric,10,1,numeric(0) +average,0.37,10.1012,2.48673,7.30382,14.198,1,parametric,10,1,numeric(0) +average,0.38,10.4614,2.54922,7.59745,14.6378,1,parametric,10,1,numeric(0) +average,0.39,10.8281,2.61301,7.90293,15.1186,1,parametric,10,1,numeric(0) +average,0.4,11.2014,2.67658,8.22078,15.5999,1,parametric,10,1,numeric(0) +average,0.41,11.5816,2.74086,8.54552,16.0952,1,parametric,10,1,numeric(0) +average,0.42,11.969,2.80639,8.87205,16.5943,1,parametric,10,1,numeric(0) +average,0.43,12.3639,2.87327,9.20014,17.0987,1,parametric,10,1,numeric(0) +average,0.44,12.7666,2.94165,9.53464,17.6095,1,parametric,10,1,numeric(0) +average,0.45,13.1775,3.01174,9.8769,18.1277,1,parametric,10,1,numeric(0) +average,0.46,13.5969,3.0838,10.226,18.654,1,parametric,10,1,numeric(0) +average,0.47,14.0252,3.1581,10.551,19.1969,1,parametric,10,1,numeric(0) +average,0.48,14.4627,3.23489,10.8832,19.7622,1,parametric,10,1,numeric(0) +average,0.49,14.91,3.31437,11.223,20.3401,1,parametric,10,1,numeric(0) +average,0.5,15.3673,3.39672,11.5709,20.9299,1,parametric,10,1,numeric(0) +average,0.51,15.8353,3.48207,11.927,21.5322,1,parametric,10,1,numeric(0) +average,0.52,16.3143,3.57059,12.2884,22.1478,1,parametric,10,1,numeric(0) +average,0.53,16.805,3.66243,12.6549,22.7774,1,parametric,10,1,numeric(0) +average,0.54,17.3078,3.75777,13.0306,23.4217,1,parametric,10,1,numeric(0) +average,0.55,17.8233,3.85678,13.4159,24.1038,1,parametric,10,1,numeric(0) +average,0.56,18.3523,3.95968,13.8089,24.8377,1,parametric,10,1,numeric(0) +average,0.57,18.8954,4.06667,14.2107,25.5919,1,parametric,10,1,numeric(0) +average,0.58,19.4534,4.178,14.6231,26.3674,1,parametric,10,1,numeric(0) +average,0.59,20.027,4.29389,15.0468,27.1653,1,parametric,10,1,numeric(0) +average,0.6,20.6171,4.41464,15.4825,27.987,1,parametric,10,1,numeric(0) +average,0.61,21.2246,4.54052,15.9308,28.8338,1,parametric,10,1,numeric(0) +average,0.62,21.8506,4.67185,16.3924,29.7072,1,parametric,10,1,numeric(0) +average,0.63,22.4961,4.809,16.8682,30.6089,1,parametric,10,1,numeric(0) +average,0.64,23.1624,4.95232,17.3565,31.5406,1,parametric,10,1,numeric(0) +average,0.65,23.8508,5.10226,17.8543,32.5044,1,parametric,10,1,numeric(0) +average,0.66,24.5626,5.25928,18.3683,33.5028,1,parametric,10,1,numeric(0) +average,0.67,25.2995,5.42389,18.8997,34.5382,1,parametric,10,1,numeric(0) +average,0.68,26.0632,5.59668,19.4495,35.6127,1,parametric,10,1,numeric(0) +average,0.69,26.8556,5.77831,20.019,36.7417,1,parametric,10,1,numeric(0) +average,0.7,27.6788,5.96951,20.6097,37.9219,1,parametric,10,1,numeric(0) +average,0.71,28.5351,6.1711,21.2231,39.1519,1,parametric,10,1,numeric(0) +average,0.72,29.4272,6.38403,21.8609,40.4357,1,parametric,10,1,numeric(0) +average,0.73,30.358,6.60936,22.523,41.7778,1,parametric,10,1,numeric(0) +average,0.74,31.3308,6.84834,23.2078,43.1836,1,parametric,10,1,numeric(0) +average,0.75,32.3493,7.10236,23.9225,44.6588,1,parametric,10,1,numeric(0) +average,0.76,33.4177,7.37308,24.6675,46.2102,1,parametric,10,1,numeric(0) +average,0.77,34.5409,7.66239,25.4436,47.8455,1,parametric,10,1,numeric(0) +average,0.78,35.7244,7.97254,26.2478,49.5737,1,parametric,10,1,numeric(0) +average,0.79,36.9746,8.30617,27.0937,51.4052,1,parametric,10,1,numeric(0) +average,0.8,38.2989,8.66644,27.9855,53.3557,1,parametric,10,1,numeric(0) +average,0.81,39.706,9.05713,28.9284,55.446,1,parametric,10,1,numeric(0) +average,0.82,41.2063,9.48287,29.9283,57.6916,1,parametric,10,1,numeric(0) +average,0.83,42.8118,9.9493,30.991,60.1113,1,parametric,10,1,numeric(0) +average,0.84,44.5375,10.4635,32.1174,62.7292,1,parametric,10,1,numeric(0) +average,0.85,46.4012,11.0343,33.3165,65.5773,1,parametric,10,1,numeric(0) +average,0.86,48.4253,11.6732,34.5851,68.6964,1,parametric,10,1,numeric(0) +average,0.87,50.6374,12.3952,35.9594,72.1617,1,parametric,10,1,numeric(0) +average,0.88,53.0729,13.22,37.4577,76.0711,1,parametric,10,1,numeric(0) +average,0.89,55.7779,14.1751,39.1039,80.5633,1,parametric,10,1,numeric(0) +average,0.9,58.8136,15.2988,40.9198,85.7395,1,parametric,10,1,numeric(0) +average,0.91,62.2637,16.6474,42.9533,91.7803,1,parametric,10,1,numeric(0) +average,0.92,66.2464,18.3064,45.2624,98.9849,1,parametric,10,1,numeric(0) +average,0.93,70.9363,20.4134,47.8675,107.823,1,parametric,10,1,numeric(0) +average,0.94,76.6048,23.2046,50.8284,119.092,1,parametric,10,1,numeric(0) +average,0.95,83.7045,27.1242,54.4206,134.268,1,parametric,10,1,numeric(0) +average,0.96,93.0671,33.1164,58.9675,156.395,1,parametric,10,1,numeric(0) +average,0.97,106.456,43.5891,65.1123,192.96,1,parametric,10,1,numeric(0) +average,0.98,128.602,66.842,74.431,268.384,1,parametric,10,1,numeric(0) +average,0.99,180.146,156.612,92.7807,534.268,1,parametric,10,1,numeric(0) diff --git a/tests/testthat/_snaps/predict/pred_dists.csv b/tests/testthat/_snaps/predict/pred_dists.csv index e32bf24fd..be44bb634 100644 --- a/tests/testthat/_snaps/predict/pred_dists.csv +++ b/tests/testthat/_snaps/predict/pred_dists.csv @@ -1,38 +1,38 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.01,0.341191,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.02,0.573299,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.03,0.797571,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.01,0.341193,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.02,0.573301,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.03,0.797574,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.04,1.01963,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.05,1.24152,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.06,1.46426,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.07,1.68846,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.07,1.68847,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.08,1.91453,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.09,2.14276,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.1,2.37337,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.11,2.60657,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.12,2.84252,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.13,3.08137,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.14,3.32326,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.14,3.32327,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.15,3.56835,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.16,3.81676,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.17,4.06864,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.18,4.32414,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.19,4.5834,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.19,4.58341,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.2,4.84661,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.21,5.11393,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.22,5.38556,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.23,5.66171,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.23,5.66172,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.24,5.94264,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.25,6.22858,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.25,6.22859,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.26,6.51983,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.27,6.81662,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.28,7.1192,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.29,7.42767,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.3,7.74204,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.31,8.06221,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.32,8.38803,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.33,8.71939,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.34,9.05629,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.27,6.81664,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.28,7.11921,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.29,7.42769,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.3,7.74206,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.31,8.06222,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.32,8.38804,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.33,8.7194,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.34,9.0563,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.35,9.39879,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.36,9.74701,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.37,10.1012,NA,NA,NA,1,parametric,0,NA,numeric(0) @@ -53,7 +53,7 @@ average,0.51,15.8353,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.52,16.3143,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.53,16.805,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.54,17.3078,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.55,17.8234,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.55,17.8233,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.56,18.3523,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.57,18.8954,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.58,19.4534,NA,NA,NA,1,parametric,0,NA,numeric(0) @@ -85,16 +85,16 @@ average,0.83,42.8118,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.84,44.5375,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.85,46.4012,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.86,48.4253,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.87,50.6373,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.87,50.6374,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.88,53.0729,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.89,55.7779,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.9,58.8136,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.91,62.2636,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.91,62.2637,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.92,66.2464,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.93,70.9363,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.94,76.6047,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.95,83.7044,NA,NA,NA,1,parametric,0,NA,numeric(0) -average,0.96,93.067,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.94,76.6048,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.95,83.7045,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.96,93.0671,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.97,106.456,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.98,128.602,NA,NA,NA,1,parametric,0,NA,numeric(0) average,0.99,180.146,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/predict/pred_notaverage.csv b/tests/testthat/_snaps/predict/pred_notaverage.csv index 502a0b3a6..2cb1ca57b 100644 --- a/tests/testthat/_snaps/predict/pred_notaverage.csv +++ b/tests/testthat/_snaps/predict/pred_notaverage.csv @@ -296,45 +296,45 @@ llogis,0.96,145.386,NA,NA,NA,0.0656452,parametric,0,NA,numeric(0) llogis,0.97,181.285,NA,NA,NA,0.0656452,parametric,0,NA,numeric(0) llogis,0.98,246.628,NA,NA,NA,0.0656452,parametric,0,NA,numeric(0) llogis,0.99,415.143,NA,NA,NA,0.0656452,parametric,0,NA,numeric(0) -lnorm,0.01,0.721367,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.02,1.01191,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.03,1.25429,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.04,1.47418,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.05,1.68118,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.06,1.88012,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.01,0.721365,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.02,1.0119,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.03,1.25428,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.04,1.47417,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.05,1.68117,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.06,1.88011,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.07,2.07382,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.08,2.26414,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.09,2.45235,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.08,2.26413,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.09,2.45234,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.1,2.63939,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.11,2.826,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.12,3.01275,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.12,3.01274,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.13,3.20011,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.14,3.3885,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.15,3.57825,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.16,3.76967,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.14,3.38849,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.15,3.57824,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.16,3.76966,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.17,3.96304,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.18,4.15862,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.19,4.35665,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.19,4.35664,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.2,4.55734,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.21,4.76092,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.22,4.9676,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.23,5.17758,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.24,5.39107,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.25,5.60826,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.26,5.82936,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.24,5.39106,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.25,5.60825,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.26,5.82935,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.27,6.05457,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.28,6.28411,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.29,6.51819,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.3,6.75702,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.3,6.75701,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.31,7.00082,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.32,7.24984,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.32,7.24983,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.33,7.5043,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.34,7.76445,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.35,8.03056,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.36,8.3029,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.37,8.58174,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.38,8.86738,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.39,9.16012,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.39,9.16013,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.4,9.46031,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.41,9.76827,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.42,10.0844,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) @@ -348,10 +348,10 @@ lnorm,0.49,12.5601,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.5,12.9571,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.51,13.3667,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.52,13.7896,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.53,14.2263,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.53,14.2264,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.54,14.6778,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.55,15.1448,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.56,15.6282,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.56,15.6283,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.57,16.129,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.58,16.6482,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.59,17.187,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) @@ -363,137 +363,137 @@ lnorm,0.64,20.2203,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.65,20.906,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.66,21.6225,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.67,22.3721,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.68,23.1573,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.69,23.981,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.68,23.1574,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.69,23.9811,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.7,24.8463,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.71,25.7567,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.72,26.7161,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.73,27.7289,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.74,28.8002,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.73,27.729,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.74,28.8003,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.75,29.9357,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.76,31.1417,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.77,32.4257,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.76,31.1418,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.77,32.4258,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.78,33.7964,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.79,35.2635,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.8,36.8388,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.81,38.5358,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.82,40.3708,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.83,42.3631,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.84,44.5363,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.85,46.9188,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.86,49.5461,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.87,52.4628,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.88,55.7255,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.89,59.4079,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.9,63.6082,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.91,68.4597,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.92,74.1505,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.93,80.9553,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.94,89.2961,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.95,99.8626,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.96,113.885,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.79,35.2636,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.8,36.8389,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.81,38.5359,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.82,40.3709,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.83,42.3633,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.84,44.5364,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.85,46.9189,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.86,49.5463,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.87,52.4629,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.88,55.7256,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.89,59.4081,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.9,63.6084,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.91,68.4599,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.92,74.1507,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.93,80.9556,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.94,89.2964,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.95,99.863,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm,0.96,113.886,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.97,133.851,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) lnorm,0.98,165.912,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm,0.99,232.734,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) -lnorm_lnorm,0.01,0.947496,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.02,1.14173,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.03,1.29151,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.04,1.42174,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.05,1.54136,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.06,1.65478,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.07,1.76465,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.08,1.87272,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.09,1.98033,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.1,2.08851,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.11,2.19821,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.12,2.31029,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.13,2.42558,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.14,2.54497,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.15,2.66939,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.16,2.79989,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.17,2.93764,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.18,3.08403,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.19,3.24068,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.2,3.40953,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.21,3.59291,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.22,3.79365,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.23,4.01515,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.24,4.26145,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.25,4.53716,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.26,4.84717,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.27,5.19591,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.28,5.58611,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.29,6.01714,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.3,6.48401,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.31,6.97799,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.32,7.48887,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.33,8.00756,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.34,8.52744,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.35,9.0445,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.36,9.55677,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.37,10.0636,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.38,10.5652,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm,0.99,232.736,NA,NA,NA,0.177236,parametric,0,NA,numeric(0) +lnorm_lnorm,0.01,0.947599,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.02,1.14184,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.03,1.29162,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.04,1.42186,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.05,1.54147,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.06,1.6549,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.07,1.76477,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.08,1.87285,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.09,1.98045,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.1,2.08864,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.11,2.19834,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.12,2.31042,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.13,2.42572,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.14,2.54511,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.15,2.66953,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.16,2.80004,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.17,2.9378,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.18,3.0842,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.19,3.24086,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.2,3.40971,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.21,3.59311,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.22,3.79387,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.23,4.01539,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.24,4.26172,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.25,4.53746,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.26,4.8475,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.27,5.19629,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.28,5.58651,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.29,6.01757,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.3,6.48444,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.31,6.9784,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.32,7.48925,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.33,8.00789,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.34,8.52771,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.35,9.0447,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.36,9.55691,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.37,10.0637,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.38,10.5653,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) lnorm_lnorm,0.39,11.0622,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) lnorm_lnorm,0.4,11.5554,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.41,12.0458,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.42,12.5343,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.43,13.0218,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.44,13.5092,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.45,13.9974,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.46,14.4871,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.47,14.9793,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.48,15.4745,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.49,15.9737,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.5,16.4774,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.51,16.9864,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.52,17.5015,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.53,18.0232,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.54,18.5524,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.55,19.0897,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.56,19.636,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.57,20.1919,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.58,20.7584,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.59,21.3361,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.6,21.9261,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.61,22.5293,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.62,23.1466,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.63,23.7791,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.64,24.4279,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.65,25.0943,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.66,25.7796,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.67,26.4852,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.68,27.2126,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.69,27.9636,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.7,28.7401,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.71,29.5441,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.72,30.3778,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.73,31.2439,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.74,32.1452,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.75,33.0848,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.76,34.0663,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.77,35.0939,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.78,36.1721,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.79,37.3062,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.8,38.5025,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.81,39.7679,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.82,41.111,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.83,42.5416,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.84,44.0715,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.85,45.7149,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.86,47.4892,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.87,49.4158,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.88,51.5217,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.89,53.8413,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.9,56.4198,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.41,12.0457,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.42,12.5341,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.43,13.0216,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.44,13.509,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.45,13.9971,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.46,14.4868,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.47,14.9789,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.48,15.4742,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.49,15.9733,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.5,16.477,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.51,16.986,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.52,17.501,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.53,18.0227,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.54,18.5519,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.55,19.0892,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.56,19.6355,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.57,20.1914,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.58,20.7578,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.59,21.3356,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.6,21.9256,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.61,22.5287,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.62,23.146,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.63,23.7785,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.64,24.4273,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.65,25.0937,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.66,25.7789,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.67,26.4845,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.68,27.2119,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.69,27.963,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.7,28.7394,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.71,29.5434,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.72,30.3772,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.73,31.2433,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.74,32.1445,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.75,33.0841,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.76,34.0657,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.77,35.0932,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.78,36.1714,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.79,37.3056,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.8,38.5019,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.81,39.7674,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.82,41.1105,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.83,42.5411,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.84,44.071,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.85,45.7145,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.86,47.4888,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.87,49.4154,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.88,51.5214,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.89,53.8411,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.9,56.4197,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) lnorm_lnorm,0.91,59.3171,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.92,62.6164,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.93,66.4363,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.94,70.9542,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.95,76.4524,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.96,83.4181,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.97,92.798,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.98,106.819,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) -lnorm_lnorm,0.99,133.104,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.92,62.6166,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.93,66.4365,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.94,70.9547,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.95,76.4532,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.96,83.4193,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.97,92.7996,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.98,106.822,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) +lnorm_lnorm,0.99,133.109,NA,NA,NA,0.0296268,parametric,0,NA,numeric(0) weibull,0.01,0.201096,NA,NA,NA,0.357472,parametric,0,NA,numeric(0) weibull,0.02,0.41426,NA,NA,NA,0.357472,parametric,0,NA,numeric(0) weibull,0.03,0.633634,NA,NA,NA,0.357472,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/print.md b/tests/testthat/_snaps/print.md index 1275e5944..bbe8d8cbb 100644 --- a/tests/testthat/_snaps/print.md +++ b/tests/testthat/_snaps/print.md @@ -16,10 +16,10 @@ # summary fitdists with left censored, rescaled, weighted data Distribution 'lnorm' - meanlog 0.623899 + meanlog 0.6239 sdlog 1.31089 - Parameters estimated from 28 rows of left (2.4) censored, unequally weighted and rescaled (8.408) data. + Parameters estimated from 28 rows of inconsistently censored, unequally weighted and rescaled (8.408) data. # summary fitdists with inconsistently censored data @@ -48,11 +48,11 @@ sdlog 1.24154 Distribution 'lnorm_lnorm' - meanlog1 0.949487 - meanlog2 3.20108 - pmix 0.283994 - sdlog1 0.554514 - sdlog2 0.768824 + meanlog1 0.949483 + meanlog2 3.20102 + pmix 0.283968 + sdlog1 0.554465 + sdlog2 0.768862 Distribution 'weibull' scale 23.514 diff --git a/tests/testthat/_snaps/schwarz-tillmans/gof.csv b/tests/testthat/_snaps/schwarz-tillmans/gof.csv index 968f203c4..d26b599bb 100644 --- a/tests/testthat/_snaps/schwarz-tillmans/gof.csv +++ b/tests/testthat/_snaps/schwarz-tillmans/gof.csv @@ -2,6 +2,6 @@ dist,ad,ks,cvm,aic,aicc,bic,delta,weight gompertz,0.602769,0.120197,0.0823572,237.611,238.091,240.276,0,0.271 weibull,0.434234,0.116894,0.0542281,237.625,238.105,240.29,0.014,0.269 gamma,0.440212,0.116849,0.055402,237.63,238.11,240.295,0.019,0.268 -lnorm,0.507035,0.106514,0.0703318,239.028,239.508,241.693,1.417,0.133 +lnorm,0.507031,0.106514,0.0703312,239.028,239.508,241.693,1.417,0.133 llogis,0.487064,0.0993593,0.0594849,241.015,241.495,243.679,3.404,0.049 lgumbel,0.828626,0.158239,0.13399,244.186,244.666,246.85,6.575,0.01 diff --git a/tests/testthat/_snaps/schwarz-tillmans/hc.csv b/tests/testthat/_snaps/schwarz-tillmans/hc.csv index 59831d33c..8ef2d4da8 100644 --- a/tests/testthat/_snaps/schwarz-tillmans/hc.csv +++ b/tests/testthat/_snaps/schwarz-tillmans/hc.csv @@ -2,6 +2,6 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples gompertz,0.05,1.29989,NA,NA,NA,0.270604,parametric,0,NA,numeric(0) weibull,0.05,1.08673,NA,NA,NA,0.268699,parametric,0,NA,numeric(0) gamma,0.05,1.07428,NA,NA,NA,0.268024,parametric,0,NA,numeric(0) -lnorm,0.05,1.68118,NA,NA,NA,0.133222,parametric,0,NA,numeric(0) +lnorm,0.05,1.68117,NA,NA,NA,0.133222,parametric,0,NA,numeric(0) llogis,0.05,1.56226,NA,NA,NA,0.0493432,parametric,0,NA,numeric(0) lgumbel,0.05,1.76939,NA,NA,NA,0.0101073,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/ssd-plot/boron_bigmark.png b/tests/testthat/_snaps/ssd-plot/boron_bigmark.png new file mode 100644 index 000000000..edae30433 Binary files /dev/null and b/tests/testthat/_snaps/ssd-plot/boron_bigmark.png differ diff --git a/tests/testthat/_snaps/ssd-plot/boron_breaks.png b/tests/testthat/_snaps/ssd-plot/boron_breaks.png index 0f4cb5325..ffb79de7f 100644 Binary files a/tests/testthat/_snaps/ssd-plot/boron_breaks.png and b/tests/testthat/_snaps/ssd-plot/boron_breaks.png differ diff --git a/tests/testthat/_snaps/ssd-plot/boron_color.png b/tests/testthat/_snaps/ssd-plot/boron_color.png index abae69eee..7c3380355 100644 Binary files a/tests/testthat/_snaps/ssd-plot/boron_color.png and b/tests/testthat/_snaps/ssd-plot/boron_color.png differ diff --git a/tests/testthat/_snaps/ssd-plot/boron_pred.png b/tests/testthat/_snaps/ssd-plot/boron_pred.png index 7494b3507..fcbb8191f 100644 Binary files a/tests/testthat/_snaps/ssd-plot/boron_pred.png and b/tests/testthat/_snaps/ssd-plot/boron_pred.png differ diff --git a/tests/testthat/_snaps/ssd-plot/boron_pred_label.png b/tests/testthat/_snaps/ssd-plot/boron_pred_label.png index 17d29ea0f..8b6fccd1c 100644 Binary files a/tests/testthat/_snaps/ssd-plot/boron_pred_label.png and b/tests/testthat/_snaps/ssd-plot/boron_pred_label.png differ diff --git a/tests/testthat/_snaps/ssd-plot/boron_pred_shift_x.png b/tests/testthat/_snaps/ssd-plot/boron_pred_shift_x.png index eb6219b2a..02026f660 100644 Binary files a/tests/testthat/_snaps/ssd-plot/boron_pred_shift_x.png and b/tests/testthat/_snaps/ssd-plot/boron_pred_shift_x.png differ diff --git a/tests/testthat/_snaps/ssd-plot/boron_shape.png b/tests/testthat/_snaps/ssd-plot/boron_shape.png index 76c46da73..74d46f469 100644 Binary files a/tests/testthat/_snaps/ssd-plot/boron_shape.png and b/tests/testthat/_snaps/ssd-plot/boron_shape.png differ diff --git a/tests/testthat/_snaps/ssd-plot/missing_order.png b/tests/testthat/_snaps/ssd-plot/missing_order.png index ebcb4d28b..cfc2b0520 100644 Binary files a/tests/testthat/_snaps/ssd-plot/missing_order.png and b/tests/testthat/_snaps/ssd-plot/missing_order.png differ diff --git a/tests/testthat/_snaps/ssd-plot/no_ribbon.png b/tests/testthat/_snaps/ssd-plot/no_ribbon.png index 7f3d28516..d48a1ef92 100644 Binary files a/tests/testthat/_snaps/ssd-plot/no_ribbon.png and b/tests/testthat/_snaps/ssd-plot/no_ribbon.png differ diff --git a/tests/testthat/_snaps/ssd-plot/ribbon.png b/tests/testthat/_snaps/ssd-plot/ribbon.png index 7494b3507..fcbb8191f 100644 Binary files a/tests/testthat/_snaps/ssd-plot/ribbon.png and b/tests/testthat/_snaps/ssd-plot/ribbon.png differ diff --git a/tests/testthat/_snaps/ssd-plot/suffix.png b/tests/testthat/_snaps/ssd-plot/suffix.png new file mode 100644 index 000000000..18b684e25 Binary files /dev/null and b/tests/testthat/_snaps/ssd-plot/suffix.png differ diff --git a/tests/testthat/_snaps/tidy/tidy.csv b/tests/testthat/_snaps/tidy/tidy.csv index f6214cea2..dd68d3516 100644 --- a/tests/testthat/_snaps/tidy/tidy.csv +++ b/tests/testthat/_snaps/tidy/tidy.csv @@ -6,11 +6,11 @@ lgumbel,scalelog,1.23224,0.17302 llogis,locationlog,2.62628,0.248257 llogis,scalelog,0.740426,0.114375 lnorm,meanlog,2.56165,0.234629 -lnorm,sdlog,1.24154,0.165907 -lnorm_lnorm,meanlog1,0.949487,0.318001 -lnorm_lnorm,meanlog2,3.20108,0.25292 -lnorm_lnorm,pmix,0.283994,0.123402 -lnorm_lnorm,sdlog1,0.554514,0.212453 -lnorm_lnorm,sdlog2,0.768824,0.193734 +lnorm,sdlog,1.24154,0.165908 +lnorm_lnorm,meanlog1,0.949483,0.318008 +lnorm_lnorm,meanlog2,3.20102,0.252952 +lnorm_lnorm,pmix,0.283968,0.123406 +lnorm_lnorm,sdlog1,0.554465,0.212427 +lnorm_lnorm,sdlog2,0.768862,0.193762 weibull,scale,23.514,4.85516 weibull,shape,0.9661,0.14542 diff --git a/tests/testthat/_snaps/weighted/hc2.csv b/tests/testthat/_snaps/weighted/hc2.csv index a961ca8ee..898fd8590 100644 --- a/tests/testthat/_snaps/weighted/hc2.csv +++ b/tests/testthat/_snaps/weighted/hc2.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.05,1.68117,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/weighted/hcall.csv b/tests/testthat/_snaps/weighted/hcall.csv index a961ca8ee..898fd8590 100644 --- a/tests/testthat/_snaps/weighted/hcall.csv +++ b/tests/testthat/_snaps/weighted/hcall.csv @@ -1,2 +1,2 @@ dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.68118,NA,NA,NA,1,parametric,0,NA,numeric(0) +average,0.05,1.68117,NA,NA,NA,1,parametric,0,NA,numeric(0) diff --git a/tests/testthat/_snaps/zzz-unstable.md b/tests/testthat/_snaps/zzz-unstable.md deleted file mode 100644 index 2f7875b84..000000000 --- a/tests/testthat/_snaps/zzz-unstable.md +++ /dev/null @@ -1,187 +0,0 @@ -# hc multi_ci lnorm default 100 - - Code - hc_average - Output - # A tibble: 1 x 11 - dist proportion est se lcl ucl wt method nboot pboot samples - - 1 average 0.05 1.24 0.743 0.479 3.19 1 parametr~ 100 1 - ---- - - Code - hc_multi - Output - # A tibble: 1 x 11 - dist proportion est se lcl ucl wt method nboot pboot samples - - 1 average 0.05 1.26 0.734 0.456 3.25 1 parametr~ 100 1 - -# hp multi_ci lnorm default 100 - - Code - hp_average - Output - # A tibble: 1 x 11 - dist conc est se lcl ucl wt method nboot pboot samples - > - 1 average 1 3.90 2.32 0.738 9.57 1 parametric 100 1 - ---- - - Code - hp_multi - Output - # A tibble: 1 x 11 - dist conc est se lcl ucl wt method nboot pboot samples - > - 1 average 1 3.90 2.46 0.347 9.21 1 parametric 100 1 - -# sgompertz completely unstable! - - Code - set.seed(94) - ssdtools:::sgompertz(data) - Output - $log_location - [1] -0.8105617 - - $log_shape - [1] -300.8251 - - Code - set.seed(99) - ssdtools:::sgompertz(data) - Output - $log_location - [1] -0.9662517 - - $log_shape - [1] -2.602139 - - -# sgompertz with initial values still unstable! - - Code - set.seed(94) - ssdtools:::sgompertz(sdata) - Output - $log_location - [1] -0.8105617 - - $log_shape - [1] -300.8251 - - Code - set.seed(94) - ssdtools:::sgompertz(sdata, pars) - Output - $log_location - [1] 4.078373 - - $log_shape - [1] -2989.932 - - Code - set.seed(99) - ssdtools:::sgompertz(sdata) - Output - $log_location - [1] -0.9662517 - - $log_shape - [1] -2.602139 - - Code - set.seed(99) - ssdtools:::sgompertz(sdata, pars) - Output - $log_location - [1] 3.433594 - - $log_shape - [1] -104.2544 - - Code - set.seed(100) - ssdtools:::sgompertz(sdata, pars) - Output - $log_location - [1] 3.81493 - - $log_shape - [1] -669.3178 - - -# sgompertz cant even fit some values - - Code - ssdtools:::sgompertz(data.frame(left = x, right = x)) - Condition - Error in `lm.fit()`: - ! NA/NaN/Inf in 'y' - Code - ssdtools:::sgompertz(data.frame(left = rep(x, 10), right = rep(x, 10))) - Condition - Error in `lm.fit()`: - ! NA/NaN/Inf in 'y' - Code - ssdtools:::sgompertz(data.frame(left = x, right = x), pars = c(12800, 1)) - Condition - Error in `checkwz()`: - ! NAs found in the working weights variable 'wz' - Code - ssdtools:::sgompertz(data.frame(left = x / 12800, right = x / 12800)) - Condition - Error in `checkwz()`: - ! Some elements in the working weights variable 'wz' are not finite - -# sgompertz cant even initialize lots of values - - Code - set.seed(99) - ssdtools:::sgompertz(data.frame(left = x, right = x)) - Condition - Error in `checkwz()`: - ! Some elements in the working weights variable 'wz' are not finite - Code - set.seed(99) - ssd_fit_dists(data.frame(Conc = x), dists = "gompertz") - Condition - Warning: - Distribution 'gompertz' failed to fit (try rescaling data): Error in checkwz(wz, M = M, trace = trace, wzepsilon = control$wzepsilon) : - Some elements in the working weights variable 'wz' are not finite - . - Error: - ! All distributions failed to fit. - Code - set.seed(100) - ssdtools:::sgompertz(data.frame(left = x, right = x)) - Output - $log_location - [1] -0.9424722 - - $log_shape - [1] -128.6335 - - Code - set.seed(100) - ssd_fit_dists(data.frame(Conc = x), dists = "gompertz") - Condition - Warning: - Distribution 'gompertz' failed to fit (try rescaling data): Error in optim(par, fn, gr, method = method, lower = lower, upper = upper, : - L-BFGS-B needs finite values of 'fn' - . - Error: - ! All distributions failed to fit. - Code - set.seed(131) - ssd_fit_dists(data.frame(Conc = x), dists = "gompertz") - Output - Distribution 'gompertz' - location 0.0256225 - shape 3.35465e-14 - - Parameters estimated from 1000 rows of data. - diff --git a/tests/testthat/_snaps/zzz-unstable/boron_cens_pred_ribbon.png b/tests/testthat/_snaps/zzz-unstable/boron_cens_pred_ribbon.png deleted file mode 100644 index 347c3f110..000000000 Binary files a/tests/testthat/_snaps/zzz-unstable/boron_cens_pred_ribbon.png and /dev/null differ diff --git a/tests/testthat/_snaps/zzz-unstable/geoms_all.png b/tests/testthat/_snaps/zzz-unstable/geoms_all.png deleted file mode 100644 index 6fbcdb617..000000000 Binary files a/tests/testthat/_snaps/zzz-unstable/geoms_all.png and /dev/null differ diff --git a/tests/testthat/_snaps/zzz-unstable/hc_err.csv b/tests/testthat/_snaps/zzz-unstable/hc_err.csv deleted file mode 100644 index 06108275e..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hc_err.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,0.93468,0.329232,0.839434,2.35117,1,parametric,100,0.98,numeric(0) diff --git a/tests/testthat/_snaps/zzz-unstable/hc_err_na.csv b/tests/testthat/_snaps/zzz-unstable/hc_err_na.csv deleted file mode 100644 index d781d10e7..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hc_err_na.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,0.93468,NA,NA,NA,1,parametric,100,0.95,numeric(0) diff --git a/tests/testthat/_snaps/zzz-unstable/hc_nonpara.csv b/tests/testthat/_snaps/zzz-unstable/hc_nonpara.csv deleted file mode 100644 index 3801f543d..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hc_nonpara.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.42624,0.0298622,1.37466,1.45809,1,non-parametric,10,1,"c(`000000001_lnorm` = 1.44298, `000000002_lnorm` = 1.3734, `000000003_lnorm` = 1.43012, `000000004_lnorm` = 1.39918, `000000005_lnorm` = 1.40569, `000000006_lnorm` = 1.39248, `000000007_lnorm` = 1.379, `000000008_lnorm` = 1.43881, `000000009_lnorm` = 1.43309, `000000010_lnorm` = 1.46248)" diff --git a/tests/testthat/_snaps/zzz-unstable/hc_notallestimates.csv b/tests/testthat/_snaps/zzz-unstable/hc_notallestimates.csv deleted file mode 100644 index 2e365f0a1..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hc_notallestimates.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.649,0.460596,1.03043,2.45733,1,parametric,10,1,"c(`000000001_multi` = 1.61774, `000000002_multi` = 2.30791, `000000003_multi` = 1.80506, `000000004_multi` = 1.97792, `000000005_multi` = 1.40445, `000000006_multi` = 2.50071, `000000007_multi` = 1.8864, `000000008_multi` = 0.936848, `000000009_multi` = 1.67856, `000000010_multi` = 1.35275)" diff --git a/tests/testthat/_snaps/zzz-unstable/hc_para.csv b/tests/testthat/_snaps/zzz-unstable/hc_para.csv deleted file mode 100644 index 8deb0e31e..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hc_para.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,proportion,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,0.05,1.42624,0.0143216,1.39428,1.43828,1,parametric,10,1,"c(`000000001_lnorm` = 1.39139, `000000002_lnorm` = 1.42044, `000000003_lnorm` = 1.41276, `000000004_lnorm` = 1.42325, `000000005_lnorm` = 1.429, `000000006_lnorm` = 1.40423, `000000007_lnorm` = 1.42847, `000000008_lnorm` = 1.44097, `000000009_lnorm` = 1.40688, `000000010_lnorm` = 1.4204)" diff --git a/tests/testthat/_snaps/zzz-unstable/hp_err.csv b/tests/testthat/_snaps/zzz-unstable/hp_err.csv deleted file mode 100644 index 7f4b3b688..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hp_err.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,9.18263,5.4495,2.61999e-42,21.7655,1,parametric,100,0.98,numeric(0) diff --git a/tests/testthat/_snaps/zzz-unstable/hp_err_na.csv b/tests/testthat/_snaps/zzz-unstable/hp_err_na.csv deleted file mode 100644 index eb8465c82..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hp_err_na.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,9.18263,NA,NA,NA,1,parametric,100,0.95,numeric(0) diff --git a/tests/testthat/_snaps/zzz-unstable/hp_nonpara.csv b/tests/testthat/_snaps/zzz-unstable/hp_nonpara.csv deleted file mode 100644 index e83f889d4..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hp_nonpara.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,2.27851,0.129041,2.14227,2.50138,1,non-parametric,10,1,"c(`000000001_lnorm` = 2.1973, `000000002_lnorm` = 2.50271, `000000003_lnorm` = 2.26204, `000000004_lnorm` = 2.39124, `000000005_lnorm` = 2.36897, `000000006_lnorm` = 2.41454, `000000007_lnorm` = 2.4968, `000000008_lnorm` = 2.21685, `000000009_lnorm` = 2.27042, `000000010_lnorm` = 2.1263)" diff --git a/tests/testthat/_snaps/zzz-unstable/hp_para.csv b/tests/testthat/_snaps/zzz-unstable/hp_para.csv deleted file mode 100644 index a03f21c19..000000000 --- a/tests/testthat/_snaps/zzz-unstable/hp_para.csv +++ /dev/null @@ -1,2 +0,0 @@ -dist,conc,est,se,lcl,ucl,wt,method,nboot,pboot,samples -average,1,2.27851,0.0639508,2.22229,2.4136,1,parametric,10,1,"c(`000000001_lnorm` = 2.42342, `000000002_lnorm` = 2.30825, `000000003_lnorm` = 2.3271, `000000004_lnorm` = 2.26583, `000000005_lnorm` = 2.25792, `000000006_lnorm` = 2.37977, `000000007_lnorm` = 2.27654, `000000008_lnorm` = 2.21194, `000000009_lnorm` = 2.36816, `000000010_lnorm` = 2.30299)" diff --git a/tests/testthat/_snaps/zzz-unstable/plot_anonb.png b/tests/testthat/_snaps/zzz-unstable/plot_anonb.png deleted file mode 100644 index 6f883989c..000000000 Binary files a/tests/testthat/_snaps/zzz-unstable/plot_anonb.png and /dev/null differ diff --git a/tests/testthat/_snaps/zzz-unstable/tidy_anonb.csv b/tests/testthat/_snaps/zzz-unstable/tidy_anonb.csv deleted file mode 100644 index 595a8eacf..000000000 --- a/tests/testthat/_snaps/zzz-unstable/tidy_anonb.csv +++ /dev/null @@ -1,6 +0,0 @@ -dist,term,est,se -lnorm_lnorm,meanlog1,2.0772,0.387975 -lnorm_lnorm,meanlog2,4.78232,0.0329899 -lnorm_lnorm,pmix,0.802558,0.12696 -lnorm_lnorm,sdlog1,1.08775,0.27761 -lnorm_lnorm,sdlog2,0.0460582,0.0231779 diff --git a/tests/testthat/_snaps/zzz-unstable/tidy_gamma_unstable.csv b/tests/testthat/_snaps/zzz-unstable/tidy_gamma_unstable.csv deleted file mode 100644 index b4ba95705..000000000 --- a/tests/testthat/_snaps/zzz-unstable/tidy_gamma_unstable.csv +++ /dev/null @@ -1,5 +0,0 @@ -dist,term,est,se -lnorm,meanlog,0.02,1 -lnorm,sdlog,0.03,2 -gamma,scale,0.001,0.04 -gamma,shape,900,30000 diff --git a/tests/testthat/_snaps/zzz-unstable/tidy_lnorm_lnorm_uni1000.csv b/tests/testthat/_snaps/zzz-unstable/tidy_lnorm_lnorm_uni1000.csv deleted file mode 100644 index c7285e9c4..000000000 --- a/tests/testthat/_snaps/zzz-unstable/tidy_lnorm_lnorm_uni1000.csv +++ /dev/null @@ -1,6 +0,0 @@ -dist,term,est,se -lnorm_lnorm,meanlog1,2.44,0.00994 -lnorm_lnorm,meanlog2,2.44,7.13e-4 -lnorm_lnorm,pmix,0.0353,0.0649 -lnorm_lnorm,sdlog1,0.0377,0.016 -lnorm_lnorm,sdlog2,0.0181,0.00102 diff --git a/tests/testthat/_snaps/zzz-unstable/tidy_lnorm_lnorm_uni1000_3n.csv b/tests/testthat/_snaps/zzz-unstable/tidy_lnorm_lnorm_uni1000_3n.csv deleted file mode 100644 index e467f3300..000000000 --- a/tests/testthat/_snaps/zzz-unstable/tidy_lnorm_lnorm_uni1000_3n.csv +++ /dev/null @@ -1,6 +0,0 @@ -dist,term,est,se -lnorm_lnorm,meanlog1,2.4389,0.00991542 -lnorm_lnorm,meanlog2,2.44216,7.12844e-4 -lnorm_lnorm,pmix,0.0353095,0.0648397 -lnorm_lnorm,sdlog1,0.0376977,0.0159742 -lnorm_lnorm,sdlog2,0.018095,0.00101426 diff --git a/tests/testthat/test-autoplot.R b/tests/testthat/test-autoplot.R index aee1ec9b6..1c65cea4a 100644 --- a/tests/testthat/test-autoplot.R +++ b/tests/testthat/test-autoplot.R @@ -29,3 +29,13 @@ test_that("autoplot", { ) expect_snapshot_plot(autoplot(fits, xlab = "New"), "autoplot_rescale") }) + +test_that("autoplot language", { + data <- ssddata::ccme_boron + data$Conc <- data$Conc * 100 + fits <- ssd_fit_dists(data, + dists = c("lnorm") + ) + expect_snapshot_plot(autoplot(fits, big.mark = "!!"), "suffix") + expect_snapshot_plot(autoplot(fits, big.mark = ":"), "autoplot_bigmark") +}) diff --git a/tests/testthat/test-censor.R b/tests/testthat/test-censor.R index b877da807..4ca63ecea 100644 --- a/tests/testthat/test-censor.R +++ b/tests/testthat/test-censor.R @@ -12,17 +12,39 @@ # See the License for the specific language governing permissions and # limitations under the License. -test_that("censor", { - rlang::local_options(lifecycle_verbosity = "quiet") +test_that("ssd_censor only add right by default", { + data <- ssddata::ccme_boron + data$right <- data$Conc + expect_identical(ssd_censor_data(ssddata::ccme_boron), data) +}) - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") +test_that("ssd_censor use existing right", { + data <- ssddata::ccme_boron + data$right2 <- data$Conc + expect_identical(ssd_censor_data(data, right = "right2"), data) +}) - expect_false(is_censored(fits)) +test_that("ssd_censor use existing right and left", { + data <- ssddata::ccme_boron + data$right2 <- data$Conc + data$left3 <- data$Conc + expect_identical(ssd_censor_data(data, left = "left3", right = "right2"), data) +}) - # need to have example censored data +test_that("ssd_censor no rows", { data <- ssddata::ccme_boron - data$Right <- data$Conc - data$Conc <- 0 - fits <- ssd_fit_dists(data, right = "Right", dists = c("gamma", "llogis", "lnorm")) - expect_true(is_censored(fits)) + data$right <- data$Conc + expect_identical(ssd_censor_data(ssddata::ccme_boron[0,]), data[0,]) +}) + +test_that("ssd_censor c(2.5, Inf)", { + expect_snapshot_data(ssd_censor_data(ssddata::ccme_boron, censoring = c(2.5, Inf)), "boron_25") +}) + +test_that("ssd_censor c(0, 10)", { + expect_snapshot_data(ssd_censor_data(ssddata::ccme_boron, censoring = c(0, 10)), "boron_10") +}) + +test_that("ssd_censor c(2.5, 10)", { + expect_snapshot_data(ssd_censor_data(ssddata::ccme_boron, censoring = c(2.5, 10)), "boron_2510") }) diff --git a/tests/testthat/test-censored.R b/tests/testthat/test-censored.R index a80c14e29..e4a580382 100644 --- a/tests/testthat/test-censored.R +++ b/tests/testthat/test-censored.R @@ -68,3 +68,18 @@ test_that("ssd_is_censored TRUE fitdists censored", { fits <- ssd_fit_dists(data, right = "Right", dists = c("gamma", "llogis", "lnorm")) expect_true(ssd_is_censored(fits)) }) + +test_that("ssd_is_censored TRUE fitdists multiple", { + data <- ssddata::ccme_boron + data$right <- data$Conc + data$Conc[c(3,6,8)] <- NA + + fits <- ssd_fit_dists(data, dists = "lnorm", right = "right") + expect_true(ssd_is_censored(fits)) +}) + + +test_that("censor", { + fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") + expect_defunct(is_censored(fits)) +}) diff --git a/tests/testthat/test-data.R b/tests/testthat/test-data.R index b93d4da14..e681aa48a 100644 --- a/tests/testthat/test-data.R +++ b/tests/testthat/test-data.R @@ -20,19 +20,6 @@ test_that("boron stable", { expect_snapshot_data(tidy, "boron_stable") }) -test_that("boron unstable", { - dists <- ssd_dists(bcanz = FALSE) - set.seed(50) - expect_warning( - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = dists), - "Distribution 'burrIII3' failed to fit" - ) - - tidy <- tidy(fits) - expect_s3_class(tidy, "tbl_df") - expect_snapshot_data(tidy, "boron_unstable") -}) - test_that("dist_data", { expect_snapshot_data(ssdtools::dist_data, "dist_data") }) diff --git a/tests/testthat/test-estimates.R b/tests/testthat/test-estimates.R index 5c920b0d1..a3ef6d4f9 100644 --- a/tests/testthat/test-estimates.R +++ b/tests/testthat/test-estimates.R @@ -22,7 +22,7 @@ test_that("estimates", { test_that("estimates all_estimates = TRUE", { fits <- ssd_fit_dists(ssddata::ccme_boron) - + estimates <- estimates(fits, all_estimates = TRUE) expect_type(estimates, "list") expect_snapshot_output(print(estimates)) diff --git a/tests/testthat/test-exposure.R b/tests/testthat/test-exposure.R index f6f22d649..5d411c425 100644 --- a/tests/testthat/test-exposure.R +++ b/tests/testthat/test-exposure.R @@ -16,7 +16,7 @@ test_that("exposure fitdist", { fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(1) - expect_equal(ssd_exposure(fits), 0.0554387492913971, tolerance = 1e-6) + expect_equal(ssd_exposure(fits), 0.0554387492913971, tolerance = 1e-5) }) test_that("exposure different mean", { @@ -37,7 +37,7 @@ test_that("exposure multiple distributions", { fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(1) - expect_equal(ssd_exposure(fits), 0.0663588247125051, tolerance = 1e-6) + expect_equal(ssd_exposure(fits), 0.0663588247125051, tolerance = 1e-5) }) test_that("exposure somewhat sensitive to rescaling", { diff --git a/tests/testthat/test-fit.R b/tests/testthat/test-fit.R index 89a016de6..3a4b95db7 100644 --- a/tests/testthat/test-fit.R +++ b/tests/testthat/test-fit.R @@ -66,8 +66,8 @@ test_that("ssd_fit_dists not happy with left as left by default", { test_that("ssd_fit_dists returns object class fitdists", { fit <- ssd_fit_dists(ssddata::ccme_boron, - dists = c("lnorm", "llogis"), - rescale = FALSE + dists = c("lnorm", "llogis"), + rescale = FALSE ) expect_s3_class(fit, "fitdists") }) @@ -217,7 +217,7 @@ test_that("ssd_fit_dists warns to rescale data", { test_that("ssd_fit_dists doesn't warns to rescale data if already rescaled", { data <- data.frame(Conc = rep(2, 6)) expect_error(expect_warning(ssd_fit_dists(data, rescale = TRUE, dist = "lnorm"), - regexp = "^Distribution 'lnorm' failed to fit:" + regexp = "^Distribution 'lnorm' failed to fit:" )) }) @@ -225,14 +225,14 @@ test_that("ssd_fit_dists warns of optimizer convergence code error", { data <- ssddata::ccme_boron expect_error( expect_warning(ssd_fit_dists(data, control = list(maxit = 1), dist = "lnorm"), - regexp = "^Distribution 'lnorm' failed to converge \\(try rescaling data\\): Iteration limit maxit reach \\(try increasing the maximum number of iterations in control\\)\\.$" + regexp = "^Distribution 'lnorm' failed to converge \\(try rescaling data\\): Iteration limit maxit reach \\(try increasing the maximum number of iterations in control\\)\\.$" ) ) }) test_that("ssd_fit_dists estimates for ssddata::ccme_boron on bcanz dists", { fits <- ssd_fit_dists(ssddata::ccme_boron, rescale = TRUE) - + tidy <- tidy(fits) expect_s3_class(tidy, "tbl") expect_snapshot_data(tidy, "tidy_stable_rescale") @@ -240,10 +240,10 @@ test_that("ssd_fit_dists estimates for ssddata::ccme_boron on bcanz dists", { test_that("ssd_fit_dists not reorder", { fit <- ssd_fit_dists(ssddata::ccme_boron, - dists = c("lnorm", "llogis"), - rescale = FALSE + dists = c("lnorm", "llogis"), + rescale = FALSE ) - + expect_identical(npars(fit), c(lnorm = 2L, llogis = 2L)) expect_equal(logLik(fit), c(lnorm = -117.514216489547, llogis = -118.507435324581)) }) @@ -253,7 +253,7 @@ test_that("ssd_fit_dists equal weights no effect", { data <- ssddata::ccme_boron data$weight <- rep(2, nrow(data)) fits_weight <- ssd_fit_dists(data) - + expect_equal(estimates(fits_weight), estimates(fits)) }) @@ -261,77 +261,74 @@ test_that("ssd_fit_dists computable = TRUE allows for fits without standard erro data <- ssddata::ccme_boron data$Other <- data$Conc data$Conc <- data$Conc / max(data$Conc) - + expect_warning( - expect_warning( - ssd_fit_dists(data, right = "Other", rescale = FALSE), - "^Distribution 'lnorm_lnorm' failed to compute standard errors \\(try rescaling data\\)\\.$" - ), - "^Distribution 'lgumbel' failed to compute standard errors \\(try rescaling data\\)\\.$" + ssd_fit_dists(data, right = "Other", rescale = FALSE, at_boundary_ok = FALSE), + "^Distribution 'lnorm_lnorm' failed to fit \\(try rescaling data\\)" ) - + set.seed(102) - fits <- ssd_fit_dists(data, right = "Other", dists = c("lgumbel", "llogis", "lnorm", "lnorm_lnorm"), rescale = FALSE, computable = FALSE, at_boundary_ok = TRUE) - + fits <- ssd_fit_dists(data, right = "Other", dists = c("lgumbel", "llogis", "lnorm"), rescale = FALSE, at_boundary_ok = TRUE) + tidy <- tidy(fits) expect_s3_class(tidy, "tbl") - expect_snapshot_data(tidy, "tidy_stable_computable", digits = 3) + expect_snapshot_data(tidy, "tidy_stable_computable", digits = 6) }) test_that("ssd_fit_dists works with slightly censored data", { data <- ssddata::ccme_boron - + data$right <- data$Conc * 2 data$Conc <- data$Conc * 0.5 - + fits <- ssd_fit_dists(data, dists = "lnorm", right = "right", rescale = FALSE) - + tidy <- tidy(fits) - + expect_equal(tidy$est, c(2.56052524750529, 1.17234562953404), tolerance = 1e-06) - expect_equal(tidy$se, c(0.234063281091344, 0.175423555900586), tolerance = 1e-06) + expect_equal(tidy$se, c(0.234063281091344, 0.175423555900586), tolerance = 1e-05) }) test_that("ssd_fit_dists accepts 0 for left censored data", { data <- ssddata::ccme_boron - + data$right <- data$Conc data$Conc[1] <- 0 - + fits <- ssd_fit_dists(data, dists = "lnorm", right = "right", rescale = FALSE) - + tidy <- tidy(fits) - + expect_equal(tidy$est, c(2.54093502870563, 1.27968456496323), tolerance = 1e-06) expect_equal(tidy$se, c(0.242558677928804, 0.175719927258761), tolerance = 1e-06) }) test_that("ssd_fit_dists gives same values with zero and missing left values", { data <- ssddata::ccme_boron - + data$right <- data$Conc data$Conc[1] <- 0 - + fits0 <- ssd_fit_dists(data, dists = "lnorm", right = "right") - + data$Conc[1] <- NA - + fitsna <- ssd_fit_dists(data, dists = "lnorm", right = "right") - + expect_equal(tidy(fits0), tidy(fitsna)) }) test_that("ssd_fit_dists works with right censored data", { data <- ssddata::ccme_boron - + data$right <- data$Conc data$right[1] <- Inf - + expect_error( fits <- ssd_fit_dists(data, dists = "lnorm", right = "right"), "^Distributions cannot currently be fitted to right censored data\\.$" ) - + # # tidy <- tidy(fits) # @@ -341,22 +338,22 @@ test_that("ssd_fit_dists works with right censored data", { test_that("ssd_fit_dists gives same answer for missing versus Inf right", { data <- ssddata::ccme_boron - + data$right <- data$Conc data$right[1] <- Inf - + expect_error( fits <- ssd_fit_dists(data, dists = "lnorm", right = "right"), "^Distributions cannot currently be fitted to right censored data\\.$" ) - + data$right[1] <- NA - + expect_error( fits <- ssd_fit_dists(data, dists = "lnorm", right = "right"), "^Distributions cannot currently be fitted to right censored data\\.$" ) - + # fits0 <- ssd_fit_dists(data, dists = "lnorm", right = "right") # # data$right[1] <- NA @@ -366,14 +363,14 @@ test_that("ssd_fit_dists gives same answer for missing versus Inf right", { # expect_equal(tidy(fits0), tidy(fitsna)) }) -test_that("ssd_fit_dists min_pmix", { +test_that("ssd_fit_dists min_pmix at_boundary_ok FALSE", { set.seed(99) conc <- ssd_rlnorm_lnorm(1000, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.1) data <- data.frame(Conc = conc) fits <- ssd_fit_dists(data, dists = c("lnorm_lnorm", "llogis_llogis"), min_pmix = 0.1) tidy <- tidy(fits) expect_error( - expect_warning(expect_warning(ssd_fit_dists(data, dists = c("lnorm_lnorm", "llogis_llogis"), min_pmix = 0.11))), + expect_warning(expect_warning(ssd_fit_dists(data, dists = c("lnorm_lnorm", "llogis_llogis"), min_pmix = 0.11, at_boundary_ok = FALSE))), "All distributions failed to fit." ) expect_snapshot_data(tidy, "min_pmix5") @@ -391,13 +388,14 @@ test_that("ssd_fit_dists min_pmix", { test_that("ssd_fit_dists at_boundary_ok message", { set.seed(99) expect_warning( - ssd_fit_dists(ssddata::ccme_boron, dists = c("lnorm", "burrIII3")), + ssd_fit_dists(ssddata::ccme_boron, dists = c("lnorm", "burrIII3"), at_boundary_ok = FALSE), "one or more parameters at boundary[.]$" ) expect_warning( ssd_fit_dists(ssddata::ccme_boron, - dists = c("lnorm", "burrIII3"), - at_boundary_ok = TRUE + dists = c("lnorm", "burrIII3"), + at_boundary_ok = TRUE, + computable = TRUE ), "failed to compute standard errors \\(try rescaling data\\)\\.$" ) @@ -410,18 +408,16 @@ test_that("ssd_fit_dists bcanz with anon_e", { }) test_that("ssd_fit_dists unstable with anon_e", { - expect_warning(expect_warning( - fit <- ssd_fit_dists(ssddata::anon_e, dists = ssd_dists(bcanz = FALSE)), - "burrIII3" - ), "gompertz") + expect_warning( + fit <- ssd_fit_dists(ssddata::anon_e, dists = ssd_dists(bcanz = FALSE)), "gompertz") tidy <- tidy(fit) expect_snapshot_data(tidy, "tidy_unstable_anon_e") }) test_that("ssd_fit_dists works min_pmix = 0.5 and at_boundary_ok = TRUE and computable = FALSE", { fit <- ssd_fit_dists(ssddata::ccme_boron, - dists = c("lnorm", "lnorm_lnorm"), min_pmix = 0.5, - at_boundary_ok = TRUE, computable = FALSE + dists = c("lnorm", "lnorm_lnorm"), min_pmix = 0.5, + at_boundary_ok = TRUE, computable = FALSE ) tidy <- tidy(fit) expect_snapshot_data(tidy, "min_pmix_05") diff --git a/tests/testthat/test-ggplot.R b/tests/testthat/test-ggplot.R index 934e631f7..44eb2b3ba 100644 --- a/tests/testthat/test-ggplot.R +++ b/tests/testthat/test-ggplot.R @@ -28,27 +28,23 @@ test_that("scale_color_ssd is ggproto", { }) test_that("stat_ssd deprecated", { - lifecycle::expect_deprecated(ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + + lifecycle::expect_defunct(ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + stat_ssd()) }) test_that("plot stat_ssd", { - withr::local_options(lifecycle_verbosity = "quiet") - gp <- ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + - stat_ssd() - expect_snapshot_plot(gp, "stat_ssd") + expect_defunct(ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + + stat_ssd()) }) test_that("geom_ssd deprecated", { - lifecycle::expect_deprecated(ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + + expect_defunct(ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + geom_ssd()) }) test_that("plot geom_ssd", { - withr::local_options(lifecycle_verbosity = "quiet") - gp <- ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + - geom_ssd() - expect_snapshot_plot(gp, "geom_ssd") + expect_defunct(ggplot2::ggplot(ssddata::ccme_boron, ggplot2::aes(x = Conc)) + + geom_ssd()) }) test_that("plot geom_ssdpoint", { diff --git a/tests/testthat/test-gof.R b/tests/testthat/test-gof.R index 1620eef56..628243481 100644 --- a/tests/testthat/test-gof.R +++ b/tests/testthat/test-gof.R @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -test_that("gof", { +test_that("gof paper also", { fits <- ssd_fit_dists(ssddata::ccme_boron) gof_statistic <- ssd_gof(fits) @@ -25,13 +25,13 @@ test_that("gof", { test_that("gof censored same parameters2", { data <- ssddata::ccme_boron data$right <- data$Conc - data$Conc[c(3,6,8)] <- NA + data$Conc[c(3, 6, 8)] <- NA fits <- ssd_fit_dists(data, right = "right", dists = c("llogis", "lnorm")) - + gof_statistic <- ssd_gof(fits) expect_snapshot_data(gof_statistic, "gof_statistic2") - + gof <- ssd_gof(fits, pvalue = TRUE) expect_snapshot_data(gof, "gof2") }) @@ -39,13 +39,13 @@ test_that("gof censored same parameters2", { test_that("gof censored same parameters5", { data <- ssddata::ccme_boron data$right <- data$Conc - data$Conc[c(3,6,8)] <- NA - + data$Conc[c(3, 6, 8)] <- NA + fits <- ssd_fit_dists(data, right = "right", dists = c("llogis_llogis", "lnorm_lnorm")) - + gof_statistic <- ssd_gof(fits) expect_snapshot_data(gof_statistic, "gof_statistic5") - + gof <- ssd_gof(fits, pvalue = TRUE) expect_snapshot_data(gof, "gof5") }) @@ -53,13 +53,13 @@ test_that("gof censored same parameters5", { test_that("gof censored same diff parameters", { data <- ssddata::ccme_boron data$right <- data$Conc - data$Conc[c(3,6,8)] <- NA - + data$Conc[c(3, 6, 8)] <- NA + fits <- ssd_fit_dists(data, right = "right", dists = c("llogis", "lnorm_lnorm")) - + gof_statistic <- ssd_gof(fits) expect_snapshot_data(gof_statistic, "gof_statisticn") - + gof <- ssd_gof(fits, pvalue = TRUE) expect_snapshot_data(gof, "gofn") }) diff --git a/tests/testthat/test-gompertz-deprecated.R b/tests/testthat/test-gompertz-deprecated.R index 8dab868b7..37ad26b9b 100644 --- a/tests/testthat/test-gompertz-deprecated.R +++ b/tests/testthat/test-gompertz-deprecated.R @@ -13,101 +13,17 @@ # limitations under the License. test_that("dgompertz extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(dgompertz(numeric(0)), numeric(0)) - expect_identical(dgompertz(NA), NA_real_) - expect_identical(dgompertz(NaN), NaN) - expect_identical(dgompertz(0), 1) - expect_equal(dgompertz(1), 0.487589298719261) - expect_equal(dgompertz(1, log = TRUE), log(dgompertz(1))) - expect_identical(dgompertz(0), 1) - expect_identical(dgompertz(-Inf), 0) - expect_identical(dgompertz(Inf), 0) - expect_identical( - dgompertz(c(NA, NaN, 0, Inf, -Inf)), - c(dgompertz(NA), dgompertz(NaN), dgompertz(0), dgompertz(Inf), dgompertz(-Inf)) - ) - expect_equal( - dgompertz(1:2, llocation = 1:2, lshape = 3:4), - c(dgompertz(1, 1, 3), dgompertz(2, 2, 4)) - ) - expect_equal( - dgompertz(1:2, llocation = c(1, NA), lshape = 3:4), - c(dgompertz(1, 1, 3), NA) - ) + expect_defunct(dgompertz(numeric(0))) }) test_that("pgompertz extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(pgompertz(numeric(0)), numeric(0)) - expect_identical(pgompertz(NA), NA_real_) - expect_identical(pgompertz(NaN), NaN) - expect_identical(pgompertz(0), 0) - expect_equal(pgompertz(1), 0.820625921265983) - expect_equal(pgompertz(1, log.p = TRUE), log(pgompertz(1))) - expect_equal(pgompertz(1, lower.tail = FALSE), 1 - pgompertz(1)) - expect_equal(pgompertz(1, lower.tail = FALSE, log.p = TRUE), log(1 - pgompertz(1))) - expect_identical(pgompertz(0), 0) - expect_identical(pgompertz(-Inf), 0) - expect_identical(pgompertz(Inf), 1) - expect_identical( - pgompertz(c(NA, NaN, 0, Inf, -Inf)), - c(pgompertz(NA), pgompertz(NaN), pgompertz(0), pgompertz(Inf), pgompertz(-Inf)) - ) - expect_equal( - pgompertz(1:2, llocation = 1:2, lshape = 3:4), - c(pgompertz(1, 1, 3), pgompertz(2, 2, 4)) - ) - expect_equal( - pgompertz(1:2, llocation = c(1, NA), lshape = 3:4), - c(pgompertz(1, 1, 3), NA) - ) + expect_defunct(pgompertz(numeric(0))) }) test_that("qgompertz extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(qgompertz(numeric(0)), numeric(0)) - expect_identical(qgompertz(NA), NA_real_) - expect_identical(qgompertz(NaN), NaN) - expect_identical(qgompertz(0), 0) - expect_identical(qgompertz(1), Inf) - expect_equal(qgompertz(0.75), 0.869741686191944) - expect_equal(qgompertz(0.75, log.p = TRUE), NaN) - expect_equal(qgompertz(log(0.75), log.p = TRUE), qgompertz(0.75)) - expect_equal(qgompertz(0.75, lower.tail = FALSE), qgompertz(0.25)) - expect_equal(qgompertz(log(0.75), lower.tail = FALSE, log.p = TRUE), qgompertz(0.25)) - expect_identical(qgompertz(0), 0) - expect_identical(qgompertz(-Inf), NaN) - expect_identical(qgompertz(Inf), NaN) - expect_identical( - qgompertz(c(NA, NaN, 0, Inf, -Inf)), - c(qgompertz(NA), qgompertz(NaN), qgompertz(0), qgompertz(Inf), qgompertz(-Inf)) - ) - expect_equal( - qgompertz(1:2, llocation = 1:2, lshape = 3:4), - c(qgompertz(1, 1, 3), qgompertz(2, 2, 4)) - ) - expect_equal(qgompertz(1:2, llocation = c(1, NA), lshape = 3:4), c(Inf, NaN)) - expect_equal(qgompertz(pgompertz(c(0, 0.1, 0.5, 0.9, 1))), c(0, 0.1, 0.5, 0.9, 1)) + expect_defunct(qgompertz(numeric(0))) }) test_that("rgompertz extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(rgompertz(numeric(0)), numeric(0)) - expect_error(rgompertz(NA)) - expect_identical(rgompertz(0), numeric(0)) - set.seed(42) - expect_equal(rgompertz(1), 1.24208466660006) - set.seed(42) - expect_equal(rgompertz(1.9), 1.24208466660006) - set.seed(42) - expect_equal(rgompertz(2), c(1.24208466660006, 1.32596518320944)) - set.seed(42) - expect_equal(rgompertz(3:4), c(1.24208466660006, 1.32596518320944)) - expect_equal(rgompertz(0, llocation = -1), numeric(0)) - expect_equal(rgompertz(0, lshape = -1), numeric(0)) - expect_error(rgompertz(1, llocation = 1:2)) - expect_error(rgompertz(1, lshape = 1:2)) - expect_identical(rgompertz(1, llocation = NA), NA_real_) - expect_identical(rgompertz(1, lshape = NA), NA_real_) + expect_defunct(rgompertz(numeric(0))) }) diff --git a/tests/testthat/test-gompertz.R b/tests/testthat/test-gompertz.R index bf8d7ccc7..749d0f6ec 100644 --- a/tests/testthat/test-gompertz.R +++ b/tests/testthat/test-gompertz.R @@ -19,13 +19,3 @@ test_that("gompertz", { set.seed(42) expect_equal(ssd_rgompertz(2), c(1.24208466660006, 1.32596518320944)) }) - -test_that("bootstrap gompertz with problem data", { - set.seed(99) - data <- data.frame(Conc = ssd_rgompertz(6, location = 0.6, shape = 0.07)) - fit <- ssdtools::ssd_fit_dists(data, dists = "gompertz") - set.seed(99) - hc <- ssd_hc(fit, ci = TRUE, nboot = 100, min_pboot = 0.8, ci_method = "weighted_arithmetic", multi_est = FALSE, - samples = TRUE) - expect_snapshot_data(hc, "hc_prob") -}) diff --git a/tests/testthat/test-hc-burrlioz.R b/tests/testthat/test-hc-burrlioz.R index a632e27b5..e87ace47e 100644 --- a/tests/testthat/test-hc-burrlioz.R +++ b/tests/testthat/test-hc-burrlioz.R @@ -15,8 +15,7 @@ test_that("ssd_hc_burrlioz deprecated", { fit <- ssd_fit_burrlioz(ssddata::ccme_boron) set.seed(47) - lifecycle::expect_deprecated(hc_boron <- ssd_hc_burrlioz(fit, nboot = 10, ci = TRUE, min_pboot = 0)) - expect_snapshot_data(hc_boron, "hc_boron0") + expect_defunct(hc_boron <- ssd_hc_burrlioz(fit, nboot = 10, ci = TRUE, min_pboot = 0)) }) test_that("ssd_hc gets estimates with invpareto", { @@ -49,7 +48,7 @@ test_that("ssd_hc currently errors with burrIII3", { fit <- ssd_fit_burrlioz(data) expect_identical(names(fit), "burrIII3") set.seed(47) - #FIXME: currently errors - also hp + # FIXME: currently errors - also hp expect_error(hc_burrIII3 <- ssd_hc(fit, nboot = 10, ci = TRUE, min_pboot = 0)) }) diff --git a/tests/testthat/test-hc-root.R b/tests/testthat/test-hc-root.R index d78309738..fa2491cf5 100644 --- a/tests/testthat/test-hc-root.R +++ b/tests/testthat/test-hc-root.R @@ -1,4 +1,4 @@ -# Copyright 2023 Australian Government Department of +# Copyright 2023 Australian Government Department of # Climate Change, Energy, the Environment and Water # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -21,7 +21,7 @@ test_that("hc multi_ci lnorm", { hc_multi <- ssd_hc(fits, average = TRUE, ci_method = "multi_fixed") expect_identical(hc_dist$est, hc_average$est) expect_equal(hc_multi, hc_average) - + testthat::expect_snapshot({ hc_multi }) @@ -32,8 +32,8 @@ test_that("hc multi_ci all", { set.seed(102) hc_average <- ssd_hc(fits, average = TRUE, ci_method = "weighted_samples", multi_est = FALSE) hc_multi <- ssd_hc(fits, average = TRUE, ci_method = "multi_fixed") - expect_equal(hc_average$est, 1.241515, tolerance = 1e-6) - expect_equal(hc_multi$est, 1.2567737470831, tolerance = 1e-6) + expect_equal(hc_average$est, 1.241515, tolerance = 1e-5) + expect_equal(hc_multi$est, 1.2567737470831, tolerance = 1e-5) testthat::expect_snapshot({ hc_multi }) @@ -42,10 +42,10 @@ test_that("hc multi_ci all", { test_that("hc multi_ci all multiple hcs", { fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) - hc_average <- ssd_hc(fits, proportion = c(5,10)/100, average = TRUE, ci_method = "weighted_arithmetic", multi_est = FALSE) - hc_multi <- ssd_hc(fits, proportion = c(5,10)/100, average = TRUE, ci_method = "multi_fixed") - expect_equal(hc_average$est, c(1.24151480646654, 2.37337090704541), tolerance = 1e-6) - expect_equal(hc_multi$est, c(1.2567737470831, 2.38164080837643), tolerance = 1e-6) + hc_average <- ssd_hc(fits, proportion = c(5, 10) / 100, average = TRUE, ci_method = "weighted_arithmetic", multi_est = FALSE) + hc_multi <- ssd_hc(fits, proportion = c(5, 10) / 100, average = TRUE, ci_method = "multi_fixed") + expect_equal(hc_average$est, c(1.24151480646654, 2.37337090704541), tolerance = 1e-5) + expect_equal(hc_multi$est, c(1.2567737470831, 2.38164080837643), tolerance = 1e-5) testthat::expect_snapshot({ hc_multi }) @@ -54,11 +54,11 @@ test_that("hc multi_ci all multiple hcs", { test_that("hc multi_ci all multiple hcs cis", { fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) - hc_average <- ssd_hc(fits, proportion = c(5,10)/100, average = TRUE, ci_method = "weighted_arithmetic", multi_est = FALSE, nboot = 10, ci = TRUE) + hc_average <- ssd_hc(fits, proportion = c(5, 10) / 100, average = TRUE, ci_method = "weighted_arithmetic", multi_est = FALSE, nboot = 10, ci = TRUE) set.seed(105) - hc_multi <- ssd_hc(fits, proportion = c(5,10)/100, average = TRUE, ci_method = "multi_fixed", nboot = 10, ci = TRUE) - expect_equal(hc_average$est, c(1.24151480646654, 2.37337090704541), tolerance = 1e-6) - expect_equal(hc_multi$est, c(1.2567737470831, 2.38164080837643), tolerance = 1e-6) + hc_multi <- ssd_hc(fits, proportion = c(5, 10) / 100, average = TRUE, ci_method = "multi_fixed", nboot = 10, ci = TRUE) + expect_equal(hc_average$est, c(1.24151480646654, 2.37337090704541), tolerance = 1e-5) + expect_equal(hc_multi$est, c(1.2567737470831, 2.38164080837643), tolerance = 1e-5) testthat::expect_snapshot({ hc_multi }) @@ -72,15 +72,15 @@ test_that("hc multi_ci lnorm ci", { hc_average <- ssd_hc(fits, average = TRUE, ci = TRUE, nboot = 100, ci_method = "weighted_arithmetic", multi_est = FALSE) set.seed(102) hc_multi <- ssd_hc(fits, average = TRUE, ci_method = "multi_fixed", ci = TRUE, nboot = 100) - + testthat::expect_snapshot({ hc_average }) - + testthat::expect_snapshot({ hc_multi }) - + hc_dist$dist <- NULL hc_average$dist <- NULL expect_identical(hc_dist, hc_average) diff --git a/tests/testthat/test-hc.R b/tests/testthat/test-hc.R index d7d5ebebc..53f78b0ad 100644 --- a/tests/testthat/test-hc.R +++ b/tests/testthat/test-hc.R @@ -23,7 +23,7 @@ test_that("hc", { test_that("hc estimate with censored data same number of 2parameters", { data <- ssddata::ccme_boron data$right <- data$Conc - data$Conc[c(3,6,8)] <- NA + data$Conc[c(3, 6, 8)] <- NA fit <- ssd_fit_dists(data, right = "right", dists = c("lnorm", "llogis")) hc <- ssd_hc(fit) expect_snapshot_data(hc, "censored_2ll") @@ -32,7 +32,7 @@ test_that("hc estimate with censored data same number of 2parameters", { test_that("hc estimate with censored data same number of 5parameters", { data <- ssddata::ccme_boron data$right <- data$Conc - data$Conc[c(3,6,8)] <- NA + data$Conc[c(3, 6, 8)] <- NA fit <- ssd_fit_dists(data, right = "right", dists = c("lnorm_lnorm", "llogis_llogis")) hc <- ssd_hc(fit) expect_snapshot_data(hc, "censored_5ll") @@ -41,27 +41,26 @@ test_that("hc estimate with censored data same number of 5parameters", { test_that("hc not estimate with different number of parameters", { data <- ssddata::ccme_boron data$right <- data$Conc - data$Conc[c(3,6,8)] <- NA + data$Conc[c(3, 6, 8)] <- NA fit <- ssd_fit_dists(data, right = "right", dists = c("lnorm", "lnorm_lnorm")) hc_each <- ssd_hc(fit, average = FALSE) expect_snapshot_data(hc_each, "censored_each") - expect_warning(hc_ave <- ssd_hc(fit), - "Model averaged estimates cannot be calculated for censored data when the distributions have different numbers of parameters.") + expect_warning( + hc_ave <- ssd_hc(fit), + "Model averaged estimates cannot be calculated for censored data when the distributions have different numbers of parameters." + ) expect_snapshot_data(hc_ave, "censored_ave") }) test_that("ssd_hc list must be named", { - chk::expect_chk_error(ssd_hc(list())) }) test_that("ssd_hc list names must be unique", { - chk::expect_chk_error(ssd_hc(list("lnorm" = NULL, "lnorm" = NULL))) }) test_that("ssd_hc list handles zero length list", { - hc <- ssd_hc(structure(list(), .Names = character(0))) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "proportion", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot", "samples")) @@ -71,7 +70,6 @@ test_that("ssd_hc list handles zero length list", { }) test_that("ssd_hc list works null values handles zero length list", { - hc <- ssd_hc(list("lnorm" = NULL)) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "proportion", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) @@ -82,21 +80,20 @@ test_that("ssd_hc list works null values handles zero length list", { }) test_that("ssd_hc list works multiple percent values", { - - hc <- ssd_hc(list("lnorm" = NULL), proportion = c(1, 99)/100) + hc <- ssd_hc(list("lnorm" = NULL), proportion = c(1, 99) / 100) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "proportion", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) - expect_identical(hc$proportion, c(1, 99)/100) + expect_identical(hc$proportion, c(1, 99) / 100) expect_equal(hc$dist, c("lnorm", "lnorm")) expect_equal(hc$est, c(0.097651733070336, 10.2404736563121)) expect_identical(hc$se, c(NA_real_, NA_real_)) }) test_that("ssd_hc list works partial percent values", { - hc <- ssd_hc(list("lnorm" = NULL), proportion = c(50.5)/100) + hc <- ssd_hc(list("lnorm" = NULL), proportion = c(50.5) / 100) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "proportion", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) - expect_identical(hc$proportion, 50.5/100) + expect_identical(hc$proportion, 50.5 / 100) expect_equal(hc$dist, "lnorm") expect_equal(hc$est, 1.01261234261044) expect_identical(hc$se, NA_real_) @@ -113,31 +110,28 @@ test_that("ssd_hc list works specified values", { }) test_that("ssd_hc list works multiple NULL distributions", { - hc <- ssd_hc(list("lnorm" = NULL, "llogis" = NULL)) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "proportion", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) - expect_identical(hc$proportion, c(5, 5)/100) + expect_identical(hc$proportion, c(5, 5) / 100) expect_equal(hc$dist, c("lnorm", "llogis")) expect_equal(hc$est, c(0.193040816698737, 0.0526315789473684)) expect_equal(hc$se, c(NA_real_, NA_real_)) }) test_that("ssd_hc list works multiple NULL distributions with multiple percent", { - - hc <- ssd_hc(list("lnorm" = NULL, "llogis" = NULL), proportion = c(1, 99)/100) + hc <- ssd_hc(list("lnorm" = NULL, "llogis" = NULL), proportion = c(1, 99) / 100) expect_s3_class(hc, "tbl_df") expect_identical(colnames(hc), c("dist", "proportion", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot")) expect_equal(hc$dist, c("lnorm", "lnorm", "llogis", "llogis")) - expect_identical(hc$proportion, c(1, 99, 1, 99)/100) + expect_identical(hc$proportion, c(1, 99, 1, 99) / 100) expect_equal(hc$est, c(0.097651733070336, 10.2404736563121, 0.0101010101010101, 98.9999999999999)) expect_equal(hc$se, c(NA_real_, NA_real_, NA_real_, NA_real_)) }) test_that("ssd_hc fitdists works zero length percent", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - + hc <- ssd_hc(fits, proportion = numeric(0)) expect_s3_class(hc, class = "tbl_df") expect_identical(colnames(hc), c("dist", "proportion", "est", "se", "lcl", "ucl", "wt", "nboot", "pboot", "samples")) @@ -148,52 +142,46 @@ test_that("ssd_hc fitdists works zero length percent", { }) test_that("ssd_hc fitdists works NA percent", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - + hc <- ssd_hc(fits, proportion = NA_real_) expect_s3_class(hc, "tbl_df") expect_snapshot_data(hc, "hc114") }) test_that("ssd_hc fitdists works 0 percent", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - + hc <- ssd_hc(fits, proportion = 0) expect_s3_class(hc, "tbl_df") expect_snapshot_data(hc, "hc122") }) test_that("ssd_hc fitdists works 100 percent", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - + hc <- ssd_hc(fits, proportion = 1) expect_s3_class(hc, "tbl_df") expect_snapshot_data(hc, "hc130") }) test_that("ssd_hc fitdists works multiple percents", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - - hc <- ssd_hc(fits, proportion = c(1, 99)/100) + + hc <- ssd_hc(fits, proportion = c(1, 99) / 100) expect_s3_class(hc, "tbl_df") expect_snapshot_data(hc, "hc138") }) test_that("ssd_hc fitdists works fractions", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - - hc <- ssd_hc(fits, proportion = 50.5/100) + + hc <- ssd_hc(fits, proportion = 50.5 / 100) expect_s3_class(hc, "tbl_df") expect_snapshot_data(hc, "hc505") }) test_that("ssd_hc fitdists averages", { - fits <- ssd_fit_dists(ssddata::ccme_boron) hc <- ssd_hc(fits, ci_method = "weighted_arithmetic", multi_est = FALSE) expect_s3_class(hc, "tbl_df") @@ -201,35 +189,34 @@ test_that("ssd_hc fitdists averages", { }) test_that("ssd_hc fitdists correctly averages", { - fits <- ssd_fit_dists(ssddata::aims_molybdenum_marine, dists = c("lgumbel", "lnorm_lnorm"), - min_pmix = 0) + fits <- ssd_fit_dists(ssddata::aims_molybdenum_marine, + dists = c("lgumbel", "lnorm_lnorm"), + min_pmix = 0 + ) hc <- ssd_hc(fits, average = FALSE, ci_method = "multi_free") - expect_equal(hc$est, c(3881.17238083968, 5540.69271009251), tolerance = 1e-6) + expect_equal(hc$est, c(3881.17238083968, 5540.52003), tolerance = 1e-5) expect_equal(hc$wt, c(0.0968427088339105, 0.90315729116609)) hc_avg <- ssd_hc(fits, ci_method = "weighted_arithmetic", multi_est = FALSE) expect_equal(hc_avg$est, sum(hc$est * hc$wt)) }) test_that("ssd_hc fitdists averages single dist by multiple percent", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - - hc <- ssd_hc(fits, average = TRUE, proportion = 1:99/100) + + hc <- ssd_hc(fits, average = TRUE, proportion = 1:99 / 100) expect_s3_class(hc, "tbl_df") expect_snapshot_data(hc, "hc153") }) test_that("ssd_hc fitdists not average single dist by multiple percent gives whole numeric", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - - hc <- ssd_hc(fits, average = FALSE, proportion = 1:99/100) + + hc <- ssd_hc(fits, average = FALSE, proportion = 1:99 / 100) expect_s3_class(hc, "tbl_df") expect_snapshot_data(hc, "hc161") }) test_that("ssd_hc fitdists not average", { - fits <- ssd_fit_dists(ssddata::ccme_boron) hc <- ssd_hc(fits, average = FALSE) expect_s3_class(hc, "tbl_df") @@ -237,7 +224,6 @@ test_that("ssd_hc fitdists not average", { }) test_that("ssd_hc fitdists correct for rescaling", { - fits <- ssd_fit_dists(ssddata::ccme_boron) fits_rescale <- ssd_fit_dists(ssddata::ccme_boron, rescale = TRUE) hc <- ssd_hc(fits, ci_method = "weighted_arithmetic") @@ -246,29 +232,26 @@ test_that("ssd_hc fitdists correct for rescaling", { }) test_that("ssd_hc fitdists cis", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - + set.seed(102) hc <- ssd_hc(fits, ci = TRUE, ci_method = "weighted_arithmetic", samples = TRUE) expect_s3_class(hc, "tbl_df") - + expect_snapshot_data(hc, "hc_cis") }) test_that("ssd_hc fitdists cis level = 0.8", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") - + set.seed(102) hc <- ssd_hc(fits, ci = TRUE, level = 0.8, ci_method = "weighted_arithmetic", samples = TRUE) expect_s3_class(hc, "tbl_df") - + expect_snapshot_data(hc, "hc_cis_level08") }) test_that("ssd_hc doesn't calculate cis with inconsistent censoring", { - data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc[1] <- 0.5 @@ -277,12 +260,12 @@ test_that("ssd_hc doesn't calculate cis with inconsistent censoring", { set.seed(10) hc <- ssd_hc(fits, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") expect_equal(hc$se, 0.475836654747499, tolerance = 1e-6) - + fits <- ssd_fit_dists(data, right = "Conc2", dists = c("lnorm", "llogis")) set.seed(10) expect_warning( hc <- ssd_hc(fits, ci = TRUE, nboot = 10), - "^Parametric CIs cannot be calculated for inconsistently censored data[.]$" + "^Parametric CIs cannot be calculated for censored data[.]$" ) expect_identical(hc$se, NA_real_) }) @@ -293,12 +276,49 @@ test_that("ssd_hc works with fully left censored data", { data$Conc <- 0 fits <- ssd_fit_dists(data, right = "Conc2", dists = c("lnorm", "llogis")) set.seed(10) - hc <- ssd_hc(fits, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") - expect_equal(hc$se, 0.000753288708572757, tolerance = 1e-6) + expect_warning(hc <- ssd_hc(fits, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic"), + "^Parametric CIs cannot be calculated for censored data[.]$") + expect_snapshot_data(hc, "fullyleft") }) -test_that("ssd_hc not work partially censored even if all same left", { +test_that("ssd_hc warns with partially left censored data", { + data <- ssddata::ccme_boron + data$right <- data$Conc + data$Conc[c(3,6,8)] <- NA + + set.seed(100) + fits <- ssd_fit_dists(data, dists = "lnorm", right = "right") + expect_warning(hc <- ssd_hc(fits, ci = TRUE, nboot = 10, average = FALSE), + "Parametric CIs cannot be calculated for censored data\\.") + expect_snapshot_data(hc, "partialeft") +}) + +test_that("ssd_hc works with fully left censored data", { + data <- ssddata::ccme_boron + data$right <- data$Conc + data$right[data$Conc < 4] <- 4 + data$Conc[data$Conc < 4] <- NA + + set.seed(100) + fits <- ssd_fit_dists(data, dists = "lnorm", right = "right") + expect_warning(hc <- ssd_hc(fits, ci = TRUE, nboot = 10, average = FALSE), + "^Parametric CIs cannot be calculated for censored data\\.$") + expect_snapshot_data(hc, "partialeftfull") +}) + +test_that("ssd_hc works with partially left censored data non-parametric", { + data <- ssddata::ccme_boron + data$right <- data$Conc + data$Conc[c(3,6,8)] <- NA + set.seed(100) + fits <- ssd_fit_dists(data, dists = "lnorm", right = "right") + hc <- ssd_hc(fits, ci = TRUE, nboot = 10, average = FALSE, parametric = FALSE) + expect_snapshot_data(hc, "partialeftnonpara") + expect_gt(hc$ucl, hc$est) +}) + +test_that("ssd_hc not work partially censored even if all same left", { data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc <- 0.1 @@ -306,12 +326,11 @@ test_that("ssd_hc not work partially censored even if all same left", { set.seed(10) expect_warning( hc <- ssd_hc(fits, ci = TRUE, nboot = 10), - "^Parametric CIs cannot be calculated for inconsistently censored data[.]$" + "^Parametric CIs cannot be calculated for censored data[.]$" ) }) test_that("ssd_hc doesn't works with inconsisently censored data", { - data <- ssddata::ccme_boron data$Conc2 <- data$Conc data$Conc <- 0 @@ -320,18 +339,17 @@ test_that("ssd_hc doesn't works with inconsisently censored data", { set.seed(10) expect_warning( hc <- ssd_hc(fits, ci = TRUE, nboot = 10), - "^Parametric CIs cannot be calculated for inconsistently censored data[.]$" + "^Parametric CIs cannot be calculated for censored data[.]$" ) }) test_that("ssd_hc same with equally weighted data", { - data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") set.seed(10) hc <- ssd_hc(fits, ci = TRUE, nboot = 10) - + data$Weight <- rep(2, nrow(data)) fits2 <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") set.seed(10) @@ -375,7 +393,6 @@ test_that("ssd_hc calculates cis in parallel with two distributions", { }) test_that("ssd_hc doesn't calculate cis with unequally weighted data", { - data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) data$Weight[1] <- 2 @@ -388,7 +405,6 @@ test_that("ssd_hc doesn't calculate cis with unequally weighted data", { }) test_that("ssd_hc no effect with higher weight one distribution", { - data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -411,8 +427,8 @@ test_that("ssd_hc effect with higher weight two distributions", { hc <- ssd_hc(fits, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic", multi_est = FALSE) set.seed(10) hc_10 <- ssd_hc(fits_10, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic", multi_est = FALSE) - expect_equal(hc$est, 1.6490386909599, tolerance = 1e-6) - expect_equal(hc_10$est, 1.68117856793665, tolerance = 1e-6) + expect_equal(hc$est, 1.6490386909599, tolerance = 1e-5) + expect_equal(hc_10$est, 1.68117856793665, tolerance = 1e-5) expect_equal(hc$se, 0.511475588315084, tolerance = 1e-6) expect_equal(hc_10$se, 0.455819671683407, tolerance = 1e-6) }) @@ -432,7 +448,6 @@ test_that("ssd_hc cis with non-convergence", { }) test_that("ssd_hc cis with error and multiple dists", { - set.seed(99) conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -443,14 +458,13 @@ test_that("ssd_hc cis with error and multiple dists", { expect_snapshot_boot_data(hc_err_two, "hc_err_two") set.seed(99) expect_warning(hc_err_avg <- ssd_hc(fit, - ci = TRUE, nboot = 100, - delta = 100, ci_method = "weighted_arithmetic" + ci = TRUE, nboot = 100, + delta = 100, ci_method = "weighted_arithmetic" )) expect_snapshot_boot_data(hc_err_avg, "hc_err_avg") }) test_that("ssd_hc with 1 bootstrap", { - fit <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(10) hc <- ssd_hc(fit, ci = TRUE, nboot = 1, ci_method = "weighted_arithmetic") @@ -468,7 +482,6 @@ test_that("ssd_hc parametric and non-parametric small sample size", { }) test_that("ssd_hc_burrlioz gets estimates with invpareto", { - fit <- ssd_fit_burrlioz(ssddata::ccme_boron) set.seed(47) hc_boron <- ssd_hc(fit, nboot = 10, ci = TRUE, min_pboot = 0, samples = TRUE) @@ -476,7 +489,6 @@ test_that("ssd_hc_burrlioz gets estimates with invpareto", { }) test_that("ssd_hc_burrlioz gets estimates with burrIII3", { - set.seed(99) data <- data.frame(Conc = ssd_rburrIII3(30)) fit <- ssd_fit_burrlioz(data) @@ -487,26 +499,24 @@ test_that("ssd_hc_burrlioz gets estimates with burrIII3", { }) test_that("ssd_hc_burrlioz gets estimates with burrIII3 parametric", { - set.seed(99) data <- data.frame(Conc = ssd_rburrIII3(30)) fit <- ssd_fit_burrlioz(data) expect_identical(names(fit), "burrIII3") set.seed(49) hc_burrIII3 <- ssd_hc(fit, - nboot = 10, ci = TRUE, min_pboot = 0, - parametric = TRUE, samples = TRUE + nboot = 10, ci = TRUE, min_pboot = 0, + parametric = TRUE, samples = TRUE ) expect_snapshot_data(hc_burrIII3, "hc_burrIII3_parametric") }) test_that("ssd_hc passing all boots ccme_chloride lnorm_lnorm", { - fits <- ssd_fit_dists(ssddata::ccme_chloride, - min_pmix = 0.0001, at_boundary_ok = TRUE, - dists = c("lnorm_lnorm", "llogis_llogis") + min_pmix = 0.0001, at_boundary_ok = TRUE, + dists = c("lnorm_lnorm", "llogis_llogis") ) - + set.seed(102) expect_warning(hc <- ssd_hc(fits, ci = TRUE, nboot = 1000, average = FALSE)) expect_s3_class(hc, "tbl_df") @@ -515,98 +525,111 @@ test_that("ssd_hc passing all boots ccme_chloride lnorm_lnorm", { test_that("ssd_hc save_to", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron, dist = "lnorm") set.seed(102) hc <- ssd_hc(fits, nboot = 3, ci = TRUE, ci_method = "multi_fixed", save_to = dir, samples = TRUE) expect_snapshot_data(hc, "hc_save_to") - expect_identical(list.files(dir), c("data_000000000_multi.csv", "data_000000001_multi.csv", "data_000000002_multi.csv", - "data_000000003_multi.csv", "estimates_000000000_multi.rds", - "estimates_000000001_multi.rds", "estimates_000000002_multi.rds", - "estimates_000000003_multi.rds")) + expect_identical(list.files(dir), c( + "data_000000000_multi.csv", "data_000000001_multi.csv", "data_000000002_multi.csv", + "data_000000003_multi.csv", "estimates_000000000_multi.rds", + "estimates_000000001_multi.rds", "estimates_000000002_multi.rds", + "estimates_000000003_multi.rds" + )) data <- read.csv(file.path(dir, "data_000000000_multi.csv")) expect_snapshot_data(hc, "hc_save_to1data") boot1 <- read.csv(file.path(dir, "data_000000001_multi.csv")) expect_snapshot_data(hc, "hc_save_to1") ests <- readRDS(file.path(dir, "estimates_000000000_multi.rds")) ests1 <- readRDS(file.path(dir, "estimates_000000001_multi.rds")) - + expect_identical(names(ests), names(ests1)) - expect_identical(names(ests), c("burrIII3.weight", "burrIII3.shape1", "burrIII3.shape2", "burrIII3.scale", - "gamma.weight", "gamma.shape", "gamma.scale", "gompertz.weight", - "gompertz.location", "gompertz.shape", "invpareto.weight", "invpareto.shape", - "invpareto.scale", "lgumbel.weight", "lgumbel.locationlog", "lgumbel.scalelog", - "llogis.weight", "llogis.locationlog", "llogis.scalelog", "llogis_llogis.weight", - "llogis_llogis.locationlog1", "llogis_llogis.scalelog1", "llogis_llogis.locationlog2", - "llogis_llogis.scalelog2", "llogis_llogis.pmix", "lnorm.weight", - "lnorm.meanlog", "lnorm.sdlog", "lnorm_lnorm.weight", "lnorm_lnorm.meanlog1", - "lnorm_lnorm.sdlog1", "lnorm_lnorm.meanlog2", "lnorm_lnorm.sdlog2", - "lnorm_lnorm.pmix", "weibull.weight", "weibull.shape", "weibull.scale" + expect_identical(names(ests), c( + "burrIII3.weight", "burrIII3.shape1", "burrIII3.shape2", "burrIII3.scale", + "gamma.weight", "gamma.shape", "gamma.scale", "gompertz.weight", + "gompertz.location", "gompertz.shape", "invpareto.weight", "invpareto.shape", + "invpareto.scale", "lgumbel.weight", "lgumbel.locationlog", "lgumbel.scalelog", + "llogis.weight", "llogis.locationlog", "llogis.scalelog", "llogis_llogis.weight", + "llogis_llogis.locationlog1", "llogis_llogis.scalelog1", "llogis_llogis.locationlog2", + "llogis_llogis.scalelog2", "llogis_llogis.pmix", "lnorm.weight", + "lnorm.meanlog", "lnorm.sdlog", "lnorm_lnorm.weight", "lnorm_lnorm.meanlog1", + "lnorm_lnorm.sdlog1", "lnorm_lnorm.meanlog2", "lnorm_lnorm.sdlog2", + "lnorm_lnorm.pmix", "weibull.weight", "weibull.shape", "weibull.scale" )) }) test_that("ssd_hc save_to ci_method = weighted_samples", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron, dist = "lnorm") set.seed(102) hc <- ssd_hc(fits, nboot = 3, ci = TRUE, save_to = dir, ci_method = "weighted_arithmetic", samples = TRUE) expect_snapshot_data(hc, "hc_save_to_not_multi") - expect_identical(list.files(dir), c("data_000000000_lnorm.csv", "data_000000001_lnorm.csv", "data_000000002_lnorm.csv", - "data_000000003_lnorm.csv", "estimates_000000000_lnorm.rds", - "estimates_000000001_lnorm.rds", "estimates_000000002_lnorm.rds", - "estimates_000000003_lnorm.rds")) + expect_identical(list.files(dir), c( + "data_000000000_lnorm.csv", "data_000000001_lnorm.csv", "data_000000002_lnorm.csv", + "data_000000003_lnorm.csv", "estimates_000000000_lnorm.rds", + "estimates_000000001_lnorm.rds", "estimates_000000002_lnorm.rds", + "estimates_000000003_lnorm.rds" + )) data1 <- read.csv(file.path(dir, "data_000000001_lnorm.csv")) expect_snapshot_data(hc, "hc_save_to1_not_multi") }) test_that("ssd_hc save_to ci_method = weighted_samples default", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) hc <- ssd_hc(fits, nboot = 1, ci = TRUE, save_to = dir, ci_method = "weighted_arithmetic", multi_est = FALSE, samples = TRUE) expect_snapshot_data(hc, "hc_save_to_not_multi_default") - expect_identical(sort(list.files(dir)), - sort(c("data_000000000_gamma.csv", "data_000000000_lgumbel.csv", "data_000000000_llogis.csv", - "data_000000000_lnorm_lnorm.csv", "data_000000000_lnorm.csv", - "data_000000000_weibull.csv", "data_000000001_gamma.csv", "data_000000001_lgumbel.csv", - "data_000000001_llogis.csv", "data_000000001_lnorm_lnorm.csv", - "data_000000001_lnorm.csv", "data_000000001_weibull.csv", "estimates_000000000_gamma.rds", - "estimates_000000000_lgumbel.rds", "estimates_000000000_llogis.rds", - "estimates_000000000_lnorm_lnorm.rds", "estimates_000000000_lnorm.rds", - "estimates_000000000_weibull.rds", "estimates_000000001_gamma.rds", - "estimates_000000001_lgumbel.rds", "estimates_000000001_llogis.rds", - "estimates_000000001_lnorm_lnorm.rds", "estimates_000000001_lnorm.rds", - "estimates_000000001_weibull.rds"))) + expect_identical( + sort(list.files(dir)), + sort(c( + "data_000000000_gamma.csv", "data_000000000_lgumbel.csv", "data_000000000_llogis.csv", + "data_000000000_lnorm_lnorm.csv", "data_000000000_lnorm.csv", + "data_000000000_weibull.csv", "data_000000001_gamma.csv", "data_000000001_lgumbel.csv", + "data_000000001_llogis.csv", "data_000000001_lnorm_lnorm.csv", + "data_000000001_lnorm.csv", "data_000000001_weibull.csv", "estimates_000000000_gamma.rds", + "estimates_000000000_lgumbel.rds", "estimates_000000000_llogis.rds", + "estimates_000000000_lnorm_lnorm.rds", "estimates_000000000_lnorm.rds", + "estimates_000000000_weibull.rds", "estimates_000000001_gamma.rds", + "estimates_000000001_lgumbel.rds", "estimates_000000001_llogis.rds", + "estimates_000000001_lnorm_lnorm.rds", "estimates_000000001_lnorm.rds", + "estimates_000000001_weibull.rds" + )) + ) boot1 <- read.csv(file.path(dir, "data_000000001_lnorm.csv")) expect_snapshot_data(hc, "hc_save_to1_not_multi_default") }) test_that("ssd_hc save_to rescale", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron, dist = "lnorm", rescale = TRUE) set.seed(102) hc <- ssd_hc(fits, nboot = 3, ci = TRUE, ci_method = "multi_fixed", save_to = dir, samples = TRUE) expect_snapshot_data(hc, "hc_save_to_rescale") - expect_identical(list.files(dir), c("data_000000000_multi.csv", "data_000000001_multi.csv", "data_000000002_multi.csv", - "data_000000003_multi.csv", "estimates_000000000_multi.rds", - "estimates_000000001_multi.rds", "estimates_000000002_multi.rds", - "estimates_000000003_multi.rds")) + expect_identical(list.files(dir), c( + "data_000000000_multi.csv", "data_000000001_multi.csv", "data_000000002_multi.csv", + "data_000000003_multi.csv", "estimates_000000000_multi.rds", + "estimates_000000001_multi.rds", "estimates_000000002_multi.rds", + "estimates_000000003_multi.rds" + )) boot1 <- read.csv(file.path(dir, "data_000000001_multi.csv")) expect_snapshot_data(hc, "hc_save_to1_rescale") }) test_that("ssd_hc save_to lnorm 1", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron, dist = "lnorm") set.seed(102) hc <- ssd_hc(fits, nboot = 1, ci = TRUE, ci_method = "multi_fixed", save_to = dir, samples = TRUE) expect_snapshot_data(hc, "hc_save_to11") - expect_identical(list.files(dir), c("data_000000000_multi.csv", "data_000000001_multi.csv", "estimates_000000000_multi.rds", - "estimates_000000001_multi.rds")) + expect_identical(list.files(dir), c( + "data_000000000_multi.csv", "data_000000001_multi.csv", "estimates_000000000_multi.rds", + "estimates_000000001_multi.rds" + )) boot1 <- read.csv(file.path(dir, "data_000000001_multi.csv")) fit1 <- ssd_fit_dists(boot1, dist = "lnorm", left = "left", right = "right", weight = "weight") est <- ssd_hc(fit1)$est @@ -616,16 +639,20 @@ test_that("ssd_hc save_to lnorm 1", { test_that("ssd_hc save_to replaces", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron, dist = "lnorm") set.seed(102) hc <- ssd_hc(fits, nboot = 1, ci = TRUE, ci_method = "multi_fixed", save_to = dir) - expect_identical(list.files(dir), c("data_000000000_multi.csv", "data_000000001_multi.csv", "estimates_000000000_multi.rds", - "estimates_000000001_multi.rds")) + expect_identical(list.files(dir), c( + "data_000000000_multi.csv", "data_000000001_multi.csv", "estimates_000000000_multi.rds", + "estimates_000000001_multi.rds" + )) boot <- read.csv(file.path(dir, "data_000000001_multi.csv")) hc2 <- ssd_hc(fits, nboot = 1, ci = TRUE, ci_method = "multi_fixed", save_to = dir) - expect_identical(list.files(dir), c("data_000000000_multi.csv", "data_000000001_multi.csv", "estimates_000000000_multi.rds", - "estimates_000000001_multi.rds")) + expect_identical(list.files(dir), c( + "data_000000000_multi.csv", "data_000000001_multi.csv", "estimates_000000000_multi.rds", + "estimates_000000001_multi.rds" + )) boot2 <- read.csv(file.path(dir, "data_000000001_multi.csv")) expect_snapshot_data(boot, "hc_boot1_replace") expect_snapshot_data(boot2, "hc_boot2_replace") @@ -633,11 +660,11 @@ test_that("ssd_hc save_to replaces", { test_that("ssd_hc fix_weight", { fits <- ssd_fit_dists(ssddata::ccme_boron, dist = c("lnorm", "lgumbel")) - + set.seed(102) hc_unfix <- ssd_hc(fits, nboot = 100, ci = TRUE, ci_method = "multi_free", samples = TRUE) expect_snapshot_data(hc_unfix, "hc_unfix") - + set.seed(102) hc_fix <- ssd_hc(fits, nboot = 100, ci = TRUE, ci_method = "multi_fixed", samples = TRUE) expect_snapshot_data(hc_fix, "hc_fix") @@ -645,11 +672,11 @@ test_that("ssd_hc fix_weight", { test_that("ssd_hc multiple values", { fits <- ssd_fit_dists(ssddata::ccme_boron, dist = c("lnorm", "lgumbel")) - + set.seed(102) hc_unfix <- ssd_hc(fits, proportion = c(5, 10) / 100, nboot = 100, ci = TRUE, ci_method = "multi_free", samples = TRUE) expect_snapshot_data(hc_unfix, "hc_unfixmulti") - + set.seed(102) hc_fix <- ssd_hc(fits, proportion = c(5, 10) / 100, nboot = 100, ci = TRUE, ci_method = "multi_fixed", samples = TRUE) expect_snapshot_data(hc_fix, "hc_fixmulti") @@ -657,28 +684,31 @@ test_that("ssd_hc multiple values", { test_that("ssd_hc multiple values save_to", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron, dist = c("lnorm", "lgumbel")) - + set.seed(102) hc <- ssd_hc(fits, proportion = c(5, 10) / 100, nboot = 2, save_to = dir, ci = TRUE, ci_method = "multi_fixed") - expect_identical(list.files(dir), c("data_000000000_multi.csv", "data_000000001_multi.csv", "data_000000002_multi.csv", - "estimates_000000000_multi.rds", "estimates_000000001_multi.rds", - "estimates_000000002_multi.rds")) + expect_identical(list.files(dir), c( + "data_000000000_multi.csv", "data_000000001_multi.csv", "data_000000002_multi.csv", + "estimates_000000000_multi.rds", "estimates_000000001_multi.rds", + "estimates_000000002_multi.rds" + )) }) test_that("ssd_hc not multi_ci save_to", { dir <- withr::local_tempdir() - + fits <- ssd_fit_dists(ssddata::ccme_boron, dist = c("lnorm", "lgumbel")) - + set.seed(102) hc <- ssd_hc(fits, nboot = 2, ci_method = "weighted_arithmetic", save_to = dir, ci = TRUE) - expect_identical(list.files(dir), c("data_000000000_lgumbel.csv", "data_000000000_lnorm.csv", "data_000000001_lgumbel.csv", - "data_000000001_lnorm.csv", "data_000000002_lgumbel.csv", "data_000000002_lnorm.csv", - "estimates_000000000_lgumbel.rds", "estimates_000000000_lnorm.rds", - "estimates_000000001_lgumbel.rds", "estimates_000000001_lnorm.rds", - "estimates_000000002_lgumbel.rds", "estimates_000000002_lnorm.rds" + expect_identical(list.files(dir), c( + "data_000000000_lgumbel.csv", "data_000000000_lnorm.csv", "data_000000001_lgumbel.csv", + "data_000000001_lnorm.csv", "data_000000002_lgumbel.csv", "data_000000002_lnorm.csv", + "estimates_000000000_lgumbel.rds", "estimates_000000000_lnorm.rds", + "estimates_000000001_lgumbel.rds", "estimates_000000001_lnorm.rds", + "estimates_000000002_lgumbel.rds", "estimates_000000002_lnorm.rds" )) }) @@ -711,7 +741,7 @@ test_that("hc multis match", { hc_ff <- ssd_hc(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_samples") set.seed(102) hc_tt <- ssd_hc(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = TRUE, ci_method = "multi_fixed") - + expect_identical(hc_tf$est, hc_tt$est) expect_identical(hc_ft$est, hc_ff$est) expect_identical(hc_ft$se, hc_tt$se) @@ -721,33 +751,33 @@ test_that("hc multis match", { test_that("hc weighted bootie", { fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) - hc_weighted2 <- ssd_hc(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_samples", - samples = TRUE) + hc_weighted2 <- ssd_hc(fits, + ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_samples", + samples = TRUE + ) set.seed(102) hc_unweighted2 <- ssd_hc(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_arithmetic", samples = TRUE) - + expect_identical(hc_weighted2$est, hc_unweighted2$est) expect_identical(length(hc_weighted2$samples[[1]]), 11L) expect_identical(length(hc_unweighted2$samples[[1]]), 60L) - + expect_snapshot_boot_data(hc_weighted2, "hc_weighted2") expect_snapshot_boot_data(hc_unweighted2, "hc_unweighted2") }) test_that("hc percent deprecated", { - fits <- ssd_fit_dists(ssddata::ccme_boron) lifecycle::expect_deprecated(hc <- ssd_hc(fits, percent = 10)) hc2 <- ssd_hc(fits, proportion = 0.1) expect_identical(hc2, hc) - + lifecycle::expect_deprecated(hc <- ssd_hc(fits, percent = c(5, 10))) hc2 <- ssd_hc(fits, proportion = c(0.05, 0.1)) expect_identical(hc2, hc) }) test_that("hc proportion multiple decimal places", { - fits <- ssd_fit_dists(ssddata::ccme_boron) hc2 <- ssd_hc(fits, proportion = 0.111111) expect_identical(hc2$proportion, 0.111111) diff --git a/tests/testthat/test-hcp-root.R b/tests/testthat/test-hcp-root.R index 100e4ddce..ad9263fd6 100644 --- a/tests/testthat/test-hcp-root.R +++ b/tests/testthat/test-hcp-root.R @@ -1,4 +1,4 @@ -# Copyright 2023 Australian Government Department of +# Copyright 2023 Australian Government Department of # Climate Change, Energy, the Environment and Water # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,11 +17,11 @@ test_that("hp is hc conc = 1 ci_method = 'multi_fixed'", { fits <- ssd_fit_dists(ssddata::ccme_boron) conc <- 1 hp_multi <- ssd_hp(fits, conc = conc, average = TRUE, ci_method = "multi_fixed") - hc_multi <- ssd_hc(fits, proportion = hp_multi$est/100, average = TRUE, ci_method = "multi_fixed") + hc_multi <- ssd_hc(fits, proportion = hp_multi$est / 100, average = TRUE, ci_method = "multi_fixed") expect_equal(hc_multi$est, 1) - for(i in 1:10) { + for (i in 1:10) { hp_multi <- ssd_hp(fits, conc = hc_multi$est, average = TRUE, ci_method = "multi_fixed") - hc_multi <- ssd_hc(fits, proportion = hp_multi$est/100, average = TRUE, ci_method = "multi_fixed") + hc_multi <- ssd_hc(fits, proportion = hp_multi$est / 100, average = TRUE, ci_method = "multi_fixed") } expect_equal(hc_multi$est, 1) }) @@ -30,11 +30,11 @@ test_that("hp is hc conc = 10 ci_method = 'multi_fixed'", { fits <- ssd_fit_dists(ssddata::ccme_boron) conc <- 10 hp_multi <- ssd_hp(fits, conc = conc, average = TRUE, ci_method = "multi_fixed") - hc_multi <- ssd_hc(fits, proportion = hp_multi$est/100, average = TRUE, ci_method = "multi_fixed") + hc_multi <- ssd_hc(fits, proportion = hp_multi$est / 100, average = TRUE, ci_method = "multi_fixed") expect_equal(hc_multi$est, 10.00000012176) - for(i in 1:10) { + for (i in 1:10) { hp_multi <- ssd_hp(fits, conc = hc_multi$est, average = TRUE, ci_method = "multi_fixed") - hc_multi <- ssd_hc(fits, proportion = hp_multi$est/100, average = TRUE, ci_method = "multi_fixed") + hc_multi <- ssd_hc(fits, proportion = hp_multi$est / 100, average = TRUE, ci_method = "multi_fixed") } expect_equal(hc_multi$est, 10) }) diff --git a/tests/testthat/test-hp-burrlioz.R b/tests/testthat/test-hp-burrlioz.R index 6ea639d01..f726f86d3 100644 --- a/tests/testthat/test-hp-burrlioz.R +++ b/tests/testthat/test-hp-burrlioz.R @@ -42,7 +42,7 @@ test_that("ssd_hp_burrlioz currently errors!", { fit <- ssd_fit_burrlioz(data) expect_identical(names(fit), "burrIII3") set.seed(47) - #FIXME: currently errors! + # FIXME: currently errors! expect_error(hp_burrIII3 <- ssd_hp(fit, nboot = 10, ci = TRUE, min_pboot = 0)) }) @@ -53,8 +53,8 @@ test_that("ssd_hp_burrlioz gets estimates with burrIII3 parametric", { expect_identical(names(fit), "burrIII3") set.seed(49) hp_burrIII3 <- ssd_hp(fit, - nboot = 10, ci = TRUE, min_pboot = 0, - parametric = TRUE, samples = TRUE + nboot = 10, ci = TRUE, min_pboot = 0, + parametric = TRUE, samples = TRUE ) expect_snapshot_data(hp_burrIII3, "hp_burrIII3_parametric") }) diff --git a/tests/testthat/test-hp-root.R b/tests/testthat/test-hp-root.R index 23517e9fb..9990c15e6 100644 --- a/tests/testthat/test-hp-root.R +++ b/tests/testthat/test-hp-root.R @@ -1,4 +1,4 @@ -# Copyright 2023 Australian Government Department of +# Copyright 2023 Australian Government Department of # Climate Change, Energy, the Environment and Water # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,7 +14,6 @@ # limitations under the License. test_that("hp multi_ci lnorm", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(102) hp_dist <- ssd_hp(fits, average = FALSE, ci_method = "weighted_arithmetic") @@ -24,7 +23,7 @@ test_that("hp multi_ci lnorm", { expect_equal(hp_multi, hp_average) expect_equal(hp_average$est, 1.9543030195088, tolerance = 1e-5) expect_equal(hp_multi$est, 1.95430301950878, tolerance = 1e-5) - + testthat::expect_snapshot({ hp_multi }) @@ -36,8 +35,8 @@ test_that("hp multi_ci all", { hp_average <- ssd_hp(fits, average = TRUE) hp_multi <- ssd_hp(fits, average = TRUE, ci_method = "multi_fixed") expect_equal(hp_multi, hp_average) - expect_equal(hp_average$est, 3.89879276872944, tolerance = 1e-6) - expect_equal(hp_multi$est, 3.89879276872944, tolerance = 1e-6) + expect_equal(hp_average$est, 3.89879276872944, tolerance = 1e-5) + expect_equal(hp_multi$est, 3.89879276872944, tolerance = 1e-5) testthat::expect_snapshot({ hp_multi }) @@ -51,15 +50,15 @@ test_that("hp multi_ci lnorm ci", { hp_average <- ssd_hp(fits, average = TRUE, ci = TRUE, nboot = 100, ci_method = "weighted_arithmetic", multi_est = TRUE) set.seed(102) hp_multi <- ssd_hp(fits, average = TRUE, ci_method = "multi_fixed", ci = TRUE, nboot = 100) - + testthat::expect_snapshot({ hp_average }) - + testthat::expect_snapshot({ hp_multi }) - + hp_dist$dist <- NULL hp_average$dist <- NULL expect_equal(hp_dist, hp_average) diff --git a/tests/testthat/test-hp.R b/tests/testthat/test-hp.R index 3a44a2db3..1da7ef294 100644 --- a/tests/testthat/test-hp.R +++ b/tests/testthat/test-hp.R @@ -13,7 +13,6 @@ # limitations under the License. test_that("hp", { - fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) @@ -23,7 +22,6 @@ test_that("hp", { }) test_that("hp fitdists works with zero length conc", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, numeric(0)) @@ -37,7 +35,6 @@ test_that("hp fitdists works with zero length conc", { }) test_that("hp fitdist works with missing conc", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, NA_real_) @@ -46,7 +43,6 @@ test_that("hp fitdist works with missing conc", { }) test_that("hp fitdist works with 0 conc", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, 0) @@ -55,7 +51,6 @@ test_that("hp fitdist works with 0 conc", { }) test_that("hp fitdist works with negative conc", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, -1) @@ -64,7 +59,6 @@ test_that("hp fitdist works with negative conc", { }) test_that("hp fitdist works with -Inf conc", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, -Inf) @@ -73,7 +67,6 @@ test_that("hp fitdist works with -Inf conc", { }) test_that("hp fitdist works with Inf conc", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, Inf) @@ -82,7 +75,6 @@ test_that("hp fitdist works with Inf conc", { }) test_that("hp fitdists works reasonable conc", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, 1) @@ -91,7 +83,6 @@ test_that("hp fitdists works reasonable conc", { }) test_that("hp fitdists works with multiple concs", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") hp <- ssd_hp(fits, c(2.5, 1), ci_method = "multi_fixed") @@ -100,7 +91,6 @@ test_that("hp fitdists works with multiple concs", { }) test_that("hp fitdists works with cis", { - fits <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(10) @@ -110,7 +100,6 @@ test_that("hp fitdists works with cis", { }) test_that("hp fitdists works with multiple dists", { - fits <- ssd_fit_dists(ssddata::ccme_boron) hp <- ssd_hp(fits, 1) @@ -119,7 +108,6 @@ test_that("hp fitdists works with multiple dists", { }) test_that("hp fitdists works not average multiple dists", { - fits <- ssd_fit_dists(ssddata::ccme_boron) hp <- ssd_hp(fits, 1, average = FALSE) @@ -131,13 +119,13 @@ test_that("hp fitdists gives different answer with model averaging as hc not sam data <- ssddata::aims_molybdenum_marine fits_lgumbel <- ssd_fit_dists(data, dists = "lgumbel") - expect_equal(ssd_hp(fits_lgumbel, ssd_hc(fits_lgumbel, proportion = 5/100)$est)$est, 5) + expect_equal(ssd_hp(fits_lgumbel, ssd_hc(fits_lgumbel, proportion = 5 / 100)$est)$est, 5) fits_lnorm_lnorm <- ssd_fit_dists(data, dists = "lnorm_lnorm") - expect_equal(ssd_hp(fits_lnorm_lnorm, ssd_hc(fits_lnorm_lnorm, proportion = 5/100)$est)$est, 5) + expect_equal(ssd_hp(fits_lnorm_lnorm, ssd_hc(fits_lnorm_lnorm, proportion = 5 / 100)$est)$est, 5) fits_both <- ssd_fit_dists(data, dists = c("lgumbel", "lnorm_lnorm"), min_pmix = 0) - expect_equal(ssd_hp(fits_both, ssd_hc(fits_both, proportion = 5/100, ci_method = "weighted_arithmetic", multi_est = FALSE)$est)$est, 4.59185244765045) + expect_equal(ssd_hp(fits_both, ssd_hc(fits_both, proportion = 5 / 100, ci_method = "weighted_arithmetic", multi_est = FALSE)$est)$est, 4.59194131309822, tolerance = 1e-06) }) test_that("ssd_hp fitdists correct for rescaling", { @@ -149,7 +137,6 @@ test_that("ssd_hp fitdists correct for rescaling", { }) test_that("hp fitdists with no fitdists", { - x <- list() class(x) <- c("fitdists") hp <- ssd_hp(x, 1) @@ -171,13 +158,12 @@ test_that("ssd_hp doesn't calculate cis with inconsistent censoring", { set.seed(10) expect_warning( hp <- ssd_hp(fits, 1, ci = TRUE, nboot = 10), - "^Parametric CIs cannot be calculated for inconsistently censored data[.]$" + "^Parametric CIs cannot be calculated for censored data[.]$" ) expect_identical(hp$se, NA_real_) }) test_that("ssd_hp same with equally weighted data", { - data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -197,7 +183,7 @@ test_that("ssd_hp calculates cis with equally weighted data", { fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") set.seed(10) hp <- ssd_hp(fits, 1, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") - expect_equal(hp$se, 1.4551513510538, tolerance = 1e-6) + expect_equal(hp$se, 1.4551513510538, tolerance = 1e-5) }) test_that("ssd_hp calculates cis with two distributions", { @@ -205,7 +191,7 @@ test_that("ssd_hp calculates cis with two distributions", { fits <- ssd_fit_dists(data, dists = c("lnorm", "llogis")) set.seed(10) hp <- ssd_hp(fits, 1, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") - expect_equal(hp$se, 1.4500084773305, tolerance = 1e-6) + expect_equal(hp$se, 1.4500084773305, tolerance = 1e-5) }) test_that("ssd_hp calculates cis in parallel but one distribution", { @@ -214,7 +200,7 @@ test_that("ssd_hp calculates cis in parallel but one distribution", { fits <- ssd_fit_dists(data, dists = "lnorm") set.seed(10) hp <- ssd_hp(fits, 1, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") - expect_equal(hp$se, 1.4551513510538, tolerance = 1e-6) + expect_equal(hp$se, 1.4551513510538, tolerance = 1e-5) }) test_that("ssd_hp calculates cis in parallel with two distributions", { @@ -223,11 +209,10 @@ test_that("ssd_hp calculates cis in parallel with two distributions", { fits <- ssd_fit_dists(data, dists = c("lnorm", "llogis")) set.seed(10) hp <- ssd_hp(fits, 1, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") - expect_equal(hp$se, 1.4500084773305, tolerance = 1e-6) + expect_equal(hp$se, 1.4500084773305, tolerance = 1e-5) }) test_that("ssd_hp doesn't calculate cis with unequally weighted data", { - data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) data$Weight[1] <- 2 @@ -240,7 +225,6 @@ test_that("ssd_hp doesn't calculate cis with unequally weighted data", { }) test_that("ssd_hp no effect with higher weight one distribution", { - data <- ssddata::ccme_boron data$Weight <- rep(1, nrow(data)) fits <- ssd_fit_dists(data, weight = "Weight", dists = "lnorm") @@ -263,14 +247,13 @@ test_that("ssd_hp effect with higher weight two distributions", { hp <- ssd_hp(fits, 3, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") set.seed(10) hp_10 <- ssd_hp(fits_10, 3, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic") - expect_equal(hp$est, 11.753562486648, tolerance = 1e-6) - expect_equal(hp_10$est, 11.931807182972, tolerance = 1e-6) - expect_equal(hp$se, 4.5637225910467, tolerance = 1e-6) - expect_equal(hp_10$se, 4.83426079388412, tolerance = 1e-6) + expect_equal(hp$est, 11.753562486648, tolerance = 1e-5) + expect_equal(hp_10$est, 11.931807182972, tolerance = 1e-5) + expect_equal(hp$se, 4.5637225910467, tolerance = 1e-5) + expect_equal(hp_10$se, 4.83426079388412, tolerance = 1e-5) }) test_that("ssd_hp cis with non-convergence", { - set.seed(99) conc <- ssd_rlnorm_lnorm(100, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -285,7 +268,6 @@ test_that("ssd_hp cis with non-convergence", { }) test_that("ssd_hp cis with error and multiple dists", { - set.seed(99) conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) data <- data.frame(Conc = conc) @@ -306,7 +288,6 @@ test_that("ssd_hp cis with error and multiple dists", { }) test_that("ssd_hp with 1 bootstrap", { - fit <- ssd_fit_dists(ssddata::ccme_boron, dists = "lnorm") set.seed(10) hp <- ssd_hp(fit, 1, ci = TRUE, nboot = 1, ci_method = "weighted_arithmetic", samples = TRUE) @@ -315,11 +296,11 @@ test_that("ssd_hp with 1 bootstrap", { test_that("ssd_hp fix_weight", { fits <- ssd_fit_dists(ssddata::ccme_boron, dist = c("lnorm", "lgumbel")) - + set.seed(102) hc_unfix <- ssd_hp(fits, nboot = 100, ci = TRUE, ci_method = "multi_free", samples = TRUE) expect_snapshot_data(hc_unfix, "hc_unfix") - + set.seed(102) hc_fix <- ssd_hp(fits, nboot = 100, ci = TRUE, ci_method = "multi_fixed", samples = TRUE) expect_snapshot_data(hc_fix, "hc_fix") @@ -335,7 +316,7 @@ test_that("hp multis match", { hp_ff <- ssd_hp(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_samples") set.seed(102) hp_tt <- ssd_hp(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = TRUE, ci_method = "multi_fixed") - + expect_identical(hp_tf$est, hp_tt$est) expect_identical(hp_ft$est, hp_ff$est) expect_identical(hp_ft$se, hp_tt$se) @@ -345,15 +326,17 @@ test_that("hp multis match", { test_that("hp weighted bootie", { fits <- ssd_fit_dists(ssddata::ccme_boron) set.seed(102) - hp_weighted2 <- ssd_hp(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_samples", - samples = TRUE) + hp_weighted2 <- ssd_hp(fits, + ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_samples", + samples = TRUE + ) set.seed(102) hp_unweighted2 <- ssd_hp(fits, ci = TRUE, nboot = 10, average = TRUE, multi_est = FALSE, ci_method = "weighted_arithmetic", samples = TRUE) - + expect_identical(hp_weighted2$est, hp_unweighted2$est) expect_identical(length(hp_weighted2$samples[[1]]), 11L) expect_identical(length(hp_unweighted2$samples[[1]]), 60L) - + expect_snapshot_boot_data(hp_weighted2, "hp_weighted2") expect_snapshot_boot_data(hp_unweighted2, "hp_unweighted2") }) diff --git a/tests/testthat/test-invpareto.R b/tests/testthat/test-invpareto.R index 0f7e5568d..a23a56370 100644 --- a/tests/testthat/test-invpareto.R +++ b/tests/testthat/test-invpareto.R @@ -45,7 +45,8 @@ test_that("invpareto initial shape is MLEs", { fit <- ssd_fit_dists(data, dists = "invpareto") expect_equal( estimates(fit), - list(invpareto.weight = 1, invpareto.scale = 1.03299515712949, invpareto.shape = 4.14668077241)) + list(invpareto.weight = 1, invpareto.scale = 1.03299515712949, invpareto.shape = 4.14668077241) + ) }) test_that("invpareto unbiased scale estimator small n", { @@ -119,5 +120,6 @@ test_that("invpareto with extreme data", { fit99r <- ssd_fit_dists(data, dists = "invpareto", rescale = TRUE) expect_equal( estimates(fit99r), - list(invpareto.weight = 1, invpareto.scale = 1.03020756694085, invpareto.shape = 26.0278618888664)) + list(invpareto.weight = 1, invpareto.scale = 1.03020756694085, invpareto.shape = 26.0278618888664) + ) }) diff --git a/tests/testthat/test-lgumbel-deprecated.R b/tests/testthat/test-lgumbel-deprecated.R index 3b09eb7bf..56f921cf2 100644 --- a/tests/testthat/test-lgumbel-deprecated.R +++ b/tests/testthat/test-lgumbel-deprecated.R @@ -13,146 +13,17 @@ # limitations under the License. test_that("dlgumbel extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(dlgumbel(numeric(0)), numeric(0)) - expect_identical(dlgumbel(NA), NA_real_) - expect_identical(dlgumbel(NaN), NaN) - expect_identical(dlgumbel(0), 0) - expect_equal(dlgumbel(1), 0.367879441171442) - expect_equal(dlgumbel(1, log = TRUE), log(dlgumbel(1))) - expect_equal(dlgumbel(1, scalelog = -1), NaN) - expect_identical(dlgumbel(0), 0) - expect_identical(dlgumbel(-Inf), 0) - expect_identical(dlgumbel(Inf), 0) - expect_identical( - dlgumbel(c(NA, NaN, 0, Inf, -Inf)), - c(dlgumbel(NA), dlgumbel(NaN), dlgumbel(0), dlgumbel(Inf), dlgumbel(-Inf)) - ) - expect_equal( - dlgumbel(1:2, locationlog = 1:2, scalelog = 3:4), - c(dlgumbel(1, 1, 3), dlgumbel(2, 2, 4)) - ) - expect_equal( - dlgumbel(1:2, locationlog = c(1, NA), scalelog = 3:4), - c(dlgumbel(1, 1, 3), NA) - ) + expect_defunct(dlgumbel(numeric(0))) }) test_that("plgumbel extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(plgumbel(numeric(0)), numeric(0)) - expect_identical(plgumbel(NA), NA_real_) - expect_identical(plgumbel(NaN), NaN) - expect_identical(plgumbel(0), 0) - expect_equal(plgumbel(1), 0.367879441171442) - expect_equal(plgumbel(1, log.p = TRUE), log(plgumbel(1))) - expect_equal(plgumbel(1, lower.tail = FALSE), 1 - plgumbel(1)) - expect_equal(plgumbel(1, lower.tail = FALSE, log.p = TRUE), log(1 - plgumbel(1))) - expect_equal(plgumbel(1, scalelog = -1), NaN) - expect_identical(plgumbel(0), 0) - expect_identical(plgumbel(-Inf), 0) - expect_identical(plgumbel(Inf), 1) - expect_identical( - plgumbel(c(NA, NaN, 0, Inf, -Inf)), - c(plgumbel(NA), plgumbel(NaN), plgumbel(0), plgumbel(Inf), plgumbel(-Inf)) - ) - expect_equal( - plgumbel(1:2, locationlog = 1:2, scalelog = 3:4), - c(plgumbel(1, 1, 3), plgumbel(2, 2, 4)) - ) - expect_equal( - plgumbel(1:2, locationlog = c(1, NA), scalelog = 3:4), - c(plgumbel(1, 1, 3), NA) - ) + expect_defunct(plgumbel(numeric(0))) }) test_that("qlgumbel extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(qlgumbel(numeric(0)), numeric(0)) - expect_identical(qlgumbel(NA), NA_real_) - expect_identical(qlgumbel(NaN), NaN) - expect_identical(qlgumbel(0), 0) - expect_identical(qlgumbel(1), Inf) - expect_equal(qlgumbel(0.75), 3.47605949678221) - expect_equal(qlgumbel(0.75, log.p = TRUE), NaN) - expect_equal(qlgumbel(log(0.75), log.p = TRUE), qlgumbel(0.75)) - expect_equal(qlgumbel(0.75, lower.tail = FALSE), qlgumbel(0.25)) - expect_equal(qlgumbel(log(0.75), lower.tail = FALSE, log.p = TRUE), qlgumbel(0.25)) - expect_equal(qlgumbel(0.5, scalelog = -1), NaN) - expect_identical(qlgumbel(0), 0) - expect_identical(qlgumbel(-Inf), NaN) - expect_identical(qlgumbel(Inf), NaN) - expect_identical( - qlgumbel(c(NA, NaN, 0, Inf, -Inf)), - c(qlgumbel(NA), qlgumbel(NaN), qlgumbel(0), qlgumbel(Inf), qlgumbel(-Inf)) - ) - expect_equal( - qlgumbel(1:2, locationlog = 1:2, scalelog = 3:4), - c(qlgumbel(1, 1, 3), qlgumbel(2, 2, 4)) - ) - expect_equal(qlgumbel(1:2, locationlog = c(1, NA), scalelog = 3:4), c(Inf, NaN)) - expect_equal(qlgumbel(plgumbel(c(0, 0.1, 0.5, 0.9, 1))), c(0, 0.1, 0.5, 0.9, 1)) + expect_defunct(qlgumbel(numeric(0))) }) test_that("rlgumbel extremes", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_identical(rlgumbel(numeric(0)), numeric(0)) - expect_error(rlgumbel(NA)) - expect_identical(rlgumbel(0), numeric(0)) - set.seed(42) - expect_equal(rlgumbel(1), 11.2305025213646) - set.seed(42) - expect_equal(rlgumbel(1.9), 11.2305025213646) - set.seed(42) - expect_equal(rlgumbel(2), c(11.2305025213646, 15.3866236451648)) - set.seed(42) - expect_equal(rlgumbel(3:4), c(11.2305025213646, 15.3866236451648)) - expect_equal(rlgumbel(0, scalelog = -1), numeric(0)) - expect_equal(rlgumbel(1, scalelog = -1), NaN) - expect_equal(rlgumbel(2, scalelog = -1), c(NaN, NaN)) - expect_error(rlgumbel(1, locationlog = 1:2)) - expect_error(rlgumbel(1, scalelog = 1:2)) - expect_identical(rlgumbel(1, locationlog = NA), NA_real_) - expect_identical(rlgumbel(1, scalelog = NA), NA_real_) -}) - -test_that("dlgumbel values", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_equal(dlgumbel(1), 0.367879441171442) - expect_equal(dlgumbel(2), 0.151632664928158) - expect_equal(dlgumbel(c(1, 2)), c(0.367879441171442, 0.151632664928158)) - expect_equal(dlgumbel(exp(3), 3, 1), 0.0183156388887342) - expect_equal(dlgumbel(exp(4), 3, 1), 0.00466401114120162) -}) - -test_that("plgumbel values", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_equal(plgumbel(exp(3), 3, 1), 0.367879441171442) - expect_equal(plgumbel(exp(4), 3, 1), 0.692200627555346) - expect_identical(plgumbel(qlgumbel(0.5, 3, 1), 3, 1), 0.5) -}) - -test_that("qlgumbel values", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_equal(qlgumbel(0.5), 1.44269504088896) - expect_equal( - log(qlgumbel(c(0.2, 0.5, 0.9), 3, 1)), - c(2.52411500467289, 3.36651292058166, 5.25036732731245) - ) - expect_equal(log(qlgumbel(c(0.2, 0.5, 0.9), 3, 1, - lower.tail = FALSE - )), c(4.49993998675952, 3.36651292058166, 2.16596755475204)) - - expect_identical( - log(qlgumbel(-1, log.p = TRUE)), - log(qlgumbel(exp(-1))) - ) -}) - -test_that("rlgumbel values", { - withr::local_options(lifecycle_verbosity = "quiet") - set.seed(99) - expect_equal(rlgumbel(1), 1.86346012295971) - set.seed(99) - expect_equal(rlgumbel(2), c(1.86346012295971, 0.460092963476341)) + expect_defunct(rlgumbel(numeric(0))) }) diff --git a/tests/testthat/test-lnorm-lnorm.R b/tests/testthat/test-lnorm-lnorm.R index 5f1359d17..686a450e5 100644 --- a/tests/testthat/test-lnorm-lnorm.R +++ b/tests/testthat/test-lnorm-lnorm.R @@ -44,14 +44,14 @@ test_that("ssd_rlnorm_lnorm allows reversed distributions", { test_that("lnorm_lnorm positive q with extreme distribution", { expect_equal(qlnorm_lnorm_ssd(0.05, - meanlog1 = -10.39362, sdlog1 = 0.399835, - meanlog2 = -4.76721, sdlog2 = 2.583824, pmix = 0.1308133 + meanlog1 = -10.39362, sdlog1 = 0.399835, + meanlog2 = -4.76721, sdlog2 = 2.583824, pmix = 0.1308133 ), 2.49076867209839e-05) }) test_that("lnorm_lnorm positive q with extreme large distribution", { expect_equal(qlnorm_lnorm_ssd(0.99, - meanlog1 = -4.76721, sdlog1 = 0.399835, - meanlog2 = 100.39362, sdlog2 = 2.583824, pmix = 0.1308133 + meanlog1 = -4.76721, sdlog1 = 0.399835, + meanlog2 = 100.39362, sdlog2 = 2.583824, pmix = 0.1308133 ), 1.41684268426224e+46) }) diff --git a/tests/testthat/test-lnorm.R b/tests/testthat/test-lnorm.R index 1f177c64f..597d0ae43 100644 --- a/tests/testthat/test-lnorm.R +++ b/tests/testthat/test-lnorm.R @@ -19,9 +19,3 @@ test_that("lnorm", { set.seed(42) expect_equal(ssd_rlnorm(2), c(3.93912432924107, 0.568531719998709)) }) - -test_that("lnorm with pearson1000 converges", { - data <- ssdtools::pearson1000 - fit <- ssd_fit_dists(data, dists = "lnorm") - expect_snapshot_value(estimates(fit), style = "deparse", tolerance = 1e-6) -}) diff --git a/tests/testthat/test-multi.R b/tests/testthat/test-multi.R index 4cd1e51ca..0bc3233ca 100644 --- a/tests/testthat/test-multi.R +++ b/tests/testthat/test-multi.R @@ -1,4 +1,4 @@ -# Copyright 2023 Australian Government Department of +# Copyright 2023 Australian Government Department of # Climate Change, Energy, the Environment and Water # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -19,12 +19,16 @@ test_that("multi", { expect_equal(ssd_qmulti(0.75), 1.96303108415826) set.seed(42) expect_equal(ssd_rmulti(2), c(3.93912428813385, 4.62130564767823)) - - expect_equal(ssd_qmulti(ssd_pmulti(c(0, 0.1, 0.5, 0.9, 0.99))), - c(0, 0.1, 0.5, 0.9, 0.99), tolerance = 1e-5) - - expect_equal(ssd_pmulti(ssd_qmulti(c(0, 0.1, 0.5, 0.9, 0.99))), - c(0, 0.1, 0.5, 0.9, 0.99), tolerance = 1e-6) + + expect_equal(ssd_qmulti(ssd_pmulti(c(0, 0.1, 0.5, 0.9, 0.99))), + c(0, 0.1, 0.5, 0.9, 0.99), + tolerance = 1e-5 + ) + + expect_equal(ssd_pmulti(ssd_qmulti(c(0, 0.1, 0.5, 0.9, 0.99))), + c(0, 0.1, 0.5, 0.9, 0.99), + tolerance = 1e-6 + ) }) test_that("ssd_pmulti", { @@ -35,20 +39,20 @@ test_that("ssd_pmulti", { expect_equal(.ssd_pmulti_fitdists(Inf, fit), 1) expect_equal(.ssd_pmulti_fitdists(0, fit), 0) pone <- 0.0389879276872944 - expect_equal(.ssd_pmulti_fitdists(1, fit), pone, tolerance = 1e-6) + expect_equal(.ssd_pmulti_fitdists(1, fit), pone, tolerance = 1e-5) expect_equal(.ssd_pmulti_fitdists(10000, fit), 0.999954703139271, tolerance = 1e-6) - expect_equal(.ssd_pmulti_fitdists(c(1,2), fit), c(pone, 0.0830184001863268), tolerance = 1e-6) - expect_equal(.ssd_pmulti_fitdists(c(1,NA), fit), c(pone, NA), tolerance = 1e-6) - expect_equal(.ssd_pmulti_fitdists(1, fit, lower.tail = FALSE), 1-pone, tolerance = 1e-6) + expect_equal(.ssd_pmulti_fitdists(c(1, 2), fit), c(pone, 0.0830184001863268), tolerance = 1e-5) + expect_equal(.ssd_pmulti_fitdists(c(1, NA), fit), c(pone, NA), tolerance = 1e-5) + expect_equal(.ssd_pmulti_fitdists(1, fit, lower.tail = FALSE), 1 - pone, tolerance = 1e-6) expect_equal(.ssd_pmulti_fitdists(1, fit, log.p = TRUE), log(pone), tolerance = 1e-6) - expect_equal(.ssd_pmulti_fitdists(1, fit, lower.tail = FALSE, log.p = TRUE), log(1-pone), tolerance = 1e-6) + expect_equal(.ssd_pmulti_fitdists(1, fit, lower.tail = FALSE, log.p = TRUE), log(1 - pone), tolerance = 1e-5) }) test_that("ssd_pmulti weights", { fit <- ssd_fit_dists(data = ssddata::ccme_boron) args <- estimates(fit) args$q <- 1 - expect_equal(do.call("ssd_pmulti", args), 0.0389879276872944, tolerance = 1e-6) + expect_equal(do.call("ssd_pmulti", args), 0.0389879276872944, tolerance = 1e-5) args$gamma.weight <- 0 args$lgumbel.weight <- 0 args$llogis.weight <- 0 @@ -73,8 +77,8 @@ test_that("ssd_qmulti", { expect_identical(.ssd_qmulti_fitdists(1, fit), Inf) expect_equal(.ssd_qmulti_fitdists(0, fit), 0) q75 <- 32.47404165648 - expect_equal(.ssd_qmulti_fitdists(0.5, fit), 15.3258154238153, tolerance = 1e-6) - expect_equal(.ssd_qmulti_fitdists(c(0.5, 0.75), fit), c(15.3258154238153, q75), tolerance = 1e-6) + expect_equal(.ssd_qmulti_fitdists(0.5, fit), 15.3258154238153, tolerance = 1e-5) + expect_equal(.ssd_qmulti_fitdists(c(0.5, 0.75), fit), c(15.3258154238153, q75), tolerance = 1e-5) expect_equal(.ssd_qmulti_fitdists(0.25, fit, lower.tail = FALSE), q75, tolerance = 1e-6) expect_equal(.ssd_qmulti_fitdists(log(0.75), fit, log.p = TRUE), q75, tolerance = 1e-6) expect_equal(.ssd_qmulti_fitdists(log(0.25), fit, lower.tail = FALSE, log.p = TRUE), q75, tolerance = 1e-6) @@ -105,31 +109,33 @@ test_that("ssd_rmulti", { args$n <- 0 expect_equal(.ssd_rmulti_fitdists(n = 0, fit), numeric(0)) set.seed(99) - expect_equal(.ssd_rmulti_fitdists(n = 1, fit), 19.7526821719427, tolerance = 1e-6) + expect_equal(.ssd_rmulti_fitdists(n = 1, fit), 19.7526821719427, tolerance = 1e-5) set.seed(99) expect_equal(.ssd_rmulti_fitdists(2, fit), c(19.7526668357838, 2.69561402072501), tolerance = 1e-6) set.seed(99) n100 <- .ssd_rmulti_fitdists(100, fit) expect_identical(length(n100), 100L) expect_equal(min(n100), 0.029587302066941, tolerance = 1e-6) - expect_equal(max(n100), 168.790837576735, tolerance = 1e-6) + expect_equal(max(n100), 168.790837576735, tolerance = 1e-5) expect_equal(mean(n100), 23.407676351398, tolerance = 1e-6) }) test_that("ssd_rmulti all", { set.seed(99) - n100 <- ssd_rmulti(n = 100, - burrIII3.weight = 1/10, - gamma.weight = 1/10, - gompertz.weight = 1/10, - invpareto.weight = 1/10, - lgumbel.weight = 1/10, - llogis.weight = 1/10, - llogis_llogis.weight = 1/10, - lnorm.weight = 1/10, - lnorm_lnorm.weight = 1/10, - weibull.weight = 1/10) - + n100 <- ssd_rmulti( + n = 100, + burrIII3.weight = 1 / 10, + gamma.weight = 1 / 10, + gompertz.weight = 1 / 10, + invpareto.weight = 1 / 10, + lgumbel.weight = 1 / 10, + llogis.weight = 1 / 10, + llogis_llogis.weight = 1 / 10, + lnorm.weight = 1 / 10, + lnorm_lnorm.weight = 1 / 10, + weibull.weight = 1 / 10 + ) + expect_identical(length(n100), 100L) expect_equal(min(n100), 0.00207737078515415) expect_equal(max(n100), 1.58073733537801) @@ -137,7 +143,7 @@ test_that("ssd_rmulti all", { }) test_that("ssd_emulti", { - estimates <- ssd_emulti() + estimates <- ssd_emulti() expect_snapshot(estimates) args <- estimates args$q <- 1 diff --git a/tests/testthat/test-plot-cdf.R b/tests/testthat/test-plot-cdf.R index bb706411d..3caaed88d 100644 --- a/tests/testthat/test-plot-cdf.R +++ b/tests/testthat/test-plot-cdf.R @@ -20,12 +20,12 @@ test_that("ssd_plot_cdf", { expect_snapshot_plot(ssd_plot_cdf(fits, average = NA), "fits_average_na") }) -test_that("autoplot deals with rescaled data", { +test_that("ssd_plot_cdf deals with rescaled data", { fits <- ssd_fit_dists(ssddata::ccme_boron, rescale = TRUE) expect_snapshot_plot(ssd_plot_cdf(fits), "fits_rescale") }) -test_that("autoplot deals with named list", { +test_that("ssd_plot_cdf deals with named list", { expect_snapshot_plot( ssd_plot_cdf(list( llogis = c(locationlog = 2, scalelog = 1), @@ -40,3 +40,12 @@ test_that("autoplot deals with delta", { fits <- ssd_fit_dists(ssddata::ccme_boron, dists = dists, at_boundary_ok = TRUE, computable = FALSE) expect_snapshot_plot(ssd_plot_cdf(fits, delta = Inf), "fits_delta") }) + +test_that("ssd_plot_cdf language", { + data <- ssddata::ccme_boron + data$Conc <- data$Conc * 100 + fits <- ssd_fit_dists(data) + + expect_snapshot_plot(ssd_plot_cdf(fits, suffix = "="), "suffix") + expect_snapshot_plot(ssd_plot_cdf(fits, big.mark = "_"), "fits_bigmark") +}) diff --git a/tests/testthat/test-plot-cf.R b/tests/testthat/test-plot-cf.R index 52afb2faa..78ceb8c72 100644 --- a/tests/testthat/test-plot-cf.R +++ b/tests/testthat/test-plot-cf.R @@ -13,6 +13,5 @@ # limitations under the License. test_that("cfplot", { - withr::local_options(lifecycle_verbosity = "quiet") - expect_snapshot_plot(ssd_plot_cf(ssddata::ccme_boron), "ccme_boron") + expect_defunct(ssd_plot_cf(ssddata::ccme_boron)) }) diff --git a/tests/testthat/test-plot-data.R b/tests/testthat/test-plot-data.R index db672b9a5..46c915eee 100644 --- a/tests/testthat/test-plot-data.R +++ b/tests/testthat/test-plot-data.R @@ -17,6 +17,16 @@ test_that("ssd_plot_data ccme_boron", { }) test_that("ssd_plot_data ccme_boron color", { - expect_snapshot_plot(ssd_plot_data(ssddata::ccme_boron, color = "Group", label = "Species", trans = "identity", - shift_x = 1, add_x = 10), "ccme_boron2") + expect_snapshot_plot(ssd_plot_data(ssddata::ccme_boron, + color = "Group", label = "Species", trans = "identity", + shift_x = 1, add_x = 10, + ), "ccme_boron2") +}) + +test_that("ssd_plot_data ccme_boron language", { + data <- ssddata::ccme_boron + data$Conc <- data$Conc * 100 + expect_snapshot_plot(ssd_plot_data(data, suffix = " %"), "suffix") + expect_snapshot_plot(ssd_plot_data(data), "big_mark_comma") + expect_snapshot_plot(ssd_plot_data(data, big.mark = " "), "big_mark_space") }) diff --git a/tests/testthat/test-predict.R b/tests/testthat/test-predict.R index 431d8bd0b..79052c9d6 100644 --- a/tests/testthat/test-predict.R +++ b/tests/testthat/test-predict.R @@ -13,20 +13,16 @@ # limitations under the License. test_that("predict", { - - fits <- ssd_fit_dists(ssddata::ccme_boron) - + pred <- predict(fits, ci_method = "weighted_samples", multi_est = FALSE) expect_s3_class(pred, "tbl") expect_snapshot_data(pred, "pred_dists") }) test_that("predict cis", { - - fits <- ssd_fit_dists(ssddata::ccme_boron) - + set.seed(10) pred <- predict(fits, ci = TRUE, nboot = 10L, ci_method = "weighted_arithmetic", multi_est = FALSE) expect_s3_class(pred, "tbl") @@ -34,23 +30,21 @@ test_that("predict cis", { }) test_that("predict not average", { - fits <- ssd_fit_dists(ssddata::ccme_boron) - + expect_true(is.fitdists(fits)) - + pred <- predict(fits, average = FALSE, ci_method = "weighted_samples") expect_s3_class(pred, "tbl") expect_snapshot_data(pred, "pred_notaverage") }) test_that("predict cis fitburrlioz", { - fits <- ssd_fit_burrlioz(ssddata::ccme_boron) - + expect_true(is.fitdists(fits)) set.seed(10) - + pred <- predict(fits, ci = TRUE, nboot = 10L) expect_s3_class(pred, "tbl") expect_snapshot_data(pred, "pred_cis_burrlioz") @@ -58,25 +52,26 @@ test_that("predict cis fitburrlioz", { test_that("predict matches ssd_hc with and without average", { - data <- ssddata::ccme_glyphosate - + use_dists <- c("lnorm", "llogis", "lgumbel", "weibull", "gamma", "lnorm_lnorm") - - fit <- ssd_fit_dists(data = data, - left = 'Conc', dists = use_dists, - silent = TRUE, reweight = FALSE, min_pmix = 0, - computable = TRUE, at_boundary_ok = FALSE, rescale = FALSE) - + + fit <- ssd_fit_dists( + data = data, + left = "Conc", dists = use_dists, + silent = TRUE, reweight = FALSE, min_pmix = 0, + computable = TRUE, at_boundary_ok = FALSE, rescale = FALSE + ) + ave5 <- ssd_hc(fit, multi_est = FALSE) multi5 <- ssd_hc(fit, multi_est = TRUE) - + expect_snapshot_data(ave5, "ave5") expect_snapshot_data(multi5, "multi5") - + pred_multi <- predict(fit, ci = FALSE, multi_est = TRUE) pred_ave <- predict(fit, ci = FALSE, multi_est = FALSE) - - expect_identical(pred_ave[pred_ave$proportion == 0.05,]$est, ave5$est) - expect_identical(pred_multi[pred_ave$proportion == 0.05,]$est, multi5$est) + + expect_identical(pred_ave[pred_ave$proportion == 0.05, ]$est, ave5$est) + expect_identical(pred_multi[pred_ave$proportion == 0.05, ]$est, multi5$est) }) diff --git a/tests/testthat/test-ssd-min-pmix.R b/tests/testthat/test-ssd-min-pmix.R index db1758e5a..4ffcee7bd 100644 --- a/tests/testthat/test-ssd-min-pmix.R +++ b/tests/testthat/test-ssd-min-pmix.R @@ -5,7 +5,7 @@ test_that("ssd_min_pmix", { chk::expect_chk_error(ssd_min_pmix(10.5)) expect_identical(ssd_min_pmix(1), 0.5) expect_identical(ssd_min_pmix(2L), 0.5) - expect_identical(ssd_min_pmix(9), 1/3) + expect_identical(ssd_min_pmix(9), 1 / 3) expect_identical(ssd_min_pmix(10), 0.3) expect_identical(ssd_min_pmix(15), 0.2) expect_identical(ssd_min_pmix(20), 0.15) diff --git a/tests/testthat/test-ssd-plot.R b/tests/testthat/test-ssd-plot.R index 86ce5ea80..0679cce2a 100644 --- a/tests/testthat/test-ssd-plot.R +++ b/tests/testthat/test-ssd-plot.R @@ -37,6 +37,17 @@ test_that("ssd_plot xbreaks", { expect_snapshot_plot(ssd_plot(ssddata::ccme_boron, boron_pred, xbreaks = c(1, 2)), "boron_breaks") }) +test_that("ssd_plot language", { + data <- ssddata::ccme_boron + data$Conc <- data$Conc * 100 + boron_pred <- ssdtools::boron_pred + boron_pred$est <- boron_pred$est * 100 + boron_pred$lcl <- boron_pred$lcl * 100 + boron_pred$ucl <- boron_pred$ucl * 100 + expect_snapshot_plot(ssd_plot(data, boron_pred, big.mark = " "), "boron_bigmark") + expect_snapshot_plot(ssd_plot(data, boron_pred, suffix = " %%"), "suffix") +}) + test_that("ssd_plot can't handles missing values all", { data <- ssddata::ccme_boron data$Conc <- NA_real_ diff --git a/tests/testthat/test-summary.R b/tests/testthat/test-summary.R index 3265ac379..1c627ec68 100644 --- a/tests/testthat/test-summary.R +++ b/tests/testthat/test-summary.R @@ -25,6 +25,31 @@ test_that("summary fitdists", { expect_identical(summary$unequal, FALSE) }) +test_that("summary partially left censored", { + data <- ssddata::ccme_boron + data$right <- data$Conc + data$Conc[c(3,6,8)] <- NA + + fits <- ssd_fit_dists(data, dists = "lnorm", right = "right") + summary <- summary(fits) + expect_s3_class(summary, "summary_fitdists") + expect_identical(names(summary), c("fits", "censoring", "nrow", "rescaled", "weighted", "unequal", "min_pmix")) + expect_identical(summary$censoring, c(NA_real_, NA_real_)) + expect_identical(summary$nrow, 28L) + expect_equal(summary$min_pmix, 0.107142857) + expect_identical(summary$rescaled, 1) + expect_identical(summary$weighted, 1) + expect_identical(summary$unequal, FALSE) +}) + +test_that("summary partiaally right censored", { + data <- ssddata::ccme_boron + data$right <- data$Conc + data$right[c(3,6,8)] <- NA + + expect_error(ssd_fit_dists(data, dists = "lnorm", right = "right"), "^Distributions cannot currently be fitted to right censored data\\.$") +}) + test_that("summary fitdists with multiple dists", { data <- ssddata::ccme_boron fits <- ssd_fit_dists(data, rescale = TRUE) @@ -38,7 +63,7 @@ test_that("summary fitdists with multiple dists", { expect_identical(summary$unequal, FALSE) }) -test_that("summary fitdists with censored, rescaled, unequally weighted data", { +test_that("summary fitdists with partially censored, rescaled, unequally weighted data", { data <- ssddata::ccme_boron data$Mass <- seq_len(nrow(data)) data$Other <- data$Conc @@ -47,13 +72,29 @@ test_that("summary fitdists with censored, rescaled, unequally weighted data", { summary <- summary(fits) expect_s3_class(summary, "summary_fitdists") expect_identical(names(summary), c("fits", "censoring", "nrow", "rescaled", "weighted", "unequal", "min_pmix")) - expect_equal(summary$censoring, c(2.4, Inf)) + expect_equal(summary$censoring, c(NA_real_, NA_real_)) expect_identical(summary$nrow, 28L) expect_equal(summary$rescaled, 8.40832920383116) expect_identical(summary$weighted, 28) expect_identical(summary$unequal, TRUE) }) +test_that("summary fitdists with left censored, rescaled, unequally weighted data", { + data <- ssddata::ccme_boron + data$Mass <- seq_len(nrow(data)) + data$Other <- data$Conc + data <- ssd_censor_data(data, right = "Other", censoring = c(2.5, Inf)) + fits <- ssd_fit_dists(data, right = "Other", weight = "Mass", rescale = TRUE, dists = "lnorm") + summary <- summary(fits) + expect_s3_class(summary, "summary_fitdists") + expect_identical(names(summary), c("fits", "censoring", "nrow", "rescaled", "weighted", "unequal", "min_pmix")) + expect_equal(summary$censoring, c(2.5, Inf)) + expect_identical(summary$nrow, 28L) + expect_equal(summary$rescaled, 13.2947358003083) + expect_identical(summary$weighted, 28) + expect_identical(summary$unequal, TRUE) +}) + test_that("summary weighted if equal weights but not 1", { data <- ssddata::ccme_boron data$Mass <- 2 diff --git a/tests/testthat/test-utils.R b/tests/testthat/test-utils.R index e026d86ea..ac9ecb4be 100644 --- a/tests/testthat/test-utils.R +++ b/tests/testthat/test-utils.R @@ -21,6 +21,8 @@ test_that("ssd_ecd_data", { }) test_that("comma_signif", { + withr::local_options(lifecycle_verbosity = "quiet") + expect_identical( comma_signif(c(0.0191, 1, NA, 177, 1111)), c("0.0191", "1", NA, "177", "1,110") diff --git a/tests/testthat/test-weighted.R b/tests/testthat/test-weighted.R index 66cd3ae3d..88e66fc61 100644 --- a/tests/testthat/test-weighted.R +++ b/tests/testthat/test-weighted.R @@ -1,65 +1,70 @@ test_that("weighted errors", { data <- ssddata::ccme_boron - + data$Weight <- 1 data$Weight[rank(data$Conc) > 6] <- 0 - - expect_error(ssd_fit_dists(data, dists="lnorm", weight = "Weight"), - "^`data` has 22 rows with zero weight in 'Weight'\\.$") + + expect_error( + ssd_fit_dists(data, dists = "lnorm", weight = "Weight"), + "^`data` has 22 rows with zero weight in 'Weight'\\.$" + ) data$Weight[rank(data$Conc) > 6] <- -1 - - expect_error(ssd_fit_dists(data, dists="lnorm", weight = "Weight"), - "^`data\\$Weight` must have values between 0 and Inf\\.$") - + + expect_error( + ssd_fit_dists(data, dists = "lnorm", weight = "Weight"), + "^`data\\$Weight` must have values between 0 and Inf\\.$" + ) + data$Weight[rank(data$Conc) > 6] <- Inf - - expect_warning(expect_error(ssd_fit_dists(data, dists="lnorm", weight = "Weight"), - "^All distributions failed to fit\\.$")) - + + expect_warning(expect_error( + ssd_fit_dists(data, dists = "lnorm", weight = "Weight"), + "^All distributions failed to fit\\.$" + )) }) - + test_that("weighted works", { data <- ssddata::ccme_boron - + data$Weight <- 1 - data$Weight[rank(data$Conc) > 6] <- 1/10 - - fitall <- ssd_fit_dists(data, dists="lnorm") + data$Weight[rank(data$Conc) > 6] <- 1 / 10 + + fitall <- ssd_fit_dists(data, dists = "lnorm") hcall <- ssd_hc(fitall) expect_snapshot_data(hcall, "hcall") - - fit1 <- ssd_fit_dists(subset(data, Weight == 1), dists="lnorm") + + fit1 <- ssd_fit_dists(subset(data, Weight == 1), dists = "lnorm") hc1 <- ssd_hc(fit1) expect_snapshot_data(hc1, "hc1") - - fit1w <- ssd_fit_dists(subset(data, Weight == 1), dists="lnorm", weight = "Weight") + + fit1w <- ssd_fit_dists(subset(data, Weight == 1), dists = "lnorm", weight = "Weight") hc1w <- ssd_hc(fit1w) expect_snapshot_data(hc1w, "hc1w") - - fitallw10 <- ssd_fit_dists(data, dists="lnorm", weight = "Weight") + + fitallw10 <- ssd_fit_dists(data, dists = "lnorm", weight = "Weight") hcallw10 <- ssd_hc(fitallw10) expect_snapshot_data(hcallw10, "hcallw10") - - data$Weight[rank(data$Conc) > 6] <- 1/100 - - fitallw100 <- ssd_fit_dists(data, dists="lnorm", weight = "Weight") + + data$Weight[rank(data$Conc) > 6] <- 1 / 100 + + fitallw100 <- ssd_fit_dists(data, dists = "lnorm", weight = "Weight") hcallw100 <- ssd_hc(fitallw100) expect_snapshot_data(hcallw100, "hcallw100") - - data$Weight[rank(data$Conc) > 6] <- 1/1000 - - fitallw1000 <- ssd_fit_dists(data, dists="lnorm", weight = "Weight") + + data$Weight[rank(data$Conc) > 6] <- 1 / 1000 + + fitallw1000 <- ssd_fit_dists(data, dists = "lnorm", weight = "Weight") hcallw1000 <- ssd_hc(fitallw1000) expect_snapshot_data(hcallw1000, "hcallw1000") }) test_that("weighted2", { data <- ssddata::ccme_boron - + data$Weight <- 2 - fit2 <- ssd_fit_dists(data, dists="lnorm", weight = "Weight") + fit2 <- ssd_fit_dists(data, dists = "lnorm", weight = "Weight") hc2 <- ssd_hc(fit2) expect_snapshot_data(hc2, "hc2") }) diff --git a/tests/testthat/test-zzz-unstable.R b/tests/testthat/test-zzz-unstable.R deleted file mode 100644 index d804fbb2d..000000000 --- a/tests/testthat/test-zzz-unstable.R +++ /dev/null @@ -1,1148 +0,0 @@ -# Copyright 2023 Australian Government Department of -# Climate Change, Energy, the Environment and Water -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -test_that("weibull is unstable", { - data <- data.frame(Conc = c(868.24508, - 1713.82388, - 3161.70678, - 454.65412, - 3971.75890, - 37.69471, - 262.14053, - 363.20288, - 1940.43277, - 3218.05296, - 77.48251, - 1214.70521, - 1329.27005, - 1108.05761, - 339.91458, - 437.52104)) - - fits <- ssd_fit_dists(data=data, - left = 'Conc', dists = c('gamma', 'weibull'), - silent = TRUE, reweight = FALSE, min_pmix = 0, nrow = 6L, - computable = TRUE, at_boundary_ok = FALSE, rescale = FALSE) - - # not sure why weibull dropping on some linux on github actions and windows - # on other folks machines - testthat::skip_on_ci() - testthat::skip_on_cran() - expect_identical(names(fits), c('gamma', 'weibull')) -}) - -test_that("hc multi_ci lnorm default 100", { - fits <- ssd_fit_dists(ssddata::ccme_boron) - set.seed(102) - hc_average <- ssd_hc(fits, average = TRUE, ci = TRUE, nboot = 100, ci_method = "weighted_arithmetic", multi_est = FALSE, samples = TRUE) - set.seed(102) - hc_multi <- ssd_hc(fits, average = TRUE, ci_method = "multi_free", ci = TRUE, nboot = 100, - min_pboot = 0.8, samples = TRUE) - - testthat::expect_snapshot({ - hc_average - }) - - # not sure why hc multi_ci is different on windows - # ══ Failed tests ════════════════════════════════════════════════════════════════ - # ── Failure ('test-hc-root.R:77:3'): hc multi_ci lnorm default 100 ───────────────── - # Snapshot of code has changed: - # old[4:7] vs new[4:7] - # # A tibble: 1 x 10 - # dist percent est se lcl ucl wt method nboot pboot - # - # - 1 average 5 1.26 0.781 0.331 3.25 1 parametric 100 0.86 - # + 1 average 5 1.26 0.769 0.410 3.25 1 parametric 100 0.86 - testthat::skip_on_ci() - testthat::skip_on_cran() - testthat::expect_snapshot({ - hc_multi - }) -}) - -test_that("hp multi_ci lnorm default 100", { - fits <- ssd_fit_dists(ssddata::ccme_boron) - set.seed(102) - hp_average <- ssd_hp(fits, average = TRUE, ci = TRUE, nboot = 100, ci_method = "weighted_arithmetic", samples = TRUE) - set.seed(102) - hp_multi <- ssd_hp(fits, average = TRUE, ci_method = "multi_free", ci = TRUE, nboot = 100, - min_pboot = 0.8, samples = TRUE) - - testthat::expect_snapshot({ - hp_average - }) - testthat::skip_on_ci() - testthat::skip_on_cran() - # ── Failure ('test-hp-root.R:79:3'): hp multi_ci lnorm default 100 ───────────────── - # Snapshot of code has changed: - # old[4:7] vs new[4:7] - # # A tibble: 1 x 10 - # dist conc est se lcl ucl wt method nboot pboot - # - # - 1 average 1 3.90 3.57 0.347 11.2 1 parametric 100 0.86 - # + 1 average 1 3.90 2.89 0.347 11.2 1 parametric 100 0.86 - testthat::expect_snapshot({ - hp_multi - }) -}) - -test_that("gamma parameters are extremely unstable", { - data <- ssddata::ccme_boron - data$Other <- data$Conc - data$Conc <- data$Conc / max(data$Conc) - - # gamma shape change from 913 to 868 on most recent version - set.seed(102) - fits <- ssd_fit_dists(data, dists = c("lnorm", "gamma"), right = "Other", rescale = FALSE, computable = FALSE) - - tidy <- tidy(fits) - expect_s3_class(tidy, "tbl") - testthat::skip_on_ci() # not sure why gamma shape is 908 on GitHub actions windows and 841 on GitHub actions ubuntu - testthat::skip_on_cran() - expect_snapshot_data(tidy, "tidy_gamma_unstable", digits = 1) -}) - - -test_that("sgompertz completely unstable!", { - skip_on_ci() # as incredibly unstable - skip_on_cran() - x <- c( - 3.15284072848962, 1.77947821504531, 0.507778085984185, 1.650387414067, - 1.00725113964435, 7.04244885481452, 1.32336941144339, 1.51533791792454 - ) - data <- data.frame(left = x, right = x, weight = 1) - expect_snapshot({ - set.seed(94) - ssdtools:::sgompertz(data) - set.seed(99) - ssdtools:::sgompertz(data) - }) - set.seed(100) - expect_error(ssdtools:::sgompertz(data)) -}) - -test_that("sgompertz with initial values still unstable!", { - skip_on_ci() # as incredibly unstable - skip_on_cran() - x <- c( - 3.15284072848962, 1.77947821504531, 0.507778085984185, 1.650387414067, - 1.00725113964435, 7.04244885481452, 1.32336941144339, 1.51533791792454 - ) - data <- data.frame(Conc = x) - set.seed(11) - expect_error(expect_warning( - fit <- ssd_fit_dists(data, dists = "gompertz"), - "Some elements in the working weights variable 'wz' are not finite" - )) - set.seed(21) - expect_error(expect_warning( - fit <- ssd_fit_dists(data, dists = "gompertz"), - "L-BFGS-B needs finite values of 'fn'" - )) - set.seed(10) - fit <- ssd_fit_dists(data, dists = "gompertz") - - sdata <- data.frame(left = x, right = x, weight = 1) - pars <- estimates(fit$gompertz) - - expect_snapshot({ - set.seed(94) - ssdtools:::sgompertz(sdata) - set.seed(94) - ssdtools:::sgompertz(sdata, pars) - set.seed(99) - ssdtools:::sgompertz(sdata) - set.seed(99) - ssdtools:::sgompertz(sdata, pars) - set.seed(100) - ssdtools:::sgompertz(sdata, pars) - }) - set.seed(100) - expect_error(ssdtools:::sgompertz(sdata)) -}) - -test_that("sgompertz cant even fit some values", { - skip_on_ci() # as incredibly unstable - skip_on_cran() - x <- c(160, 800, 840, 1500, 8200, 12800, 22000, 38000, 60900, 63000) - expect_snapshot({ - ssdtools:::sgompertz(data.frame(left = x, right = x)) - ssdtools:::sgompertz(data.frame(left = rep(x,10), right = rep(x,10))) - ssdtools:::sgompertz(data.frame(left = x, right = x), pars = c(12800, 1)) - ssdtools:::sgompertz(data.frame(left = x / 12800, right = x / 12800)) - }, - error = TRUE) -}) - - -test_that("sgompertz cant even initialize lots of values", { - skip_on_ci() - skip_on_cran() - x <- c(38.696580321462, 41.0167488906729, 39.5529154651536, 40.1225506655899, - 38.2675196410126, 35.2169221089071, 37.8367285461107, 40.1377838232664, - 37.5027912166191, 38.427368967798, 40.710857244717, 39.2107558513928, - 38.8104318203955, 36.6782721298192, 39.1189629457727, 38.5038356599761, - 40.9769905762875, 38.1358534539971, 37.677578277466, 37.0006299402988, - 41.7135839580738, 40.1519559493184, 40.0672365990623, 39.5592247806773, - 38.1637058572353, 39.8666688362276, 39.2503685118675, 38.9778749012123, - 40.0217426884973, 37.5351699713108, 39.7893579120294, 39.2387926187296, - 37.7044952991609, 37.8928752489645, 37.0090499173894, 38.4507445786794, - 38.620077736605, 39.6020315346104, 39.7810679774789, 40.8150835920557, - 37.9464980122296, 39.4069904913645, 38.0669287189795, 38.3441834518077, - 38.1993919655101, 40.1628716902171, 40.0281770769124, 38.6956745583115, - 39.6542719125524, 38.6088455182132, 39.8179004699168, 37.9230414720193, - 39.867477710758, 38.9955567243247, 38.0169207342366, 40.3342027787477, - 37.7344362972903, 38.6796129938263, 39.0965409517453, 41.46005663726, - 37.0773600128194, 39.2487948784459, 39.2885683350943, 39.155662491164, - 39.4144380892284, 37.8015034174506, 38.0318253811457, 39.2495131564861, - 39.4079230863217, 37.8069359589137, 39.2240112827973, 39.7992027228957, - 40.1464446475361, 38.0392748572373, 39.8704415381996, 37.0709840973726, - 39.7109649144627, 34.6158405583583, 38.773189207226, 39.5879964831782, - 37.2915278476584, 37.1687398705238, 39.8124336176356, 39.7309887182915, - 40.4249042880422, 37.7747514337286, 39.5078848285084, 40.0854650060604, - 38.4641772660282, 39.9580684236498, 39.0505656140191, 40.1090371065684, - 40.2837137147484, 41.1777634956717, 37.1366808219419, 39.4525678965893, - 38.6350146755692, 39.4979063158441, 41.3036446602384, 39.6926374930186, - 40.3183234220183, 40.1679706298231, 39.701995572475, 38.6869017750228, - 41.2896407864841, 38.7183693797009, 39.1452025170707, 38.3908637314772, - 41.2694527496005, 38.8136900728032, 37.7645647745729, 36.5631366265512, - 37.3667105678707, 41.7000277404458, 39.2707121440988, 36.6203610922647, - 37.8168390843906, 38.0149455298419, 37.4344504136931, 39.4168634517092, - 39.1022303484451, 40.7262981012178, 38.9244902124375, 39.7804365259938, - 40.071593416537, 40.5326032455288, 40.2967188132833, 39.4709850594384, - 39.7026879735608, 40.6767766734202, 39.8820157568733, 40.0306774727645, - 39.206490542215, 37.7995176031058, 38.0305899072524, 41.2535959663767, - 39.360970436801, 39.2050302399161, 37.9355199051284, 40.2662286603004, - 41.121798879367, 37.1609962328165, 38.6466582748848, 38.8967782665257, - 38.0404802796349, 38.376580403419, 38.6255759391397, 39.6073952243451, - 37.6347924690042, 38.5132173119731, 38.8501436804498, 38.493737010245, - 38.7589123929684, 39.7035807090811, 38.365423731158, 41.1023575551406, - 39.4693407341018, 40.3775002176367, 40.0539303648849, 39.2793192634062, - 38.8511551647368, 39.9553561650541, 38.2424584004309, 38.5571856715353, - 37.8348991198805, 37.3717962287677, 39.4730584952921, 41.523488762831, - 36.8499803076413, 38.013422735112, 37.4816695828213, 39.2621838289677, - 38.9515538223032, 40.5502903474796, 39.1161030671012, 38.7945616870771, - 40.2421942935249, 37.7346372472926, 39.1187706618842, 39.909833942905, - 38.6548900463434, 34.9715389178589, 37.2873000101342, 37.9002061587514, - 38.4975034197695, 42.1873757727254, 41.0764975000072, 38.7088995905531, - 40.4662521529921, 40.9236134619865, 39.9786610218703, 39.0344464667416, - 40.9923603178017, 38.226765970102, 36.0570644546613, 39.0610525309774, - 39.378249772003, 39.8481492104, 38.8128557727509, 38.176560083666, - 40.0109623940278, 38.365527279527, 41.4821313110713, 39.1562765062432, - 38.6689781368494, 38.5153323903582, 38.9094460830558, 38.9146080159054, - 39.5126736350809, 38.3551624615048, 39.2900471815049, 38.9872820902618, - 40.4027625099742, 36.9621287876883, 40.3027289972827, 38.9177530641325, - 38.8024677096201, 39.328858624352, 42.0770757806993, 38.1205541479795, - 38.4547674083091, 39.1200982288705, 38.4720192141187, 39.8322429488103, - 39.2862024373929, 39.7692289574389, 36.9552457155791, 38.8208389772751, - 38.7085456704407, 38.179565545474, 38.9552962537617, 37.3170576915214, - 37.9089935034163, 37.5515170524905, 40.8640899715991, 39.3977532271903, - 40.6965393740808, 39.2099251528595, 40.3877351534164, 39.1571163215197, - 38.8843000082186, 40.069135734553, 39.4155507502797, 40.0688390962823, - 40.3694309505709, 38.0979381141079, 37.9653373751348, 39.7406945731137, - 39.7319153561436, 41.0223207682689, 37.8004542927769, 40.2310555662633, - 38.1240358129045, 38.2175347747922, 39.023415223749, 40.5585975447541, - 37.0757803798169, 39.9840704053012, 37.1122869994015, 38.5234948115884, - 39.1109096684222, 37.9292146217095, 38.8120641499639, 38.6725491967401, - 38.4777632732966, 38.9945754893693, 39.541485148896, 39.133974747476, - 38.2834898683667, 40.9802975141706, 39.3374507245175, 41.6661446806449, - 38.4237943886002, 38.7813433440326, 39.9318339470732, 39.5304112157869, - 37.2920210101965, 38.0332942356899, 42.1930139607762, 36.9890596297174, - 39.9769160489512, 38.794454639375, 39.1341805428692, 40.484820544408, - 39.6219550690723, 37.5200194925331, 37.7870770544869, 39.12031371933, - 38.4395308986709, 39.1954131708967, 39.6642750370098, 39.7739948549039, - 39.6011260967852, 38.6108656218676, 37.9154461005623, 38.8064624106545, - 39.0597191615577, 35.5776144023631, 38.8748850476323, 43.9305705918234, - 39.266027724492, 39.870215450819, 38.9148252560285, 38.8287721885671, - 39.2737788275155, 39.4992532278209, 38.9122960388864, 37.9985552244301, - 38.4433361268137, 37.9872056270947, 38.7829483316692, 40.4326071359729, - 37.9718170571938, 37.3173504684119, 38.1041306072045, 39.431650255724, - 39.6501134004123, 38.1962116855106, 40.2125593103105, 39.3300592733259, - 38.4694436891443, 35.6018487136551, 37.7234340243789, 38.8416133651824, - 40.1036196591042, 38.9598798772033, 40.3085817328287, 41.4975558278974, - 38.2865459584346, 41.8260921139512, 40.3253160043853, 39.7726849675659, - 37.5924692740547, 38.7610139093328, 37.2307592557815, 38.1224433823566, - 39.7533625422114, 40.1702289131378, 39.5139069991125, 37.3763796206379, - 43.6767194233294, 42.7980876063979, 40.0101004177844, 38.8045660097627, - 38.7978864220019, 40.5196025015914, 39.6050801057401, 36.6941692064994, - 40.2364242866681, 39.4308687797026, 36.1352625034067, 36.1265011734934, - 40.326010741649, 41.3851869206732, 40.5747815072407, 40.1788259184253, - 38.2380334879549, 34.0096690608054, 39.6929204766898, 39.9515741913088, - 40.0041634169937, 37.9582791534962, 38.0335887840459, 39.1062032236527, - 37.6651696793937, 39.6881044797558, 38.2690967830217, 40.130457062569, - 38.6410808902146, 38.4676289901882, 39.1019005252714, 40.7213285577585, - 37.9573767374336, 39.1183670846963, 38.3822026549756, 37.3646233094306, - 39.1826303020084, 40.3572843581489, 38.442314623214, 38.5553027604022, - 39.6068870521211, 39.8729613160067, 41.7122087547397, 40.0776416898586, - 40.4393696960347, 39.3605590996253, 40.3260086548734, 40.1258507614127, - 40.5186441923711, 38.9809155324387, 39.3394540102295, 39.975869633627, - 40.3111919605064, 39.2163094429044, 38.8435899278059, 37.5259541950718, - 36.963412513099, 39.7647281175532, 38.2778393335243, 38.9592447313249, - 39.6832211664062, 39.8169965656146, 40.0571342866911, 40.0657728205233, - 38.6334828058099, 40.2254110586556, 38.2941124576558, 39.7633820426071, - 39.8812043275032, 39.5252167453337, 39.4841351687756, 37.0507474924108, - 38.7234247192162, 39.6575948859279, 39.1826805828978, 38.0705317267602, - 39.0896781744083, 40.4065177824407, 39.5646604953766, 39.3100515376255, - 37.275038659114, 38.6217194765214, 39.5715251327988, 39.4358964492531, - 37.8979324139364, 38.6842025210972, 38.9891069614657, 37.2435957040697, - 39.4319370959362, 41.5303368473785, 39.2115622666226, 39.9039055064095, - 38.5075815201747, 40.5302469191966, 39.7047799842818, 37.967366956652, - 38.6211561846939, 40.4203269847067, 40.0927676792246, 37.6352896940885, - 38.6602688775301, 40.1228354733954, 39.0484204031229, 40.241195037659, - 37.9075743603001, 40.7096672855678, 40.2063979484382, 39.2988183828229, - 38.7236306765055, 40.085046989671, 40.3864093200838, 39.2525922864072, - 39.9833207861838, 39.4752029274992, 40.0888611984398, 38.8364314332866, - 40.1768350426331, 37.6862394739334, 39.4665248116624, 37.899832276708, - 40.3210047661294, 39.3284191247637, 38.2903729699707, 37.0554029584125, - 38.0839523676974, 39.9998786189738, 39.2720100897009, 38.3885928001302, - 40.9884814635961, 39.3736999451426, 39.0688349733752, 39.9805351538551, - 38.2612231198234, 38.7808257073468, 40.4321639089165, 39.1925831801429, - 38.161657993717, 39.4815364089669, 37.9936299742363, 38.1919733752425, - 39.4634006258866, 40.6826647651456, 39.2383948920205, 38.8211139465359, - 40.2361715640083, 39.2523254442209, 39.5614236208388, 36.3210627879153, - 38.7634574724226, 39.9781094519548, 38.5720737088932, 39.0956252849711, - 37.8334966329441, 37.2993457418318, 39.2514702470121, 39.8392558245568, - 39.174775800502, 37.9748873577388, 43.8236675072905, 39.3897077144617, - 37.5759557282776, 38.1069173479354, 37.4120299079579, 38.5163313919706, - 38.8562534471793, 39.082731249183, 37.8123965517173, 38.6467206368035, - 39.2624233039125, 38.0444904972806, 37.9813830943846, 38.9982977458439, - 38.6337006206239, 36.0640324459786, 36.7986312761523, 38.020967310967, - 40.7379364843796, 38.9806446447468, 38.6883329974466, 34.8276810946894, - 37.7929643219164, 38.1936819030646, 38.8225376463523, 37.4761433823238, - 38.5121448430208, 38.4575246789265, 38.858997572675, 38.359586766349, - 39.558288704952, 40.4853848472591, 38.694323054342, 36.1844952800459, - 38.4853690819966, 38.78881539253, 38.0197707602212, 37.7443143743366, - 39.9711873308084, 38.9706104261925, 39.0769035054312, 39.459235288767, - 36.7812361757565, 38.2369113062318, 39.3662625142971, 37.8482625397072, - 38.6782247139701, 38.9567192145898, 38.2620419120765, 41.0626686610858, - 38.6156436251503, 39.250379171601, 39.349946545355, 40.6275731605698, - 37.9005995605111, 40.205914365087, 41.6982665619521, 39.3723235483688, - 40.0347807170072, 39.497473475581, 38.6590218187837, 39.8843213213189, - 38.6132703135293, 38.4280487105962, 38.5378818511143, 38.603135494208, - 38.7561959541377, 39.3929216926093, 41.3597504191791, 38.6118918667787, - 36.8411548739743, 39.3803349413986, 40.8109456694036, 39.3423162229158, - 38.9459848320317, 39.4991104107462, 38.058197568962, 38.7725871889095, - 39.1770615285156, 39.8193567350056, 38.2684201372059, 36.9811216392299, - 40.1769004167604, 39.0216375952443, 40.9455713612591, 37.7742379317281, - 38.7805197184278, 39.2973602139325, 41.0202595055836, 37.5888276948441, - 39.6559437124032, 37.7993924072458, 36.8680224413153, 38.3929408217845, - 39.313511789542, 36.8665331958893, 38.2182703654236, 38.8439109398027, - 39.4111744274711, 39.9253017127809, 36.9237891082507, 36.7600893992139, - 39.2855930848628, 39.2835843453872, 39.4129188137863, 37.9364834955805, - 38.1476606393185, 37.2076006841655, 40.2747876086838, 37.9022020669638, - 39.4325003205913, 37.951115432256, 37.807971401276, 40.2969281026145, - 40.6730841209068, 39.2893414371149, 40.2741852515657, 39.764396697977, - 38.4038572501277, 40.4955100450384, 39.7324796415345, 39.0789568290801, - 39.0947744940562, 37.2667626452727, 40.9708061054478, 38.9398447906209, - 38.6126752576927, 39.8159974079398, 39.4177867561836, 38.9876024433841, - 40.794214437606, 43.7562402030798, 38.6701756334505, 38.1621099177722, - 36.575698535627, 38.255188055226, 38.1033459720734, 37.0581351999275, - 38.9359368996426, 39.7852493973811, 38.0872674708902, 41.8639370009924, - 38.7447411439498, 39.3585499531425, 40.0256335982602, 38.6181510326272, - 38.0178649059027, 38.1157132909286, 39.3558163810008, 38.8346645264899, - 38.85461630796, 37.7248992534766, 38.863487092451, 39.015068997087, - 40.0055219390627, 40.7027278313135, 39.5188006642669, 38.4928451553392, - 39.1378385498179, 39.6115900842645, 37.8781421399288, 40.9844328121185, - 39.403769365946, 40.0298671793341, 38.2239750135394, 39.7267400648407, - 38.9995438518202, 40.2611538311266, 38.786793482844, 38.5653605190023, - 33.9244604815106, 39.0096557979905, 40.6528672876171, 38.9818158286068, - 38.8463968269336, 38.7436678863884, 37.975594403403, 38.4882244002132, - 39.0343156180594, 46.9928676186891, 36.7781819074398, 39.8144638174003, - 37.980464890335, 37.4564703569339, 40.1163325974914, 35.9871069681064, - 39.68729235871, 40.630771351219, 38.9099007667918, 40.2818723062924, - 40.4676556821653, 38.7747729933048, 38.9150973439876, 39.617266449505, - 39.4126917827044, 38.8209524150646, 39.324579360117, 39.9107839860635, - 40.0575447194271, 37.7686134706386, 39.2038472037554, 39.9940352077302, - 37.3140594722784, 38.4796372751327, 39.6443079640486, 37.9232220261437, - 41.2997001245465, 40.2407151320583, 37.5953456462041, 37.3782024981871, - 39.4965108566101, 39.4310973372514, 40.9415421333551, 40.1267239148112, - 39.0104802393511, 37.111403415285, 39.4666748528947, 37.6312986043052, - 38.6648640776781, 39.4654162004083, 38.1723846390448, 38.7118913128723, - 40.0394733411325, 40.1645364404523, 36.9445065042129, 38.6590138575, - 37.2416738810632, 40.8946855580023, 38.9770037695946, 38.3977538832488, - 39.4790250089449, 38.8075342559101, 39.2942139588824, 38.7240025841883, - 38.8017025369415, 39.7585470282626, 39.5489808587065, 39.345956911995, - 38.2287491973915, 39.0688696265457, 40.9548119905498, 38.7066227587173, - 39.7386257214213, 40.129347373272, 41.4727756099533, 38.6855838540641, - 39.7716702263939, 38.1691490705021, 40.292963019468, 39.6551387204093, - 37.7531674165233, 38.7341956955806, 40.3685159751057, 38.0860567609003, - 36.7305575128597, 37.530216757303, 35.8354709111472, 40.9933140599827, - 38.0035814661196, 37.3354421128419, 36.8080737129569, 41.0985219440893, - 38.8561139413136, 42.903710361809, 36.9954831637788, 38.531922153057, - 42.2836921318667, 37.0028061885742, 40.6513942308223, 38.2096983818343, - 38.0482194132477, 39.2607049466359, 38.8390235574544, 39.8576879080886, - 37.8832792184292, 39.0034043277092, 38.684011442933, 38.9912312777927, - 37.9757361394685, 41.3907600446042, 38.9312371532292, 37.7618971984968, - 38.2894211481052, 39.6733277972708, 38.5658494550534, 40.1974937022928, - 37.1473457893721, 38.8622864319329, 39.2725836058167, 38.0170971971996, - 39.4898615875341, 39.366227898738, 37.339521745044, 38.8300803583305, - 38.3411729217755, 39.1683817957122, 41.3070611199184, 38.4063260784734, - 37.1340103791155, 39.362318928735, 40.5828795465779, 39.0971648173104, - 39.3735811927919, 39.6792065372198, 40.3357320097854, 39.1127942705966, - 38.8025678690956, 37.8528074490416, 40.3571246143704, 38.7236270643344, - 39.3210878255258, 39.3417836462455, 37.7601030846554, 37.6883694697397, - 39.5267272790581, 39.5195867118307, 43.0981559093668, 38.5628045416694, - 38.1033275237512, 38.9833325135889, 37.8376076319414, 40.3895047883752, - 37.3392863875083, 40.1192750487477, 37.8712505040228, 38.9730977144904, - 38.7251809129993, 38.2959345065107, 38.765551878725, 36.5523814941017, - 37.6999611725533, 40.112733295656, 38.8344276124878, 38.0256017350531, - 40.8845820706635, 38.9226965106381, 37.2666634962291, 37.4203744638208, - 40.7378152062249, 40.8809097806334, 38.6737692719535, 38.4747024652618, - 39.3519738258198, 38.1086558072326, 38.8262025252141, 38.8373266870745, - 40.6298259732028, 39.1767597684894, 35.8714031826228, 37.8534957833254, - 37.7758645229045, 38.6631612922978, 38.7814973623979, 38.7338820404997, - 39.0129989805106, 40.4871344567191, 39.8975251703063, 39.0078634209895, - 39.2167315605367, 37.8803375793005, 40.3696161718203, 38.0337019843631, - 38.7984476541142, 37.7595575940074, 38.6179730389926, 40.1986912298922, - 41.2895593320579, 39.5060525497241, 39.0963392390911, 39.7313543995007, - 38.8336169806451, 37.6823969764853, 39.3499446203202, 39.2649140853913, - 38.0163632001511, 38.5959614053762, 40.2572217266411, 38.171698458165, - 40.3008014086158, 39.6543735088728, 39.1815990861773, 39.8472544670532, - 38.5977216059802, 39.9663605289933, 37.6893473908978, 38.8481549984134, - 43.3766565048559, 39.3698770455496, 39.9415844625127, 39.5231925912406, - 38.9189010640608, 37.0281041611697, 40.0940027447682, 39.5025949414688, - 38.5149025776659, 40.1824657973457, 38.0594927655381, 37.3226089383971, - 38.9757562397551, 39.4950417133679, 39.6859282232682, 39.7454876662063, - 39.4851308978089, 40.1056769983355, 39.1589104415128, 39.0712831485648, - 39.5607393847756, 39.0644583320816, 39.2515448674571, 39.3032359408323, - 40.5479515450476, 39.6250139600485, 38.028139621913, 37.2285955574899, - 37.2508387258539, 40.3846682207918, 38.636712625128, 39.4270502893468, - 38.2057349544891, 40.4668369658496, 40.63076070518, 36.2667783526517, - 38.5107950647274, 38.3743339825504, 37.7012252335452, 41.2805510262182, - 38.4371011894573, 36.0375810764541, 37.7269181932527, 39.383489843013, - 37.785445612894, 39.2808598910424, 40.5804682220679, 39.4633266713821, - 40.9186377094679, 38.5959854428001, 38.3403967366083, 38.7686849587232, - 38.3341640787877, 37.3980950685274, 35.6839274550542, 37.1841982128791, - 39.3041223888912, 40.1800681285293, 38.5546795002772, 40.6649714235597, - 39.3908892554947, 40.5295797705759, 41.2123065166508, 42.7254305446572, - 38.4949631251763, 40.4935161618346, 38.5312798612271, 39.3479141908363, - 37.8583779286256, 39.3390670518522, 35.0475174766598, 39.3317121842063, - 39.291630780152, 39.8698771514366, 37.9858500799512, 40.8999515676964, - 38.0316622823605, 38.8489839517514, 37.4775721757, 37.1104504954058, - 39.8063713445244, 38.570827029856, 37.9436998244667, 39.8823824999909, - 39.0937021503757, 40.090613185766, 39.6700607263025, 35.9614086936976, - 38.1220240490322, 40.2313461100113, 38.493376737973, 37.8703435212788, - 37.8464499387457, 37.2716605807549, 38.6150991186386, 39.1517243082324, - 38.523443553638, 39.0255090270453, 38.5536830415702, 39.3734321577177, - 40.3498997970709, 39.5379777035583, 36.2140501511744, 41.5758157855067, - 39.371964604603, 38.4613550203525, 39.6530348500717, 36.2748047281009, - 38.2783274778123, 38.6522833139846, 38.1808211976449, 38.2513083309745, - 38.7109089141367, 39.7641821203552, 40.0028365411157, 38.1187417657084 - ) - expect_snapshot({ - set.seed(99) - ssdtools:::sgompertz(data.frame(left = x, right = x)) - set.seed(99) - ssd_fit_dists(data.frame(Conc = x), dists = "gompertz") - set.seed(100) - ssdtools:::sgompertz(data.frame(left = x, right = x)) - set.seed(100) - ssd_fit_dists(data.frame(Conc = x), dists = "gompertz") - set.seed(131) - ssd_fit_dists(data.frame(Conc = x), dists = "gompertz") - }, - error = TRUE) -}) - -test_that("ssd_hc cis with error", { - skip_on_ci() - skip_on_cran() - - set.seed(99) - conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) - 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, ci_method = "multi_fixed", 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, ci_method = "weighted_samples") - expect_s3_class(hc_err, "tbl") - expect_snapshot_data(hc_err, "hc_err") -}) - -test_that("ssd_hc comparable parametric and non-parametric big sample size", { - skip_on_ci() - skip_on_cran() - - set.seed(99) - data <- data.frame(Conc = ssd_rlnorm(10000, 2, 1)) - fit <- ssd_fit_dists(data, dists = "lnorm") - set.seed(10) - hc_para <- ssd_hc(fit, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic", samples = TRUE) - expect_snapshot_data(hc_para, "hc_para") - set.seed(10) - hc_nonpara <- ssd_hc(fit, ci = TRUE, nboot = 10, parametric = FALSE, ci_method = "weighted_arithmetic", samples = TRUE) - expect_snapshot_data(hc_nonpara, "hc_nonpara") -}) - -test_that("ssd_hp cis with error", { - skip_on_ci() - skip_on_cran() - - set.seed(99) - conc <- ssd_rlnorm_lnorm(30, meanlog1 = 0, meanlog2 = 1, sdlog1 = 1 / 10, sdlog2 = 1 / 10, pmix = 0.2) - 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, ci_method = "multi_fixed", 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, ci_method = "weighted_arithmetic") - expect_s3_class(hp_err, "tbl") - expect_snapshot_data(hp_err, "hp_err") -}) - -test_that("ssd_hp comparable parametric and non-parametric big sample size", { - skip_on_ci() - skip_on_cran() - - set.seed(99) - data <- data.frame(Conc = ssd_rlnorm(10000, 2, 1)) - fit <- ssd_fit_dists(data, dists = "lnorm") - set.seed(10) - hp_para <- ssd_hp(fit, 1, ci = TRUE, nboot = 10, ci_method = "weighted_arithmetic", samples = TRUE) - expect_snapshot_data(hp_para, "hp_para") - set.seed(10) - hp_nonpara <- ssd_hp(fit, 1, ci = TRUE, nboot = 10, parametric = FALSE, ci_method = "weighted_arithmetic", samples = TRUE) - expect_snapshot_data(hp_nonpara, "hp_nonpara") -}) - -test_that("plot geoms", { - skip_on_ci() - skip_on_cran() - - gp <- ggplot2::ggplot(boron_pred) + - geom_ssdpoint(data = ssddata::ccme_boron, ggplot2::aes(x = Conc)) + - geom_ssdsegment(data = ssddata::ccme_boron, ggplot2::aes(x = Conc, xend = Conc * 2)) + - geom_hcintersect(xintercept = 100, yintercept = 0.5) + - geom_xribbon( - ggplot2::aes(xmin = lcl, xmax = ucl, y = proportion), - alpha = 1 / 3 - ) - expect_snapshot_plot(gp, "geoms_all") -}) - - -test_that("ssd_plot censored data", { - skip_on_ci() - skip_on_cran() - - data <- ssddata::ccme_boron - data$Other <- data$Conc * 2 - expect_snapshot_plot(ssd_plot(data, boron_pred, right = "Other"), "boron_cens_pred_ribbon") -}) - -test_that("invpareto with extreme data", { - skip_on_ci() - skip_on_cran() - - data <- data.frame(Conc = c( - 2.48892649039671, 2.5258371156749, 2.51281264491458, - 2.49866046657748, 2.56572740160664, 2.49440006912093, 2.4817062813665, - 2.47546618759501, 2.53571697416386, 2.50242492575677, 2.50112253589808, - 2.5287786019635, 2.57780684900776, 2.53608336578284, 2.58101156958599, - 2.47461770234486, 2.49063194551244, 2.5856619890231, 2.48695693688166, - 2.57378026021983, 2.51235308389976, 2.48522032692049, 2.49973051106759, - 2.53625648406357, 2.51192819101941, 2.48564121012588, 2.47989185141965, - 2.47104478254847, 2.53704987914894, 2.48182203478124, 2.51943279158882, - 2.47875248023764, 2.52955571948405, 2.53413505298479, 2.4857126516631, - 2.55015093854307, 2.50566701101757, 2.5134323318284, 2.49793441210188, - 2.49424215906085, 2.48960347486455, 2.55358332496617, 2.55446292958609, - 2.48210193691792, 2.46945069890001, 2.48557684661491, 2.56460608968987, - 2.53708962699444, 2.48214951933889, 2.54412439394134, 2.59518068845417, - 2.55975671870397, 2.493434223589, 2.53455956396635, 2.49737837236316, - 2.54900643026637, 2.50513718347292, 2.54882879624245, 2.51814393193009, - 2.46420777049251, 2.46410824439861, 2.52375449633473, 2.50472480352834, - 2.47468853687034, 2.49903375287477, 2.51052484516152, 2.52440831022558, - 2.48241564711347, 2.57274003332032, 2.48966764017043, 2.5690823103684, - 2.50354051434315, 2.57783696959855, 2.55278129417344, 2.49091327122561, - 2.4858726676362, 2.50704022976757, 2.60120582374815, 2.48030852436464, - 2.58234455069583, 2.54629314447072, 2.52650700793897, 2.4871602238994, - 2.50569757079671, 2.49183442063104, 2.50165889380711, 2.47934668379978, - 2.47510756679179, 2.53369127110563, 2.46868451852079, 2.61321699644183, - 2.52987952199996, 2.58987810707128, 2.46777896999791, 2.51447342615507, - 2.48618482994608, 2.51794970929166, 2.49716394702713, 2.49218587262049 - )) - - fit99 <- ssd_fit_dists(data, dists = "invpareto") - - expect_equal( - estimates(fit99), - list(invpareto.weight = 1, invpareto.scale = 2.61422138795731, invpareto.shape = 26.0278618888663) - ) -}) - -test_that("not all estimates if fail", { - skip_on_ci() - skip_on_cran() - - dir <- withr::local_tempdir() - - fit <- ssd_fit_dists(ssddata::ccme_boron, dists = c("lnorm", "lnorm_lnorm")) - set.seed(49) - hc <- ssd_hc(fit, nboot = 10, ci = TRUE, ci_method = "multi_fixed", - parametric = TRUE, save_to = dir, min_pboot = 0.8, samples = TRUE) - expect_snapshot_data(hc, "hc_notallestimates") - expect_identical(list.files(dir), c("data_000000000_multi.csv", "data_000000001_multi.csv", "data_000000002_multi.csv", - "data_000000003_multi.csv", "data_000000004_multi.csv", "data_000000005_multi.csv", - "data_000000006_multi.csv", "data_000000007_multi.csv", "data_000000008_multi.csv", - "data_000000009_multi.csv", "data_000000010_multi.csv", "estimates_000000000_multi.rds", - "estimates_000000001_multi.rds", "estimates_000000002_multi.rds", - "estimates_000000003_multi.rds", "estimates_000000004_multi.rds", - "estimates_000000005_multi.rds", "estimates_000000006_multi.rds", - "estimates_000000007_multi.rds", "estimates_000000008_multi.rds", - "estimates_000000009_multi.rds", "estimates_000000010_multi.rds")) -}) - -test_that("lnorm_lnorm fits anonb", { - skip_on_ci() - skip_on_cran() - - set.seed(99) - data <- ssddata::anon_b - fit <- ssd_fit_dists(data, - dists = c("lnorm_lnorm"), - at_boundary_ok = FALSE, min_pmix = 0.05 - ) - - tidy <- tidy(fit) - expect_snapshot_data(tidy, "tidy_anonb") - expect_snapshot_plot(ssd_plot(data, predict(fit), ci = FALSE), "plot_anonb") -}) - -test_that("lnorm_lnorm non-bimodal 1000 data", { - skip_on_ci() - skip_on_cran() - - data <- data.frame(Conc = c( - 11.6635934627129, 11.3655834538171, 11.8239438136152, 11.4457330597547, - 11.2733838979158, 11.6555694734405, 11.6077458629663, 11.6253179146231, - 11.7565586590195, 11.1887570445131, 11.6730568277929, 11.4120070711133, - 11.6824326010276, 11.3911357792784, 12.0706441525969, 11.2155412831347, - 11.3821410267404, 11.3267141623621, 11.6076784146829, 11.3209976317701, - 11.2959562378299, 11.6786188036454, 11.6046588017454, 11.7499647941354, - 11.4831512412866, 11.8286883023093, 11.7007855177161, 11.6125285414713, - 11.4368552322619, 11.677278735656, 11.2591724516819, 11.2122991922597, - 11.2014592283697, 11.6757643041424, 11.3976039512326, 11.4064992756645, - 11.6084844857244, 11.2659904100175, 11.4887603755147, 11.3465556328527, - 11.6709507658488, 11.4442961944266, 11.6860922015911, 11.3337180713638, - 11.4934336220037, 11.4237641215403, 11.2597374132061, 11.1767350574449, - 11.5249429055911, 11.2922544242571, 11.3860745867636, 11.5766005475934, - 11.2628237130449, 11.6146165920334, 11.4175020113036, 11.3195033621875, - 11.1710952560318, 11.6597792510826, 11.4868152191465, 11.5721318552201, - 11.6486854013223, 11.6404214031175, 11.4738473838758, 11.0370114162703, - 11.5306291118776, 11.7547581342576, 11.1729582778396, 11.5752263994969, - 11.2468730281413, 11.7327251393004, 11.6517053064323, 11.5377269190321, - 11.7274750442181, 11.8998204906137, 11.6746453028613, 11.7144040978644, - 11.3885625929466, 11.4727695225601, 11.5211563372212, 11.8779053238367, - 11.5235380529653, 11.7352073567185, 11.778095222296, 11.5565087399718, - 11.4303811869928, 11.411039568203, 11.7936208857429, 11.2632318149877, - 11.4183636452509, 11.5450923312535, 11.5304172016656, 11.3564668458882, - 11.3097786542072, 11.2559960803643, 11.1900205330239, 11.3179458681654, - 11.5468393692064, 11.6109598609785, 11.4397968689957, 11.5829306616596, - 11.4265533991304, 11.4037107783255, 11.6231069350061, 11.4476147809259, - 11.315857500714, 11.192073498525, 11.1450028934144, 11.4763778673496, - 11.3303593182416, 11.795851315237, 11.3154135776636, 11.504446981381, - 11.3686452517911, 11.0681174567049, 11.9482203553029, 11.4990621721172, - 11.7700827893035, 11.153277291342, 11.4103274908523, 11.362014739247, - 11.3370793845089, 10.9490041292355, 11.5709887438907, 11.2392472207936, - 11.4457697378538, 11.5518564381783, 11.1668497234251, 11.660217248224, - 11.5408481305805, 11.3596525221312, 11.7088443068689, 11.0985982119481, - 11.6344343224953, 11.5835918466228, 11.6707241606893, 11.4873075231587, - 11.6871951877657, 11.3561777270116, 11.0926984591504, 11.6670973459339, - 11.4743776164222, 11.4012126214713, 11.1670799989037, 11.3895862238313, - 11.4619188035051, 11.7438466838695, 11.7789086710159, 11.8254153257148, - 11.5350198406344, 11.614146101765, 11.5037937949341, 11.7594749216344, - 11.7232424558103, 11.4901038034287, 11.457497322123, 11.4701475688988, - 11.3495747129771, 11.4768364004515, 11.3536264552173, 11.6967872920671, - 11.5958239935742, 11.8102460795176, 11.5285720139981, 11.5636360422529, - 11.2391302305836, 11.6400828524342, 11.3649992872627, 11.7739800561355, - 11.9514605248261, 11.8948860243831, 11.3298148207664, 11.3913235205135, - 11.2842354326543, 11.5345139189297, 11.0970243900149, 11.7031563986728, - 11.6634306349493, 11.9092830544344, 11.5869287303179, 11.7564461328616, - 11.150172788247, 11.4822541140239, 11.4044323999418, 11.7430862177697, - 11.4674029907269, 11.6087102680844, 11.0224410790094, 11.1429072494759, - 11.1440714332214, 11.4429296944542, 11.5110545367456, 11.6902834560434, - 11.975232188303, 11.3484533650323, 11.5902139993436, 11.6936184805547, - 11.2156665797036, 11.5367845942098, 11.457685987964, 11.326091672857, - 11.54310696694, 11.6318253757251, 11.4672564829417, 11.2753353731344, - 11.5442624404976, 11.4998938095082, 11.7680718084146, 11.4432553497958, - 11.7656381805778, 11.6559051931419, 11.2711880476245, 11.6412415650511, - 11.5685922662603, 11.5506412075912, 11.3513987873333, 11.3315276655562, - 11.335640654208, 11.681285272101, 11.5589662365603, 11.1828140877568, - 11.5312581724757, 11.5432002402202, 11.7912888955701, 11.4905985999693, - 11.1259591802745, 11.4610350884183, 11.7991160364597, 11.579099060573, - 11.33449302326, 11.2554336598017, 11.4512378707303, 11.7226621454134, - 11.3527354290433, 11.6705425125658, 11.5563556191945, 11.7308586023113, - 11.9851397182973, 11.075885463439, 11.2080718893369, 11.4368799211954, - 11.5632546318052, 11.6634278624019, 11.318215841977, 11.4880779444713, - 11.6701760414542, 11.7900454830006, 11.4305509189927, 11.4005711273461, - 11.493397563551, 11.3671831886506, 11.5455573847742, 11.455219607115, - 11.3765307074504, 11.5322198186407, 11.7234429342707, 11.4913195141207, - 11.5800460407405, 11.5015183797711, 11.600345452303, 11.671105482069, - 11.9009180552352, 11.3047838103508, 11.243053789483, 11.3132995190247, - 11.1839945545923, 11.5467528309238, 11.4624123336534, 11.4384084755489, - 11.7624832869299, 11.4972069873588, 11.6718416090489, 11.5565193860913, - 11.6854937630156, 11.486887701755, 11.2245408284927, 11.4223163757767, - 11.6183353030888, 11.4781731819334, 11.4180676231011, 11.5222391679401, - 10.9874586119541, 11.6315015151944, 11.6259231476061, 11.5246942987034, - 11.3790143669854, 11.6091093097247, 11.8458505048798, 11.3956132241971, - 11.4334989846648, 12.0107090576645, 11.58889471641, 11.8485588211996, - 11.6912962865302, 11.3443567873428, 11.4889742885729, 11.7353556032995, - 11.3458181845925, 11.5360487979571, 11.572996307097, 11.3900889967152, - 11.3871286159282, 11.6394988106606, 11.6672892268697, 11.2499719224047, - 11.4355438444653, 11.4146461074679, 11.5830061909034, 11.356416701344, - 11.5194114268155, 11.4461730977868, 11.7555819598489, 11.757108193106, - 11.6621065583231, 11.838582610051, 11.7632074437835, 11.3465420858875, - 11.5844207003211, 11.1705821018384, 11.4142931889118, 11.6952187675352, - 11.5853093436653, 11.3754738036731, 11.4897478077412, 11.6808486866119, - 11.7782359379539, 11.4098989033173, 11.5147654815493, 11.9203595355564, - 11.7863398442806, 11.6085439373772, 11.3748020550406, 11.5107499518156, - 11.4459430122029, 11.8864880814917, 11.3910504966753, 11.7608068035471, - 11.2010926856702, 11.2525270439525, 11.6862467158833, 11.732921172069, - 11.2587015436406, 11.9648080240531, 11.2853204109666, 11.5145507471921, - 11.4761721195894, 11.3591745195689, 11.6041308327816, 11.8698306010401, - 11.6899433491951, 11.3939731110365, 11.5342338112757, 11.7752406163456, - 11.435729513263, 11.3188712646992, 11.3365988682073, 11.6485204521932, - 11.480686518043, 11.2799874465089, 11.4116754417375, 11.4545426647885, - 11.5745481350434, 11.1966656568524, 11.6975132142541, 11.6431448445814, - 11.2517604231283, 11.1486491517404, 11.6991734787903, 11.2241659658642, - 11.4952691898267, 11.5740123918133, 11.3536512948081, 11.5378236053867, - 11.5105640641999, 11.8221701602153, 11.2923902515628, 11.53180649897, - 11.3691594548817, 11.6175646316642, 11.4053269282246, 11.234768393995, - 11.641542054491, 11.7999676522794, 11.5257062424203, 11.5059110405551, - 11.6617696764003, 11.3226243854653, 11.4880248762229, 11.7337176970954, - 11.2155495826891, 11.6517450661497, 11.6021018262328, 11.3877604077526, - 11.639890502846, 11.7809973315967, 11.3515596489177, 11.3761078301294, - 11.4971577458201, 11.7264688656258, 11.4937265193511, 12.0486431731611, - 11.4285135930375, 11.5266970229313, 11.6897298607594, 11.1325756698399, - 11.3610403083483, 11.271158595137, 11.5987031218919, 11.2413020872383, - 11.6922042998872, 11.0622291689558, 11.0493045662671, 11.7886726028345, - 11.356875041002, 11.222682110044, 11.1729481428879, 12.050179976782, - 11.3691912771854, 11.1729814065191, 11.6134550080208, 11.3668928620368, - 11.2789813760573, 11.858752849499, 11.1277127982319, 11.2254664041385, - 11.6425437286932, 11.5189911033846, 11.72792415931, 11.3460373137601, - 11.4266246813696, 11.6145883108721, 11.4040865639135, 10.9397029690441, - 11.9355220072695, 11.5659683736315, 11.2595351388416, 11.7264552315149, - 11.4250232833136, 11.8505002503181, 11.6736025315652, 11.6358341743864, - 11.4848620300854, 11.0658566253791, 11.7433762718265, 11.368863939374, - 12.0430882282277, 11.1478992722267, 11.6529116138211, 11.4386231562301, - 11.4699978508074, 11.3949217618572, 11.4546511662623, 11.6224432553423, - 11.4421481785793, 11.657180874398, 12.8288174569032, 11.6252568763014, - 11.491598965489, 11.5122204443171, 11.1946277176765, 11.3371665039755, - 11.8219395858959, 11.4177551579925, 11.817401786082, 10.9066865497524, - 11.6292423316714, 11.4345661115386, 11.5146335760661, 11.2164818600078, - 11.6462007756576, 11.5594553161589, 11.2777294045852, 11.4064561143383, - 11.403296101097, 11.1942695626537, 11.2069796841188, 11.5108806250445, - 11.4903700781168, 11.4412637072806, 11.7367046978334, 11.4415759938265, - 11.461789360977, 11.5025221397458, 11.6741375647481, 11.6318730203337, - 11.8724788742072, 11.3411139466139, 11.193895333642, 11.5090212617708, - 11.4766156814582, 11.3025257977669, 11.6887687898236, 11.9785619762261, - 11.5832745795798, 11.5638848196105, 11.6373626595557, 11.5346618451343, - 11.8053599896049, 11.7866836352087, 11.6656448470497, 11.6767793846651, - 11.4386961150224, 11.6601979255714, 11.6835301301195, 11.1916085178821, - 11.3638143635823, 11.5384570024637, 11.5021355520758, 11.728807679399, - 10.984378479658, 11.7213214603164, 10.7461781085464, 11.3870533808756, - 11.6264922619532, 11.5206029097705, 11.3075447476347, 11.5292525213332, - 11.4474539160496, 11.1784758708234, 11.3896979535097, 11.719541623793, - 11.6053073443453, 11.518232072859, 11.3712640382737, 11.6098940705145, - 11.5382560364661, 11.7993666879693, 11.6324840910319, 11.4481893420571, - 11.541204261907, 11.5773112599797, 11.5737901104302, 11.4341925128839, - 11.4793732048958, 11.6786469969964, 11.779820125404, 11.531459246292, - 11.2534419833243, 11.5242285802331, 11.7505344377909, 11.2561748020822, - 11.4661314501832, 11.4760530705387, 11.4506126062349, 11.3963732165445, - 11.4312630670097, 11.3557616131191, 11.5823565060607, 11.5363888326256, - 11.4917903826409, 11.5703392588785, 11.4208903235975, 11.3264983504393, - 11.4339118777607, 11.6207177601068, 12.0732854180863, 11.3485270565549, - 11.7214183450559, 11.3500282028636, 11.2190693389911, 11.2069248306124, - 11.6847250769785, 11.7484631837051, 11.3928718561409, 11.0483431329695, - 11.0632555553734, 11.3484711276532, 11.3540665678888, 11.424901501236, - 11.3772438391331, 11.3402755457535, 11.6658488666932, 11.801777190057, - 11.2024789759482, 11.2178942545725, 11.4553053426658, 11.7871905188347, - 11.4981479663863, 11.327302970811, 11.4159310930165, 11.5560442202663, - 11.7365037432332, 11.3378278539107, 11.8208625963249, 11.6497566272874, - 11.5075152494812, 11.5215250880463, 11.2812669600297, 11.310753285262, - 11.9620678652502, 11.3590587863734, 11.3898381131715, 11.2529331118846, - 11.2362185790092, 11.385351174977, 11.5744685353361, 11.4856804686762, - 11.913912055332, 11.3767849155427, 11.8094735607357, 11.1508024267808, - 11.8106804361006, 11.5470001967063, 11.3952593838908, 11.2484965135934, - 11.1152705518813, 11.5389406080853, 11.7634503537939, 11.4291028317061, - 11.3276572999105, 11.4930118360099, 11.5469649014856, 11.5169350020809, - 11.3285353226113, 11.2780234904709, 11.440289000834, 11.220111220716, - 11.6368461254189, 11.3373985461442, 11.5729909942026, 11.5627913514537, - 11.896010438462, 12.1378927192053, 11.2661668881932, 11.6500397905937, - 11.9456515880464, 11.6036046289927, 11.2617034688574, 11.2041718173304, - 11.7846555949065, 11.7468241221256, 11.5711643637382, 11.4605756512852, - 11.6855846792033, 11.610560314245, 11.4023298726094, 11.5935010737646, - 11.4794267316669, 11.4177936724899, 11.3170444087192, 11.4297981291346, - 11.5846912793348, 11.5361273182454, 11.2836990730896, 11.7129292407643, - 11.3682617291422, 11.5788574326573, 11.3656467657476, 11.4105589568224, - 11.6329782469737, 11.7741760320124, 11.5877677859266, 11.4614478490663, - 11.8922989610443, 11.4769174598707, 11.5473094994925, 11.8164122469798, - 11.3965297469094, 11.7060351811225, 11.9160697996983, 12.2091231955421, - 11.4513840897352, 11.9190686799799, 11.5716373917844, 11.4552839479779, - 11.2069385588086, 11.2352938786398, 11.4799962344234, 11.1715703387231, - 11.5951806551894, 11.4965967805174, 11.9066684684352, 12.085620305792, - 11.6762460737526, 11.5003622406498, 11.2467259944484, 11.3576209222196, - 11.5538967776043, 11.6021728438367, 11.4017677191272, 11.6541203471886, - 11.5179908661979, 11.3731766103249, 11.284667844589, 11.277379710151, - 11.6083662721441, 11.4137354186957, 10.8955839097348, 11.6128481523168, - 10.9414889550394, 11.500934449099, 11.4032494506259, 11.3414275766532, - 11.6103518032939, 11.4489716827269, 11.4521528606091, 11.4586955357924, - 11.0442737725854, 11.4024077316865, 11.4530826810189, 11.2142229985889, - 11.3211367494156, 11.7695143207915, 11.6801094326193, 11.378714542138, - 11.5894285425463, 11.4535592112896, 11.5189077909302, 11.905529468508, - 11.7308595111171, 11.1561241580823, 11.5396607072055, 11.5670558138667, - 11.5866534877845, 11.4899696625367, 10.7606650890848, 11.4623034225546, - 11.4829861663367, 11.531027241558, 11.1284027924671, 11.3789406141285, - 11.7180842406464, 11.248060386135, 11.8557680503442, 11.4749711791423, - 11.7731267020686, 11.4451020052469, 11.5536039362763, 11.2295030702308, - 11.4439680242462, 11.3599366494965, 11.2375779084626, 11.4027090068517, - 11.4674002049422, 11.6107908879673, 11.3646653036025, 11.3525677125419, - 11.6956920927681, 11.5949761789213, 11.4279470409673, 11.628194983154, - 11.3797989564061, 11.4537211190876, 11.544720822699, 11.3477447726164, - 11.5106910979557, 11.2705155562627, 11.5419354593303, 11.6002427009366, - 11.3617284216845, 11.4545380023049, 11.5559785868196, 11.2827575037312, - 11.4923949055435, 11.4670902548463, 11.7775808724294, 11.7524650925602, - 11.5232395955812, 11.7716348213617, 11.3129441491383, 11.9184159519933, - 11.4651302298193, 11.4828115364529, 11.4921553448102, 11.4840394509425, - 11.4795329119155, 11.3557617727837, 11.1990802135024, 11.555895890632, - 11.5665334157256, 11.9608405697218, 11.0906137231452, 11.4738335300962, - 11.5552267798845, 11.4917532448646, 11.4767501205378, 11.309257136722, - 11.8330397760739, 11.2452007264035, 11.5626653665188, 11.6615348431299, - 11.4036383205713, 11.9206466284402, 11.4028117349485, 11.232335830704, - 11.5710019223606, 11.2323436049941, 11.0986236955492, 11.7618238628064, - 11.3445348352561, 11.378093136043, 11.5381912190455, 11.282570495449, - 11.3186759511659, 11.4117838917907, 11.6227635225452, 11.7844213221872, - 11.5671587969278, 11.458922182513, 11.4032992701995, 11.5491884538217, - 11.2758671228542, 11.6770897492982, 11.6342313067151, 11.1237574188463, - 11.6031081273673, 12.1290653063871, 11.4778345922648, 11.3583463804655, - 11.3266052031506, 11.7246123353123, 11.4647737955044, 11.5883332972292, - 11.4248310030985, 11.3713918308266, 11.2041509548359, 11.617616628905, - 11.3759381668148, 11.3305920225639, 11.6871369457011, 11.6303021419011, - 11.4931674583361, 11.0922966074434, 11.2490842937364, 10.9403583083204, - 11.1716989237958, 11.4292855836507, 11.6236233194597, 11.5989208423244, - 11.2147889962406, 11.625607143598, 11.8748838328963, 11.5414934062674, - 11.6259439615824, 11.3364532857374, 11.8227344400673, 11.7111666222959, - 11.3727104334305, 11.7078155455392, 11.5544569070194, 11.6021540153749, - 11.573369065866, 10.8581859655439, 11.6615357936139, 11.6074293122824, - 11.3800328287919, 11.8608121046055, 10.8695335671074, 11.4549460213617, - 11.6732793086444, 11.6280582434249, 11.7938110746401, 11.2759355094693, - 11.7333174374389, 11.5124908292672, 11.5116966042338, 11.2557414497685, - 11.111003192477, 11.7723687553069, 11.5311536361956, 11.415675250247, - 11.434958888026, 11.5764304335137, 11.3184428704269, 11.5925005193847, - 11.6606221243124, 11.6799864503813, 11.6680624812246, 11.6323392171622, - 11.6205668223306, 11.2743893579799, 11.3038169041637, 11.2516179608122, - 11.0913550278671, 11.5183036046645, 11.6088540037091, 11.4237385957101, - 11.7411183714493, 11.5268255736499, 11.5514313428383, 11.4939244996735, - 11.478671143305, 11.5506137782508, 11.4838342763386, 11.9082590797765, - 10.960554474782, 11.4510734836701, 11.594720494906, 11.6435287600618, - 11.4730994130636, 11.6753147493462, 11.0704918909154, 11.3363906264414, - 11.4069381361204, 11.3390189388972, 11.7394581174949, 11.5025933598415, - 11.5091568374427, 11.8189657846627, 11.6762535202989, 11.4862855869735, - 11.5191142470272, 11.4087780398663, 11.5361396738411, 11.3477626341929, - 11.3295447034612, 11.6461819581215, 11.3160562372171, 11.9732839905477, - 11.2597545419879, 11.6483236285684, 11.6659329899876, 11.3375985127992, - 11.5652927769658, 11.5402126667346, 11.5246347656743, 11.3790534415256, - 11.3504467491437, 11.9006774473653, 11.2998434728114, 11.294215001317, - 11.0352592725904, 11.5442750193934, 11.9540286929111, 11.5849472177449, - 11.8695269797079, 11.2221940781463, 11.5391494901798, 11.7652998758852, - 11.7152214736869, 11.6161349733777, 11.3455362974154, 11.3697013696593, - 11.6159930311664, 11.5192522836597, 11.3626732407949, 11.7915655615128, - 10.8468085570926, 11.5051760134024, 11.3931245756523, 11.6445146662936, - 11.3470732268861, 11.6515019252136, 11.5141257439709, 11.2773011669151, - 11.3032998105644, 11.7571007839257, 11.3544692125066, 11.5818232930408, - 11.0839805881239, 11.8582789073051, 11.5997729156958, 11.5897058738691, - 11.4193569373722, 11.8678858552685, 11.6051915096343, 11.3371558507094, - 11.3210764775439, 11.3670660935708, 10.9736909230005, 11.5134036283058, - 11.7378869878075, 11.6101540643963, 11.5960760408688, 11.5398373831802, - 11.6921293527264, 11.0056293583308, 11.3779618825627, 11.4358858630188, - 11.3398108548088, 11.500395429923, 11.6290788048495, 11.4534379910937, - 11.3973526125132, 11.8090228812056, 11.4349697688751, 11.4120105561733, - 11.2768023713792, 11.6479180048227, 11.8538348852147, 11.2816551787507, - 11.5483270246353, 11.5002183838825, 11.3020898934751, 11.5115149415805, - 11.2017560031151, 11.352225955946, 11.6826296693967, 11.8553332139932, - 11.9042883574032, 11.0560549115389, 11.1767099828818, 11.421709850191, - 11.702545464272, 11.7485923966285, 11.8047860348248, 11.4448541804893, - 11.4705435703147, 11.716935272144, 10.9954029806633, 11.1256601239288 - )) - fit <- ssd_fit_dists(data = data, dists = 'lnorm_lnorm', at_boundary_ok=TRUE, - min_pmix = 0) - tidy <- tidy(fit) - expect_snapshot_data(tidy, "tidy_lnorm_lnorm_uni1000", digits = 3) -}) - -test_that("lnorm_lnorm non-bimodal 1000 data", { - skip_on_ci() - skip_on_cran() - - data <- data.frame(Conc = c( - 11.6635934627129, 11.3655834538171, 11.8239438136152, 11.4457330597547, - 11.2733838979158, 11.6555694734405, 11.6077458629663, 11.6253179146231, - 11.7565586590195, 11.1887570445131, 11.6730568277929, 11.4120070711133, - 11.6824326010276, 11.3911357792784, 12.0706441525969, 11.2155412831347, - 11.3821410267404, 11.3267141623621, 11.6076784146829, 11.3209976317701, - 11.2959562378299, 11.6786188036454, 11.6046588017454, 11.7499647941354, - 11.4831512412866, 11.8286883023093, 11.7007855177161, 11.6125285414713, - 11.4368552322619, 11.677278735656, 11.2591724516819, 11.2122991922597, - 11.2014592283697, 11.6757643041424, 11.3976039512326, 11.4064992756645, - 11.6084844857244, 11.2659904100175, 11.4887603755147, 11.3465556328527, - 11.6709507658488, 11.4442961944266, 11.6860922015911, 11.3337180713638, - 11.4934336220037, 11.4237641215403, 11.2597374132061, 11.1767350574449, - 11.5249429055911, 11.2922544242571, 11.3860745867636, 11.5766005475934, - 11.2628237130449, 11.6146165920334, 11.4175020113036, 11.3195033621875, - 11.1710952560318, 11.6597792510826, 11.4868152191465, 11.5721318552201, - 11.6486854013223, 11.6404214031175, 11.4738473838758, 11.0370114162703, - 11.5306291118776, 11.7547581342576, 11.1729582778396, 11.5752263994969, - 11.2468730281413, 11.7327251393004, 11.6517053064323, 11.5377269190321, - 11.7274750442181, 11.8998204906137, 11.6746453028613, 11.7144040978644, - 11.3885625929466, 11.4727695225601, 11.5211563372212, 11.8779053238367, - 11.5235380529653, 11.7352073567185, 11.778095222296, 11.5565087399718, - 11.4303811869928, 11.411039568203, 11.7936208857429, 11.2632318149877, - 11.4183636452509, 11.5450923312535, 11.5304172016656, 11.3564668458882, - 11.3097786542072, 11.2559960803643, 11.1900205330239, 11.3179458681654, - 11.5468393692064, 11.6109598609785, 11.4397968689957, 11.5829306616596, - 11.4265533991304, 11.4037107783255, 11.6231069350061, 11.4476147809259, - 11.315857500714, 11.192073498525, 11.1450028934144, 11.4763778673496, - 11.3303593182416, 11.795851315237, 11.3154135776636, 11.504446981381, - 11.3686452517911, 11.0681174567049, 11.9482203553029, 11.4990621721172, - 11.7700827893035, 11.153277291342, 11.4103274908523, 11.362014739247, - 11.3370793845089, 10.9490041292355, 11.5709887438907, 11.2392472207936, - 11.4457697378538, 11.5518564381783, 11.1668497234251, 11.660217248224, - 11.5408481305805, 11.3596525221312, 11.7088443068689, 11.0985982119481, - 11.6344343224953, 11.5835918466228, 11.6707241606893, 11.4873075231587, - 11.6871951877657, 11.3561777270116, 11.0926984591504, 11.6670973459339, - 11.4743776164222, 11.4012126214713, 11.1670799989037, 11.3895862238313, - 11.4619188035051, 11.7438466838695, 11.7789086710159, 11.8254153257148, - 11.5350198406344, 11.614146101765, 11.5037937949341, 11.7594749216344, - 11.7232424558103, 11.4901038034287, 11.457497322123, 11.4701475688988, - 11.3495747129771, 11.4768364004515, 11.3536264552173, 11.6967872920671, - 11.5958239935742, 11.8102460795176, 11.5285720139981, 11.5636360422529, - 11.2391302305836, 11.6400828524342, 11.3649992872627, 11.7739800561355, - 11.9514605248261, 11.8948860243831, 11.3298148207664, 11.3913235205135, - 11.2842354326543, 11.5345139189297, 11.0970243900149, 11.7031563986728, - 11.6634306349493, 11.9092830544344, 11.5869287303179, 11.7564461328616, - 11.150172788247, 11.4822541140239, 11.4044323999418, 11.7430862177697, - 11.4674029907269, 11.6087102680844, 11.0224410790094, 11.1429072494759, - 11.1440714332214, 11.4429296944542, 11.5110545367456, 11.6902834560434, - 11.975232188303, 11.3484533650323, 11.5902139993436, 11.6936184805547, - 11.2156665797036, 11.5367845942098, 11.457685987964, 11.326091672857, - 11.54310696694, 11.6318253757251, 11.4672564829417, 11.2753353731344, - 11.5442624404976, 11.4998938095082, 11.7680718084146, 11.4432553497958, - 11.7656381805778, 11.6559051931419, 11.2711880476245, 11.6412415650511, - 11.5685922662603, 11.5506412075912, 11.3513987873333, 11.3315276655562, - 11.335640654208, 11.681285272101, 11.5589662365603, 11.1828140877568, - 11.5312581724757, 11.5432002402202, 11.7912888955701, 11.4905985999693, - 11.1259591802745, 11.4610350884183, 11.7991160364597, 11.579099060573, - 11.33449302326, 11.2554336598017, 11.4512378707303, 11.7226621454134, - 11.3527354290433, 11.6705425125658, 11.5563556191945, 11.7308586023113, - 11.9851397182973, 11.075885463439, 11.2080718893369, 11.4368799211954, - 11.5632546318052, 11.6634278624019, 11.318215841977, 11.4880779444713, - 11.6701760414542, 11.7900454830006, 11.4305509189927, 11.4005711273461, - 11.493397563551, 11.3671831886506, 11.5455573847742, 11.455219607115, - 11.3765307074504, 11.5322198186407, 11.7234429342707, 11.4913195141207, - 11.5800460407405, 11.5015183797711, 11.600345452303, 11.671105482069, - 11.9009180552352, 11.3047838103508, 11.243053789483, 11.3132995190247, - 11.1839945545923, 11.5467528309238, 11.4624123336534, 11.4384084755489, - 11.7624832869299, 11.4972069873588, 11.6718416090489, 11.5565193860913, - 11.6854937630156, 11.486887701755, 11.2245408284927, 11.4223163757767, - 11.6183353030888, 11.4781731819334, 11.4180676231011, 11.5222391679401, - 10.9874586119541, 11.6315015151944, 11.6259231476061, 11.5246942987034, - 11.3790143669854, 11.6091093097247, 11.8458505048798, 11.3956132241971, - 11.4334989846648, 12.0107090576645, 11.58889471641, 11.8485588211996, - 11.6912962865302, 11.3443567873428, 11.4889742885729, 11.7353556032995, - 11.3458181845925, 11.5360487979571, 11.572996307097, 11.3900889967152, - 11.3871286159282, 11.6394988106606, 11.6672892268697, 11.2499719224047, - 11.4355438444653, 11.4146461074679, 11.5830061909034, 11.356416701344, - 11.5194114268155, 11.4461730977868, 11.7555819598489, 11.757108193106, - 11.6621065583231, 11.838582610051, 11.7632074437835, 11.3465420858875, - 11.5844207003211, 11.1705821018384, 11.4142931889118, 11.6952187675352, - 11.5853093436653, 11.3754738036731, 11.4897478077412, 11.6808486866119, - 11.7782359379539, 11.4098989033173, 11.5147654815493, 11.9203595355564, - 11.7863398442806, 11.6085439373772, 11.3748020550406, 11.5107499518156, - 11.4459430122029, 11.8864880814917, 11.3910504966753, 11.7608068035471, - 11.2010926856702, 11.2525270439525, 11.6862467158833, 11.732921172069, - 11.2587015436406, 11.9648080240531, 11.2853204109666, 11.5145507471921, - 11.4761721195894, 11.3591745195689, 11.6041308327816, 11.8698306010401, - 11.6899433491951, 11.3939731110365, 11.5342338112757, 11.7752406163456, - 11.435729513263, 11.3188712646992, 11.3365988682073, 11.6485204521932, - 11.480686518043, 11.2799874465089, 11.4116754417375, 11.4545426647885, - 11.5745481350434, 11.1966656568524, 11.6975132142541, 11.6431448445814, - 11.2517604231283, 11.1486491517404, 11.6991734787903, 11.2241659658642, - 11.4952691898267, 11.5740123918133, 11.3536512948081, 11.5378236053867, - 11.5105640641999, 11.8221701602153, 11.2923902515628, 11.53180649897, - 11.3691594548817, 11.6175646316642, 11.4053269282246, 11.234768393995, - 11.641542054491, 11.7999676522794, 11.5257062424203, 11.5059110405551, - 11.6617696764003, 11.3226243854653, 11.4880248762229, 11.7337176970954, - 11.2155495826891, 11.6517450661497, 11.6021018262328, 11.3877604077526, - 11.639890502846, 11.7809973315967, 11.3515596489177, 11.3761078301294, - 11.4971577458201, 11.7264688656258, 11.4937265193511, 12.0486431731611, - 11.4285135930375, 11.5266970229313, 11.6897298607594, 11.1325756698399, - 11.3610403083483, 11.271158595137, 11.5987031218919, 11.2413020872383, - 11.6922042998872, 11.0622291689558, 11.0493045662671, 11.7886726028345, - 11.356875041002, 11.222682110044, 11.1729481428879, 12.050179976782, - 11.3691912771854, 11.1729814065191, 11.6134550080208, 11.3668928620368, - 11.2789813760573, 11.858752849499, 11.1277127982319, 11.2254664041385, - 11.6425437286932, 11.5189911033846, 11.72792415931, 11.3460373137601, - 11.4266246813696, 11.6145883108721, 11.4040865639135, 10.9397029690441, - 11.9355220072695, 11.5659683736315, 11.2595351388416, 11.7264552315149, - 11.4250232833136, 11.8505002503181, 11.6736025315652, 11.6358341743864, - 11.4848620300854, 11.0658566253791, 11.7433762718265, 11.368863939374, - 12.0430882282277, 11.1478992722267, 11.6529116138211, 11.4386231562301, - 11.4699978508074, 11.3949217618572, 11.4546511662623, 11.6224432553423, - 11.4421481785793, 11.657180874398, 12.8288174569032, 11.6252568763014, - 11.491598965489, 11.5122204443171, 11.1946277176765, 11.3371665039755, - 11.8219395858959, 11.4177551579925, 11.817401786082, 10.9066865497524, - 11.6292423316714, 11.4345661115386, 11.5146335760661, 11.2164818600078, - 11.6462007756576, 11.5594553161589, 11.2777294045852, 11.4064561143383, - 11.403296101097, 11.1942695626537, 11.2069796841188, 11.5108806250445, - 11.4903700781168, 11.4412637072806, 11.7367046978334, 11.4415759938265, - 11.461789360977, 11.5025221397458, 11.6741375647481, 11.6318730203337, - 11.8724788742072, 11.3411139466139, 11.193895333642, 11.5090212617708, - 11.4766156814582, 11.3025257977669, 11.6887687898236, 11.9785619762261, - 11.5832745795798, 11.5638848196105, 11.6373626595557, 11.5346618451343, - 11.8053599896049, 11.7866836352087, 11.6656448470497, 11.6767793846651, - 11.4386961150224, 11.6601979255714, 11.6835301301195, 11.1916085178821, - 11.3638143635823, 11.5384570024637, 11.5021355520758, 11.728807679399, - 10.984378479658, 11.7213214603164, 10.7461781085464, 11.3870533808756, - 11.6264922619532, 11.5206029097705, 11.3075447476347, 11.5292525213332, - 11.4474539160496, 11.1784758708234, 11.3896979535097, 11.719541623793, - 11.6053073443453, 11.518232072859, 11.3712640382737, 11.6098940705145, - 11.5382560364661, 11.7993666879693, 11.6324840910319, 11.4481893420571, - 11.541204261907, 11.5773112599797, 11.5737901104302, 11.4341925128839, - 11.4793732048958, 11.6786469969964, 11.779820125404, 11.531459246292, - 11.2534419833243, 11.5242285802331, 11.7505344377909, 11.2561748020822, - 11.4661314501832, 11.4760530705387, 11.4506126062349, 11.3963732165445, - 11.4312630670097, 11.3557616131191, 11.5823565060607, 11.5363888326256, - 11.4917903826409, 11.5703392588785, 11.4208903235975, 11.3264983504393, - 11.4339118777607, 11.6207177601068, 12.0732854180863, 11.3485270565549, - 11.7214183450559, 11.3500282028636, 11.2190693389911, 11.2069248306124, - 11.6847250769785, 11.7484631837051, 11.3928718561409, 11.0483431329695, - 11.0632555553734, 11.3484711276532, 11.3540665678888, 11.424901501236, - 11.3772438391331, 11.3402755457535, 11.6658488666932, 11.801777190057, - 11.2024789759482, 11.2178942545725, 11.4553053426658, 11.7871905188347, - 11.4981479663863, 11.327302970811, 11.4159310930165, 11.5560442202663, - 11.7365037432332, 11.3378278539107, 11.8208625963249, 11.6497566272874, - 11.5075152494812, 11.5215250880463, 11.2812669600297, 11.310753285262, - 11.9620678652502, 11.3590587863734, 11.3898381131715, 11.2529331118846, - 11.2362185790092, 11.385351174977, 11.5744685353361, 11.4856804686762, - 11.913912055332, 11.3767849155427, 11.8094735607357, 11.1508024267808, - 11.8106804361006, 11.5470001967063, 11.3952593838908, 11.2484965135934, - 11.1152705518813, 11.5389406080853, 11.7634503537939, 11.4291028317061, - 11.3276572999105, 11.4930118360099, 11.5469649014856, 11.5169350020809, - 11.3285353226113, 11.2780234904709, 11.440289000834, 11.220111220716, - 11.6368461254189, 11.3373985461442, 11.5729909942026, 11.5627913514537, - 11.896010438462, 12.1378927192053, 11.2661668881932, 11.6500397905937, - 11.9456515880464, 11.6036046289927, 11.2617034688574, 11.2041718173304, - 11.7846555949065, 11.7468241221256, 11.5711643637382, 11.4605756512852, - 11.6855846792033, 11.610560314245, 11.4023298726094, 11.5935010737646, - 11.4794267316669, 11.4177936724899, 11.3170444087192, 11.4297981291346, - 11.5846912793348, 11.5361273182454, 11.2836990730896, 11.7129292407643, - 11.3682617291422, 11.5788574326573, 11.3656467657476, 11.4105589568224, - 11.6329782469737, 11.7741760320124, 11.5877677859266, 11.4614478490663, - 11.8922989610443, 11.4769174598707, 11.5473094994925, 11.8164122469798, - 11.3965297469094, 11.7060351811225, 11.9160697996983, 12.2091231955421, - 11.4513840897352, 11.9190686799799, 11.5716373917844, 11.4552839479779, - 11.2069385588086, 11.2352938786398, 11.4799962344234, 11.1715703387231, - 11.5951806551894, 11.4965967805174, 11.9066684684352, 12.085620305792, - 11.6762460737526, 11.5003622406498, 11.2467259944484, 11.3576209222196, - 11.5538967776043, 11.6021728438367, 11.4017677191272, 11.6541203471886, - 11.5179908661979, 11.3731766103249, 11.284667844589, 11.277379710151, - 11.6083662721441, 11.4137354186957, 10.8955839097348, 11.6128481523168, - 10.9414889550394, 11.500934449099, 11.4032494506259, 11.3414275766532, - 11.6103518032939, 11.4489716827269, 11.4521528606091, 11.4586955357924, - 11.0442737725854, 11.4024077316865, 11.4530826810189, 11.2142229985889, - 11.3211367494156, 11.7695143207915, 11.6801094326193, 11.378714542138, - 11.5894285425463, 11.4535592112896, 11.5189077909302, 11.905529468508, - 11.7308595111171, 11.1561241580823, 11.5396607072055, 11.5670558138667, - 11.5866534877845, 11.4899696625367, 10.7606650890848, 11.4623034225546, - 11.4829861663367, 11.531027241558, 11.1284027924671, 11.3789406141285, - 11.7180842406464, 11.248060386135, 11.8557680503442, 11.4749711791423, - 11.7731267020686, 11.4451020052469, 11.5536039362763, 11.2295030702308, - 11.4439680242462, 11.3599366494965, 11.2375779084626, 11.4027090068517, - 11.4674002049422, 11.6107908879673, 11.3646653036025, 11.3525677125419, - 11.6956920927681, 11.5949761789213, 11.4279470409673, 11.628194983154, - 11.3797989564061, 11.4537211190876, 11.544720822699, 11.3477447726164, - 11.5106910979557, 11.2705155562627, 11.5419354593303, 11.6002427009366, - 11.3617284216845, 11.4545380023049, 11.5559785868196, 11.2827575037312, - 11.4923949055435, 11.4670902548463, 11.7775808724294, 11.7524650925602, - 11.5232395955812, 11.7716348213617, 11.3129441491383, 11.9184159519933, - 11.4651302298193, 11.4828115364529, 11.4921553448102, 11.4840394509425, - 11.4795329119155, 11.3557617727837, 11.1990802135024, 11.555895890632, - 11.5665334157256, 11.9608405697218, 11.0906137231452, 11.4738335300962, - 11.5552267798845, 11.4917532448646, 11.4767501205378, 11.309257136722, - 11.8330397760739, 11.2452007264035, 11.5626653665188, 11.6615348431299, - 11.4036383205713, 11.9206466284402, 11.4028117349485, 11.232335830704, - 11.5710019223606, 11.2323436049941, 11.0986236955492, 11.7618238628064, - 11.3445348352561, 11.378093136043, 11.5381912190455, 11.282570495449, - 11.3186759511659, 11.4117838917907, 11.6227635225452, 11.7844213221872, - 11.5671587969278, 11.458922182513, 11.4032992701995, 11.5491884538217, - 11.2758671228542, 11.6770897492982, 11.6342313067151, 11.1237574188463, - 11.6031081273673, 12.1290653063871, 11.4778345922648, 11.3583463804655, - 11.3266052031506, 11.7246123353123, 11.4647737955044, 11.5883332972292, - 11.4248310030985, 11.3713918308266, 11.2041509548359, 11.617616628905, - 11.3759381668148, 11.3305920225639, 11.6871369457011, 11.6303021419011, - 11.4931674583361, 11.0922966074434, 11.2490842937364, 10.9403583083204, - 11.1716989237958, 11.4292855836507, 11.6236233194597, 11.5989208423244, - 11.2147889962406, 11.625607143598, 11.8748838328963, 11.5414934062674, - 11.6259439615824, 11.3364532857374, 11.8227344400673, 11.7111666222959, - 11.3727104334305, 11.7078155455392, 11.5544569070194, 11.6021540153749, - 11.573369065866, 10.8581859655439, 11.6615357936139, 11.6074293122824, - 11.3800328287919, 11.8608121046055, 10.8695335671074, 11.4549460213617, - 11.6732793086444, 11.6280582434249, 11.7938110746401, 11.2759355094693, - 11.7333174374389, 11.5124908292672, 11.5116966042338, 11.2557414497685, - 11.111003192477, 11.7723687553069, 11.5311536361956, 11.415675250247, - 11.434958888026, 11.5764304335137, 11.3184428704269, 11.5925005193847, - 11.6606221243124, 11.6799864503813, 11.6680624812246, 11.6323392171622, - 11.6205668223306, 11.2743893579799, 11.3038169041637, 11.2516179608122, - 11.0913550278671, 11.5183036046645, 11.6088540037091, 11.4237385957101, - 11.7411183714493, 11.5268255736499, 11.5514313428383, 11.4939244996735, - 11.478671143305, 11.5506137782508, 11.4838342763386, 11.9082590797765, - 10.960554474782, 11.4510734836701, 11.594720494906, 11.6435287600618, - 11.4730994130636, 11.6753147493462, 11.0704918909154, 11.3363906264414, - 11.4069381361204, 11.3390189388972, 11.7394581174949, 11.5025933598415, - 11.5091568374427, 11.8189657846627, 11.6762535202989, 11.4862855869735, - 11.5191142470272, 11.4087780398663, 11.5361396738411, 11.3477626341929, - 11.3295447034612, 11.6461819581215, 11.3160562372171, 11.9732839905477, - 11.2597545419879, 11.6483236285684, 11.6659329899876, 11.3375985127992, - 11.5652927769658, 11.5402126667346, 11.5246347656743, 11.3790534415256, - 11.3504467491437, 11.9006774473653, 11.2998434728114, 11.294215001317, - 11.0352592725904, 11.5442750193934, 11.9540286929111, 11.5849472177449, - 11.8695269797079, 11.2221940781463, 11.5391494901798, 11.7652998758852, - 11.7152214736869, 11.6161349733777, 11.3455362974154, 11.3697013696593, - 11.6159930311664, 11.5192522836597, 11.3626732407949, 11.7915655615128, - 10.8468085570926, 11.5051760134024, 11.3931245756523, 11.6445146662936, - 11.3470732268861, 11.6515019252136, 11.5141257439709, 11.2773011669151, - 11.3032998105644, 11.7571007839257, 11.3544692125066, 11.5818232930408, - 11.0839805881239, 11.8582789073051, 11.5997729156958, 11.5897058738691, - 11.4193569373722, 11.8678858552685, 11.6051915096343, 11.3371558507094, - 11.3210764775439, 11.3670660935708, 10.9736909230005, 11.5134036283058, - 11.7378869878075, 11.6101540643963, 11.5960760408688, 11.5398373831802, - 11.6921293527264, 11.0056293583308, 11.3779618825627, 11.4358858630188, - 11.3398108548088, 11.500395429923, 11.6290788048495, 11.4534379910937, - 11.3973526125132, 11.8090228812056, 11.4349697688751, 11.4120105561733, - 11.2768023713792, 11.6479180048227, 11.8538348852147, 11.2816551787507, - 11.5483270246353, 11.5002183838825, 11.3020898934751, 11.5115149415805, - 11.2017560031151, 11.352225955946, 11.6826296693967, 11.8553332139932, - 11.9042883574032, 11.0560549115389, 11.1767099828818, 11.421709850191, - 11.702545464272, 11.7485923966285, 11.8047860348248, 11.4448541804893, - 11.4705435703147, 11.716935272144, 10.9954029806633, 11.1256601239288 - )) - set.seed(100) - fit <- ssd_fit_dists(data = data, dists = 'lnorm_lnorm', at_boundary_ok=TRUE, min_pmix = 3/nrow(data)) - tidy <- tidy(fit) - expect_snapshot_data(tidy, "tidy_lnorm_lnorm_uni1000_3n", digits = 6) -}) diff --git a/vignettes/additional-technical-details.Rmd b/vignettes/additional-technical-details.Rmd index a0883bb16..170caf050 100644 --- a/vignettes/additional-technical-details.Rmd +++ b/vignettes/additional-technical-details.Rmd @@ -2,6 +2,7 @@ title: "Additional technical details" author: "sstools Team" date: '`r format(Sys.time(), "%Y-%m-%d")`' +bibliography: references.bib csl: my-style.csl latex_engine: MathJax mainfont: Arial @@ -49,6 +50,64 @@ The ssdtools package uses the method of Maximum Likelihood (ML) to estimate para that is fit to the data. Statistical theory says that maximum likelihood estimators are asymptotically unbiased, but does not guarantee performance in small samples. A detailed account of the issue of small sample bias in estimates can be found in the following [pdf](https://github.com/bcgov/ssdtools/blob/master/vignettes/small-sample-bias.pdf). +## Investigations into setting minimum sample sizes for uni-modal and bi-modal distributions in ssdtools + +Most jurisdictions require a minimum sample size for fitting a valid SSD. The current Austalian and New Zealand minimum is 5, in order to fit a the two-parameter log-normal distribution [@warne2018; @anzg]. The current default minimum sample size is 6 for version 1.0 of ssdtools [@thorleyschwarz; @thorleysschwartz2018joss], which is consistent with the current methodology for British Columbia [@ccme]. + +Here we report on a series of simulation studies designed to inform a final decision on the default minimum sample size to adopt for both the uni-modal 2 parameter distributions, as well as the bi-modal 5 parameter distributions. + +### Bias and CI coverage and interval width + +#### Simulations based on ssddata + +We used the example datasets in the ssddata package in R [@ssddata] to undertake a simulation study to examine bias, coverage and confidence interval widths using the recommended default set of distributions (lognormal, log-Gumbel, log-logistic, gamma, Weibull, and the lognormal-log-normal mixture), with model averaged estimates obtained using the multi-method, and confidence intervals estimated using the recommended weighted sample bootstrap method (see Fox et al. 2024). A total of 20 unique datasets were extracted from ssddata and used to define the parameters for the simulation study as follows: + + 1. Each dataset was extracted from ssddata and fit using the default distribution set as recommended in [@fox_methodologies_2021] and [@fox_methodologies_2024]. + 2. Of the six default distributions, the parameters for the distribution having the highest weight for each dataset was used to generate new random datasets of varying values of N, including (but not limited to): 5 (current ANZG minimum), 6 (current BC minimum), and 8 (current ANZG preferred). + 3. For each randomly generated dataset, ssdtools was used to re-fit the data, and model averaged estimates were obtained using the multi-method, with upper and lower confidence intervals estimated using the recommended weighted sample method. + +The individual ssdtools fits are shown below for each of the 20 simulation datasets from ssddata, for the six recommended default distributions, as well as the model averaged CDF (black line): + +![](Images/fitted_dists.png) + +This simulation process was repeated a minimum of 1,000 times for each dataset, and the results collated across all iterations. For each simulated dataset the true HCx values were obtained directly from the parameter estimates of from data generating distribution. From these, relative bias was calculated as the scaled-difference between the estimated HCx values and the true HCx value, i.e $$\frac{\widehat {HC}x-HCx}{HCx}$$ where $\widehat {HC}x$ is the estimate of the true value, $HCx$; coverage was calculated as the proportion of simulations where the true $HCx$ value fell within the lower and upper 95% confidence limits; and the scaled confidence interval width was calculated as $$\frac{UL-LL}{HCx}$$ where $UL$ and $LL$ are the upper and lower limits respectively. + +Bias, confidence interval width and coverage as a function of sample size across ~1000 simulations of 20 datasets using the multi model averaging method and the weighted sample method for estimating confidence intervals via ssdtools are shown below: + +![](Images/ssdata_sims_collated.png) + +The simulation results showed significant gains in terms of reduced bias from N=5 to N=6, as well as in coverage, which improved substantially between N=5 and N=6. There is also a small additional gain in coverage at N=7, where the median of the simulations reaches the expected 95% but this is only the case for HC1. + +#### Simulations based on EnviroTox + +In addition to the analysis based on the 20 ssddata example datasets, we also ran an expanded simulation study based on the EnviroTox dataset analysed by Yanagihara et al. (2024). Combined with the ssddata examples, this includes a total of 353 example datasets to use as case studies. Using this larger dataset as a basis for simulations, we followed the same procedure as described above to examine relative bias, as well as changes in the AICc weights (see below) for various sample sizes. Estimates of coverage and confidence interval widths were not obtained for this larger dataset due to the computationally intensive bootstrap method of obtaining confidence intervals. + +Bias of sample size across ~1000 simulations of 353 datasets using the multi model averaging method via ssdtools, for HC5, 10 and 20 (0.05, 0.1, and 0.2) are shown below: + +![](Images/all_sims_bias.png) + +Note that simulation results are shown separately for those derived from each of the six distributions as the underlying source data generating distribution. + +The bias results for this larger combined dataset did not show the same level of improvement from N=5 to N=6 as that based on the smaller ssddata simulation. However, there as a gradual improvement in bias with increasing N. There is no strong evidence for preferring N=6 over N=7 in the context of bias from either of the simulation studies. We note that the bias was highest at these small sample sizes for data generated using a gamma distribution, likely reflecting the extreme left-tailed nature of this distribution. + +### ACIc based model weights + +Aside from considerations of bias, coverage and confidence interval width, it is also prudent to examine how the weights of the different distributions changed with sample size, for data generated using the six different default distributions, to more fully investigate sample size issues associated with the use of the mixture distributions. This was examined using the simulation study across the larger combined ssddata and EnviroTox datasets (353 datasets) to ensure a wide range of potential representations of each of the six default distributions was considered. + +Below is a plot of the mean AICc weights as a function of sample size (N) obtained for data simulated using the best fit distribution to 353 datasets. Results are shown separately for the six different source distributions, with the upper plot (A) showing the AICc weight of the source (data generating) distributions, when fit using the default set of six distributions using ssdtools; and the lower plot (B) showing the AICc weight of the lognormal-lognormal mixture distribution for each of the source (data generating) distributions. + +![](Images/weights_collated.png) + +We found that the AICc weights for the five unimodal distributions were relatively similar (~0.2) for very low N. This is because for small N it is difficult to discern differences between the distributions in the candidate list. The weights increase to above 0.5 as N increases (i.e. their converge to the true underlying generating distribution at high N, upper plot). For very low sample sizes (N=5, 6 or 7) the source (data-generating) distribution is not preferentially weighted by the AICc (upper plot, A). + +For the lnorm_lnorm mixture, AICc weights can be >0.5 at relatively N (>8, lower plot, B). We also looked specifically at the AICc weight of the lognormal-lognormal mixture as one of six distributions in the default candidate set, across simulation based on all six source generating distributions. This was done to examine the potential for erroneously highly weighting the lognormal-lognormal mixture distribution by chance, when data are generated instead using one of the five unimodal distributions. For all the unimodal source distributions the lognormal-lognormal mixture never has high AICc weight, even at very high sample sizes (N=256, lower plot, B). The AICc weights are particularly low for the lnorm_lnorm mixture at low sample sizes for all the uni-modal source distributions (a desirable property) (lower plot, B). + +### Conclusions + +Overall, the results suggest that (relative) bias as a function of N behaves as expected. The N=6 recommendation appears to be well-supported as coverage is particularly low for N=5, but acceptable for N=6. The lognormal-lognormal mixture AICc weights suggest that this distribution will only be preferred (i.e. have a high AICc weight) when (i) there is clear evidence of bimodality in the source data; and (ii) large N. + +Based on these results, our recommendation is that only a single minimum sample size of N=6 be adopted (for both unimodal and bimodal), since our results suggest any gains in increasing this to 7 are minimal. + ## The inverse Pareto and inverse Weibull as limiting distributions of the Burr Type-III distribution ### Burr III distribution @@ -125,8 +184,10 @@ where $\theta$ is a parameter (constant). The distribution of $Y$ is also a Burr We recognise the last expression as the *cdf* of a Weibull distribution with parameters $c$ and $\theta$. - - ```{r, results = "asis", echo = FALSE} cat(ssdtools::ssd_licensing_md()) ``` + + +## References + diff --git a/vignettes/articles/confidence-intervals.Rmd b/vignettes/articles/confidence-intervals.Rmd index d9dc8c367..6f67084ce 100644 --- a/vignettes/articles/confidence-intervals.Rmd +++ b/vignettes/articles/confidence-intervals.Rmd @@ -146,13 +146,13 @@ However, the lower confidence interval obtained using the weighted arithmetic me library(ggplot2) # library(ggpubr) p1 <- ggplot(compare_dat, aes(method, ucl, fill = method)) + - geom_bar(stat="identity", position=position_dodge()) + + geom_bar(stat = "identity", position = position_dodge()) + theme_classic() + - theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1)) p2 <- ggplot(compare_dat, aes(method, lcl, fill = method)) + - geom_bar(stat="identity", position=position_dodge()) + + geom_bar(stat = "identity", position = position_dodge()) + theme_classic() + - theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1)) # ggarrange(p1, p2,common.legend = TRUE) ``` @@ -164,10 +164,10 @@ This means that the weighted bootstrap method is ~ `r round(t2["elapsed"]/t4["el ```{r fig.width=7,fig.height=5} p3 <- ggplot(compare_dat, aes(method, time, fill = method)) + - geom_bar(stat="identity", position=position_dodge()) + - ylab("Elapsed time (seconds)") + - theme_classic() + - theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) + geom_bar(stat = "identity", position = position_dodge()) + + ylab("Elapsed time (seconds)") + + theme_classic() + + theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1)) p3 ``` diff --git a/vignettes/customising-plots_cache/latex/__packages b/vignettes/customising-plots_cache/latex/__packages deleted file mode 100644 index 8b0399493..000000000 --- a/vignettes/customising-plots_cache/latex/__packages +++ /dev/null @@ -1,9 +0,0 @@ -base -methods -datasets -utils -grDevices -graphics -stats -ggplot2 -ssdtools diff --git a/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.RData b/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.RData deleted file mode 100644 index d970b6ddc..000000000 Binary files a/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.RData and /dev/null differ diff --git a/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.rdb b/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.rdb deleted file mode 100644 index 2e29e0ce2..000000000 Binary files a/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.rdb and /dev/null differ diff --git a/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.rdx b/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.rdx deleted file mode 100644 index 901f08951..000000000 Binary files a/vignettes/customising-plots_cache/latex/unnamed-chunk-1_f1e082762b3d7940c4b67523f4760965.rdx and /dev/null differ diff --git a/vignettes/distributions.Rmd b/vignettes/distributions.Rmd index 4c25bed31..cad96d896 100644 --- a/vignettes/distributions.Rmd +++ b/vignettes/distributions.Rmd @@ -124,28 +124,29 @@ The probability density function, ${f_X}(x;b,c,k)$ and cumulative distribution f

Sample Burr probability density and cumulative distribution functions

```{r echo=FALSE} -f<-function(x,b,c,k){ -z1<-(b/x)^(c-1);z2<-(b/x)^c -y<-(b*c*k/x^2)*z1/(1+z2)^(k+1) -return(y) +f <- function(x, b, c, k) { + z1 <- (b / x)^(c - 1) + z2 <- (b / x)^c + y <- (b * c * k / x^2) * z1 / (1 + z2)^(k + 1) + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,f(conc,1,3,5),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733") -lines(conc,f(conc,1,1,2),col="#F2A61C") -lines(conc,f(conc,1,2,2),col="#1CADF2") -lines(conc,f(conc,1,2,5),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, f(conc, 1, 3, 5), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733") +lines(conc, f(conc, 1, 1, 2), col = "#F2A61C") +lines(conc, f(conc, 1, 2, 2), col = "#1CADF2") +lines(conc, f(conc, 1, 2, 5), col = "#1F1CF2") -F<-function(x,b,c,k){ -z2<-(b/x)^c -y<-1/(1+z2)^k -return(y) +F <- function(x, b, c, k) { + z2 <- (b / x)^c + y <- 1 / (1 + z2)^k + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,F(conc,1,3,5),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733") -lines(conc,F(conc,1,1,2),col="#F2A61C") -lines(conc,F(conc,1,2,2),col="#1CADF2") -lines(conc,F(conc,1,2,5),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, F(conc, 1, 3, 5), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733") +lines(conc, F(conc, 1, 1, 2), col = "#F2A61C") +lines(conc, F(conc, 1, 2, 2), col = "#1CADF2") +lines(conc, F(conc, 1, 2, 5), col = "#1F1CF2") ``` While the Burr type III distribution was adopted as the default distribution in Burrlioz, it is well known (e.g., Tadikamalla (1980)) that the Burr III distribution is related to several other theoretical distributions, some of @@ -194,30 +195,37 @@ that defines the weighting of the two distributions in the ‘mixture.’

Sample lognormal mixture probability density and cumulative distribution functions

```{r echo=FALSE} -f<-function(x,m1,s1,m2,s2,p){ -y<-p*dlnorm(x,m1,s1)+(1-p)*dlnorm(x,m2,s2) -return(y) +f <- function(x, m1, s1, m2, s2, p) { + y <- p * dlnorm(x, m1, s1) + (1 - p) * dlnorm(x, m2, s2) + return(y) } -conc<-seq(0,5,by=0.0025) -m1=1;s1=.2;m2=1.8;s2=1.5;p=0.25 -plot(conc,f(conc,m1,s1,m2,s2,p),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,f(conc,0.09,0.5,1,0.08,0.9),col="#F2A61C") -lines(conc,f(conc,0.5,0.5,1,0.08,0.9),col="#1CADF2") -lines(conc,f(conc,0.7,1.5,0.5,0.1,.7),col="#1F1CF2") - -F<-function(x,m1,s1,m2,s2,p){ -y<-p*plnorm(x,m1,s1)+(1-p)*plnorm(x,m2,s2) -return(y) +conc <- seq(0, 5, by = 0.0025) +m1 <- 1 +s1 <- .2 +m2 <- 1.8 +s2 <- 1.5 +p <- 0.25 +plot(conc, f(conc, m1, s1, m2, s2, p), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, f(conc, 0.09, 0.5, 1, 0.08, 0.9), col = "#F2A61C") +lines(conc, f(conc, 0.5, 0.5, 1, 0.08, 0.9), col = "#1CADF2") +lines(conc, f(conc, 0.7, 1.5, 0.5, 0.1, .7), col = "#1F1CF2") + +F <- function(x, m1, s1, m2, s2, p) { + y <- p * plnorm(x, m1, s1) + (1 - p) * plnorm(x, m2, s2) + return(y) } -conc<-seq(0,10,by=0.0025) -m1=1;s1=.2;m2=1.8;s2=1.5;p=0.25 -plot(conc,F(conc,m1,s1,m2,s2,p),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,F(conc,0.09,0.5,1,0.08,0.9),col="#F2A61C") -lines(conc,F(conc,0.5,0.5,1,0.08,0.9),col="#1CADF2") -lines(conc,F(conc,0.7,1.5,0.5,0.1,.7),col="#1F1CF2") - +conc <- seq(0, 10, by = 0.0025) +m1 <- 1 +s1 <- .2 +m2 <- 1.8 +s2 <- 1.5 +p <- 0.25 +plot(conc, F(conc, m1, s1, m2, s2, p), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, F(conc, 0.09, 0.5, 1, 0.08, 0.9), col = "#F2A61C") +lines(conc, F(conc, 0.5, 0.5, 1, 0.08, 0.9), col = "#1CADF2") +lines(conc, F(conc, 0.7, 1.5, 0.5, 0.1, .7), col = "#1F1CF2") ```
As can be see from the plot above, the mixture distributions provide a highly flexible means of modelling *bimodality* in an emprical SSD. This happens, for example, when the toxicity data for some toxicant include both animal and plant species, or there are different modes of action operating. Unfortunately, this increased flexibilty comes with a high penalty in the model-averaging process. The combination of small sample sizes and a high parameter count (typically 5 or more) means that mixture distributions will be down-weighted - even when they do a good job at describing the data. For this reason, when attempting to model bimodal data, we suggest looking at the fit using the default set of distributions and then examining the fit with just one of either the log-normal mixture or the log-logistic mixture. Keep in mind that this should only be done if the sample size is not pathologically small. As a guide, Prof. David Fox recommends as an *absolute minimum* $n \ge 3k + 1$ but preferably $n \ge 5k + 1$ where $k$ is the number of model parameters. @@ -302,20 +310,27 @@ The lognormal distribution was selected as the starting distribution given the d

Sample lognormal probability density and cumulative distribution functions

```{r echo=FALSE} -conc<-seq(0,10,by=0.005) -m1=1;s1=.2;m2=1.8;s2=1.5;p=0.25 -plot(conc,dlnorm(conc,m1,s1),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,dlnorm(conc,0.4,2),col="#F2A61C") -lines(conc,dlnorm(conc,m1*2,s1),col="#1CADF2") -lines(conc,dlnorm(conc,0.9,1.5),col="#1F1CF2") - -conc<-seq(0,10,by=0.005) -m1=1;s1=.2;m2=1.8;s2=1.5;p=0.25 -plot(conc,plnorm(conc,m1,s1),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,plnorm(conc,0.4,2),col="#F2A61C") -lines(conc,plnorm(conc,m1*2,s1),col="#1CADF2") -lines(conc,plnorm(conc,0.9,1.5),col="#1F1CF2") - +conc <- seq(0, 10, by = 0.005) +m1 <- 1 +s1 <- .2 +m2 <- 1.8 +s2 <- 1.5 +p <- 0.25 +plot(conc, dlnorm(conc, m1, s1), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, dlnorm(conc, 0.4, 2), col = "#F2A61C") +lines(conc, dlnorm(conc, m1 * 2, s1), col = "#1CADF2") +lines(conc, dlnorm(conc, 0.9, 1.5), col = "#1F1CF2") + +conc <- seq(0, 10, by = 0.005) +m1 <- 1 +s1 <- .2 +m2 <- 1.8 +s2 <- 1.5 +p <- 0.25 +plot(conc, plnorm(conc, m1, s1), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, plnorm(conc, 0.4, 2), col = "#F2A61C") +lines(conc, plnorm(conc, m1 * 2, s1), col = "#1CADF2") +lines(conc, plnorm(conc, 0.9, 1.5), col = "#1F1CF2") ``` #### Log-logistic distribution @@ -368,28 +383,29 @@ We included it because it has wider tails than the log-normal and because it is

Sample Log-logistic probability density and cumulative distribution functions

```{r echo=FALSE} -f<-function(x,a,b){ -z1<-(x/a)^(b-1);z2<-(x/a)^b -y<-(b/a)*z1/(1+z2)^2 -return(y) +f <- function(x, a, b) { + z1 <- (x / a)^(b - 1) + z2 <- (x / a)^b + y <- (b / a) * z1 / (1 + z2)^2 + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,f(conc,3.2,3.5),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1.1)) -lines(conc,f(conc,1.5,1.5),col="#F2A61C") -lines(conc,f(conc,1,1),col="#1CADF2") -lines(conc,f(conc,1,4),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, f(conc, 3.2, 3.5), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1.1)) +lines(conc, f(conc, 1.5, 1.5), col = "#F2A61C") +lines(conc, f(conc, 1, 1), col = "#1CADF2") +lines(conc, f(conc, 1, 4), col = "#1F1CF2") -F<-function(x,a,b){ -z2<-(x/a)^(-b) -y<-1/(1+z2) -return(y) +F <- function(x, a, b) { + z2 <- (x / a)^(-b) + y <- 1 / (1 + z2) + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,F(conc,3.2,3.5),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1.1)) -lines(conc,F(conc,1.5,1.5),col="#F2A61C") -lines(conc,F(conc,1,1),col="#1CADF2") -lines(conc,F(conc,1,4),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, F(conc, 3.2, 3.5), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1.1)) +lines(conc, F(conc, 1.5, 1.5), col = "#F2A61C") +lines(conc, F(conc, 1, 1), col = "#1CADF2") +lines(conc, F(conc, 1, 4), col = "#1F1CF2") ``` @@ -419,18 +435,17 @@ The gamma distribution can be fitted using `ssdtools` by supplying the string "

Sample gamma probability density and cumulative distribution functions

```{r echo=FALSE} - -conc<-seq(0,10,by=0.005) -plot(conc,dgamma(conc,5,5),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1.1)) -lines(conc,dgamma(conc,4,1),col="#F2A61C") -lines(conc,dgamma(conc,0.9,1),col="#1CADF2") -lines(conc,dgamma(conc,2,1.),col="#1F1CF2") - -conc<-seq(0,10,by=0.005) -plot(conc,pgamma(conc,5,5),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1.1)) -lines(conc,pgamma(conc,4,1),col="#F2A61C") -lines(conc,pgamma(conc,0.9,1),col="#1CADF2") -lines(conc,pgamma(conc,2,1.),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, dgamma(conc, 5, 5), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1.1)) +lines(conc, dgamma(conc, 4, 1), col = "#F2A61C") +lines(conc, dgamma(conc, 0.9, 1), col = "#1CADF2") +lines(conc, dgamma(conc, 2, 1.), col = "#1F1CF2") + +conc <- seq(0, 10, by = 0.005) +plot(conc, pgamma(conc, 5, 5), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1.1)) +lines(conc, pgamma(conc, 4, 1), col = "#F2A61C") +lines(conc, pgamma(conc, 0.9, 1), col = "#1CADF2") +lines(conc, pgamma(conc, 2, 1.), col = "#1F1CF2") ```
@@ -461,28 +476,27 @@ The two-parameter log-gumbel distribution has the following *pdf* and *cdf*:

Sample log-Gumbel probability density and cumulative distribution functions

```{r echo=FALSE} - -f<-function(x,a,b){ -y<-b*exp(-(a*x)^(-b))/(a^b*x^(b+1)) -return(y) +f <- function(x, a, b) { + y <- b * exp(-(a * x)^(-b)) / (a^b * x^(b + 1)) + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,f(conc,0.2,5),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1.1)) -lines(conc,f(conc,0.5,1.5),col="#F2A61C") -lines(conc,f(conc,1,2),col="#1CADF2") -lines(conc,f(conc,10,.5),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, f(conc, 0.2, 5), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1.1)) +lines(conc, f(conc, 0.5, 1.5), col = "#F2A61C") +lines(conc, f(conc, 1, 2), col = "#1CADF2") +lines(conc, f(conc, 10, .5), col = "#1F1CF2") -F<-function(x,a,b){ -y<-exp(-(a*x)^(-b)) -return(y) +F <- function(x, a, b) { + y <- exp(-(a * x)^(-b)) + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,F(conc,0.2,5),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1.1)) -lines(conc,F(conc,0.5,1.5),col="#F2A61C") -lines(conc,F(conc,1,2),col="#1CADF2") -lines(conc,F(conc,10,.5),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, F(conc, 0.2, 5), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1.1)) +lines(conc, F(conc, 0.5, 1.5), col = "#F2A61C") +lines(conc, F(conc, 1, 2), col = "#1CADF2") +lines(conc, F(conc, 10, .5), col = "#1F1CF2") ```
@@ -525,27 +539,27 @@ The second parameterisation in which the *product* $b\eta$ in the formulae above

Sample Gompertz probability density and cumulative distribution functions

```{r echo=FALSE} -f<-function(x,n,b){ -y<-n*b*exp(n+b*x-n*exp(b*x)) -return(y) +f <- function(x, n, b) { + y <- n * b * exp(n + b * x - n * exp(b * x)) + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,f(conc,0.089,1.25),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,2)) -lines(conc,f(conc,0.001,3.5),col="#F2A61C") -lines(conc,f(conc,0.0005,1.1),col="#1CADF2") -lines(conc,f(conc,0.01,5),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, f(conc, 0.089, 1.25), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 2)) +lines(conc, f(conc, 0.001, 3.5), col = "#F2A61C") +lines(conc, f(conc, 0.0005, 1.1), col = "#1CADF2") +lines(conc, f(conc, 0.01, 5), col = "#1F1CF2") -F<-function(x,n,b){ -y<-1-exp(-n*exp(b*x-1)) -return(y) +F <- function(x, n, b) { + y <- 1 - exp(-n * exp(b * x - 1)) + return(y) } -conc<-seq(0,10,by=0.005) -plot(conc,F(conc,0.089,1.25),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,F(conc,0.001,3.5),col="#F2A61C") -lines(conc,F(conc,0.0005,1.1),col="#1CADF2") -lines(conc,F(conc,0.01,5),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, F(conc, 0.089, 1.25), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, F(conc, 0.001, 3.5), col = "#F2A61C") +lines(conc, F(conc, 0.0005, 1.1), col = "#1CADF2") +lines(conc, F(conc, 0.01, 5), col = "#1F1CF2") ``` The Gompertz distribution is available in `ssdtools`, however parameter estimation can be somewhat unstable [@fox_methodologies_2021], and for this reason it is not currently included in the default set. @@ -577,17 +591,17 @@ The Weibull distribution can be fitted in `ssdtools` by supplying the string `w

Sample Weibull probability density and cumulative distribution functions

```{r echo=FALSE} -conc<-seq(0,10,by=0.005) -plot(conc,dweibull(conc,4.321,4.949),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,dweibull(conc,0.838,0.911),col="#F2A61C") -lines(conc,dweibull(conc,1,1.546),col="#1CADF2") -lines(conc,dweibull(conc,17.267,7.219),col="#1F1CF2") - -conc<-seq(0,10,by=0.005) -plot(conc,pweibull(conc,4.321,4.949),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,pweibull(conc,0.838,0.911),col="#F2A61C") -lines(conc,pweibull(conc,1,1.546),col="#1CADF2") -lines(conc,pweibull(conc,17.267,7.219),col="#1F1CF2") +conc <- seq(0, 10, by = 0.005) +plot(conc, dweibull(conc, 4.321, 4.949), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, dweibull(conc, 0.838, 0.911), col = "#F2A61C") +lines(conc, dweibull(conc, 1, 1.546), col = "#1CADF2") +lines(conc, dweibull(conc, 17.267, 7.219), col = "#1F1CF2") + +conc <- seq(0, 10, by = 0.005) +plot(conc, pweibull(conc, 4.321, 4.949), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, pweibull(conc, 0.838, 0.911), col = "#F2A61C") +lines(conc, pweibull(conc, 1, 1.546), col = "#1CADF2") +lines(conc, pweibull(conc, 17.267, 7.219), col = "#1F1CF2") ``` @@ -650,18 +664,17 @@ Because it is *bounded*, the North American version of the (Inverse)Pareto distr

Sample North American Pareto probability density and cumulative distribution functions

```{r echo=FALSE} -conc<-seq(0,10,by=0.005) -plot(conc,extraDistr::dpareto(conc,3,2),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1.5)) -lines(conc,extraDistr::dpareto(conc,0.838,0.911),col="#F2A61C") -lines(conc,extraDistr::dpareto(conc,4,4),col="#1CADF2") -lines(conc,extraDistr::dpareto(conc,10,7),col="#1F1CF2") - -conc<-seq(0,10,by=0.005) -plot(conc,extraDistr::ppareto(conc,3,2),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,extraDistr::ppareto(conc,0.838,0.911),col="#F2A61C") -lines(conc,extraDistr::ppareto(conc,4,4),col="#1CADF2") -lines(conc,extraDistr::ppareto(conc,10,7),col="#1F1CF2") - +conc <- seq(0, 10, by = 0.005) +plot(conc, extraDistr::dpareto(conc, 3, 2), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1.5)) +lines(conc, extraDistr::dpareto(conc, 0.838, 0.911), col = "#F2A61C") +lines(conc, extraDistr::dpareto(conc, 4, 4), col = "#1CADF2") +lines(conc, extraDistr::dpareto(conc, 10, 7), col = "#1F1CF2") + +conc <- seq(0, 10, by = 0.005) +plot(conc, extraDistr::ppareto(conc, 3, 2), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, extraDistr::ppareto(conc, 0.838, 0.911), col = "#F2A61C") +lines(conc, extraDistr::ppareto(conc, 4, 4), col = "#1CADF2") +lines(conc, extraDistr::ppareto(conc, 10, 7), col = "#1F1CF2") ```
We see from the *pdf* plots that the @@ -669,28 +682,27 @@ lines(conc,extraDistr::ppareto(conc,10,7),col="#1F1CF2")

Sample North American inverse Pareto probability density and cumulative distribution functions

```{r echo=FALSE} - -f<-function(x,a,b){ -y<-a*(b^a)*x^(a-1) -return(y) +f <- function(x, a, b) { + y <- a * (b^a) * x^(a - 1) + return(y) } -conc<-seq(0,10,by=0.001) -plot(conc,f(conc,5,0.1),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,0.5)) -lines(conc,f(conc,3,0.1),col="#F2A61C") -lines(conc,f(conc,0.5,0.1),col="#1CADF2") -lines(conc,f(conc,0.1,0.1),col="#1F1CF2") +conc <- seq(0, 10, by = 0.001) +plot(conc, f(conc, 5, 0.1), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 0.5)) +lines(conc, f(conc, 3, 0.1), col = "#F2A61C") +lines(conc, f(conc, 0.5, 0.1), col = "#1CADF2") +lines(conc, f(conc, 0.1, 0.1), col = "#1F1CF2") -F<-function(x,a,b){ -y<-(b*x)^a -return(y) +F <- function(x, a, b) { + y <- (b * x)^a + return(y) } -conc<-seq(0,10,by=0.001) -plot(conc,F(conc,5,0.1),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,F(conc,3,0.1),col="#F2A61C") -lines(conc,F(conc,0.5,0.1),col="#1CADF2") -lines(conc,F(conc,0.1,0.1),col="#1F1CF2") +conc <- seq(0, 10, by = 0.001) +plot(conc, F(conc, 5, 0.1), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, F(conc, 3, 0.1), col = "#F2A61C") +lines(conc, F(conc, 0.5, 0.1), col = "#1CADF2") +lines(conc, F(conc, 0.1, 0.1), col = "#1F1CF2") ``` @@ -724,36 +736,33 @@ We note in passing that *both* versions of these Pareto and inverse Pareto distr

Sample European Pareto probability density and cumulative distribution functions

```{r echo=FALSE} - -conc<-seq(0,10,by=0.005) -plot(conc,actuar::dpareto(conc,1,1),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,actuar::dpareto(conc,2,3),col="#F2A61C") -lines(conc,actuar::dpareto(conc,0.5,1),col="#1CADF2") -lines(conc,actuar::dpareto(conc,10.5,6.5),col="#1F1CF2") - -conc<-seq(0,10,by=0.005) -plot(conc,actuar::ppareto(conc,1,1),type="l",ylab="Cumulative probability",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,actuar::ppareto(conc,2,3),col="#F2A61C") -lines(conc,actuar::ppareto(conc,0.5,1),col="#1CADF2") -lines(conc,actuar::ppareto(conc,10.5,6.5),col="#1F1CF2") - +conc <- seq(0, 10, by = 0.005) +plot(conc, actuar::dpareto(conc, 1, 1), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, actuar::dpareto(conc, 2, 3), col = "#F2A61C") +lines(conc, actuar::dpareto(conc, 0.5, 1), col = "#1CADF2") +lines(conc, actuar::dpareto(conc, 10.5, 6.5), col = "#1F1CF2") + +conc <- seq(0, 10, by = 0.005) +plot(conc, actuar::ppareto(conc, 1, 1), type = "l", ylab = "Cumulative probability", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, actuar::ppareto(conc, 2, 3), col = "#F2A61C") +lines(conc, actuar::ppareto(conc, 0.5, 1), col = "#1CADF2") +lines(conc, actuar::ppareto(conc, 10.5, 6.5), col = "#1F1CF2") ```

Sample European inverse Pareto probability density and cumulative distribution functions

```{r echo=FALSE,fig.align='center',fig.width=7,fig.height=5} - -conc<-seq(0,10,by=0.001) -plot(conc,actuar::dinvpareto(conc,1,1),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,0.8)) -lines(conc,actuar::dinvpareto(conc,1,3),col="#F2A61C") -lines(conc,actuar::dinvpareto(conc,10,0.1),col="#1CADF2") -lines(conc,actuar::dinvpareto(conc,2.045,0.98),col="#1F1CF2") - -conc<-seq(0,10,by=0.001) -plot(conc,actuar::pinvpareto(conc,1,1),type="l",ylab="Probability density",xlab="Concentration",col="#FF5733",ylim=c(0,1)) -lines(conc,actuar::pinvpareto(conc,1,3),col="#F2A61C") -lines(conc,actuar::pinvpareto(conc,10,0.1),col="#1CADF2") -lines(conc,actuar::pinvpareto(conc,2.045,0.98),col="#1F1CF2") +conc <- seq(0, 10, by = 0.001) +plot(conc, actuar::dinvpareto(conc, 1, 1), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 0.8)) +lines(conc, actuar::dinvpareto(conc, 1, 3), col = "#F2A61C") +lines(conc, actuar::dinvpareto(conc, 10, 0.1), col = "#1CADF2") +lines(conc, actuar::dinvpareto(conc, 2.045, 0.98), col = "#1F1CF2") + +conc <- seq(0, 10, by = 0.001) +plot(conc, actuar::pinvpareto(conc, 1, 1), type = "l", ylab = "Probability density", xlab = "Concentration", col = "#FF5733", ylim = c(0, 1)) +lines(conc, actuar::pinvpareto(conc, 1, 3), col = "#F2A61C") +lines(conc, actuar::pinvpareto(conc, 10, 0.1), col = "#1CADF2") +lines(conc, actuar::pinvpareto(conc, 2.045, 0.98), col = "#1F1CF2") ``` diff --git a/vignettes/faqs.Rmd b/vignettes/faqs.Rmd index 96830d5de..0f7769e50 100644 --- a/vignettes/faqs.Rmd +++ b/vignettes/faqs.Rmd @@ -25,7 +25,7 @@ knitr::opts_chunk$set( ## How can I plot the model averaged fit with individual fits? -```{r, fig.width = 5, fig.height = 5} +```{r, fig.width = 6, fig.height = 4} library(ssdtools) dist <- ssd_fit_dists(ssddata::ccme_boron) @@ -53,14 +53,24 @@ boron_preds <- nest(ccme_boron, data = c(Chemical, Species, Conc, Units)) %>% ``` The resultant data and predictions can then be plotted as follows. -```{r, fig.width = 5, fig.height = 5} +```{r, fig.width = 6, fig.height = 4} ssd_plot(ccme_boron, boron_preds, xlab = "Concentration (mg/L)", ci = FALSE) + facet_wrap(~Group) ``` +## How do I allow mathematical expressions in the xlabel when using `ssd_plot()`? + + +```{r, fig.width = 6, fig.height = 4} +library(ggplot2) +library(latex2exp) + +ssd_plot(ssddata::ccme_boron, ssdtools::boron_pred, label = "Species", shape = "Group") + + scale_x_continuous(TeX("Boron $(\\mu g$/L)$"), breaks = c(1, 10, 100, 1000, 10000)) +``` +
```{r, results = "asis", echo = FALSE} cat(ssd_licensing_md()) ``` - diff --git a/vignettes/images/all_sims_bias.png b/vignettes/images/all_sims_bias.png new file mode 100644 index 000000000..b769111b9 Binary files /dev/null and b/vignettes/images/all_sims_bias.png differ diff --git a/vignettes/images/fitted_dists.png b/vignettes/images/fitted_dists.png new file mode 100644 index 000000000..15aa09af0 Binary files /dev/null and b/vignettes/images/fitted_dists.png differ diff --git a/vignettes/images/original_recommendations.png b/vignettes/images/original_recommendations.png new file mode 100644 index 000000000..448f61f0d Binary files /dev/null and b/vignettes/images/original_recommendations.png differ diff --git a/vignettes/images/scrap/fitted_dists.png b/vignettes/images/scrap/fitted_dists.png new file mode 100644 index 000000000..0d9cf84ac Binary files /dev/null and b/vignettes/images/scrap/fitted_dists.png differ diff --git a/vignettes/images/scrap/ssdata_sims_collated.png b/vignettes/images/scrap/ssdata_sims_collated.png new file mode 100644 index 000000000..bb5178c1b Binary files /dev/null and b/vignettes/images/scrap/ssdata_sims_collated.png differ diff --git a/vignettes/images/ssdata_sims_collated.png b/vignettes/images/ssdata_sims_collated.png new file mode 100644 index 000000000..ca7b16a69 Binary files /dev/null and b/vignettes/images/ssdata_sims_collated.png differ diff --git a/vignettes/images/weights_collated.png b/vignettes/images/weights_collated.png new file mode 100644 index 000000000..26b944e19 Binary files /dev/null and b/vignettes/images/weights_collated.png differ diff --git a/vignettes/model-averaging.Rmd b/vignettes/model-averaging.Rmd index dd95903e9..bd050a3f9 100644 --- a/vignettes/model-averaging.Rmd +++ b/vignettes/model-averaging.Rmd @@ -102,39 +102,35 @@ The *weighted average* acknowledges that the elements in the computation are ```{r echo=FALSE,warning=FALSE, message=FALSE,class.output="scroll-100"} -samp<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) - print(samp) +samp <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +print(samp) # knitr::kable(samp,caption="Some toxicity data (concentrations)") ``` Now, suppose we have only two possibilities for fitting an SSD - both lognormal distributions. Model 1 is the LN(-1.067,0.414) distribution while Model 2 is the LN(-0.387,0.617) distribution. A plot of the empirical *cdf* and Models 1 and 2 is shown below. ```{r echo=FALSE,fig.cap="Emprirical cdf (black); Model 1(green); and Model 2 (blue)", fig.width=7,fig.height=4.5} -samp<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) -samp<-sort(samp) -plot(ecdf(samp),main="Empirical and fitted SSDs",xlab="Concentration",ylab="Probability") -xx<-seq(0.01,3,by=0.01) -lines(xx,plnorm(xx,meanlog=mean(log(samp[1:10])),sd=sd(log(samp[1:10]))),col= "#77d408" ) -lines(xx,plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15]))),col="#08afd4") -#lines(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15])))+ +samp <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +samp <- sort(samp) +plot(ecdf(samp), main = "Empirical and fitted SSDs", xlab = "Concentration", ylab = "Probability") +xx <- seq(0.01, 3, by = 0.01) +lines(xx, plnorm(xx, meanlog = mean(log(samp[1:10])), sd = sd(log(samp[1:10]))), col = "#77d408") +lines(xx, plnorm(xx, meanlog = mean(log(samp[5:15])), sd = sd(log(samp[5:15]))), col = "#08afd4") +# lines(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15])))+ # 0.5581*plnorm(xx,meanlog=mean(log(samp[1:10])),sd=sd(log(samp[1:10])))) ,col="#d40830") - - ```
We see that Model 1 fits well in the lower, left region and poorly in the upper region, while the reverse is true for Model 2. So using *either* Model 1 **or** Model 2 is going to result in a poor fit overall. However, the obvious thing to do is to **combine** both models. We could just try using 50% of Model 1 and 50% of Model 2, but that may be sub-optimal. It turns out that the best fit is obtained by using 44% of Model 1 and 56% of Model 2. Redrawing the plot and adding the *weighted average* of Models 1 and 2 is shown below. ```{r echo=FALSE,fig.cap="Empirical cdf (black); Model 1(green); Model 2 (blue); and averaged Model (red)",fig.width=7,fig.height=4.5} -samp<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) -samp<-sort(samp) -plot(ecdf(samp),main="Empirical and fitted SSDs",xlab="Concentration",ylab="Probability") -xx<-seq(0.01,3,by=0.01) -lines(xx,plnorm(xx,meanlog=mean(log(samp[1:10])),sd=sd(log(samp[1:10]))),col= "#77d408" ) -lines(xx,plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15]))),col="#08afd4") -lines(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15])))+ - 0.5581*plnorm(xx,meanlog=mean(log(samp[1:10])),sd=sd(log(samp[1:10])))) ,col="#d40830") - - +samp <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +samp <- sort(samp) +plot(ecdf(samp), main = "Empirical and fitted SSDs", xlab = "Concentration", ylab = "Probability") +xx <- seq(0.01, 3, by = 0.01) +lines(xx, plnorm(xx, meanlog = mean(log(samp[1:10])), sd = sd(log(samp[1:10]))), col = "#77d408") +lines(xx, plnorm(xx, meanlog = mean(log(samp[5:15])), sd = sd(log(samp[5:15]))), col = "#08afd4") +lines(xx, (0.4419 * plnorm(xx, meanlog = mean(log(samp[5:15])), sd = sd(log(samp[5:15]))) + + 0.5581 * plnorm(xx, meanlog = mean(log(samp[1:10])), sd = sd(log(samp[1:10])))), col = "#d40830") ```
Clearly the strategy has worked - we now have an excellent fitting SSD.What about estimation of an *HC20*? @@ -142,28 +138,29 @@ lines(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15]))) ```{r, echo=TRUE} # Model 1 HC20 -cat("Model 1 HC20 =",qlnorm(0.2,-1.067,0.414)) +cat("Model 1 HC20 =", qlnorm(0.2, -1.067, 0.414)) # Model 2 HC20 -cat("Model 2 HC20 =",qlnorm(0.2,-0.387,0.617)) +cat("Model 2 HC20 =", qlnorm(0.2, -0.387, 0.617)) ``` What about the averaged distribution? An intuitively appealing approach would be to apply the same weights to the individual *HC20* values as was applied to the respective models. That is `0.44*0.2428209 + 0.56*0.4040243 = 0.33`. So our model-averaged *HC20* estimate is 0.33. As a check, we can determine the *fraction affected* at concentration = 0.33 - it should of course be 20%. Let's take a look at the plot. ```{r echo=FALSE,fig.width=7,fig.height=5} -samp<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) -samp<-sort(samp) -xx<-seq(0.01,3,by=0.01) - - -plot(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15])))+ - 0.5581*plnorm(xx,meanlog=mean(log(samp[1:10])),sd=sd(log(samp[1:10])))) , - col="#d40830",type="l",xlab="Concentration",ylab="Probability") -segments(0.33,-1,0.33,0.292,col="blue",lty=21) -segments(-1,0.292,0.33,0.292,col="blue",lty=21) -mtext("0.3",side=2,at=0.3,cex=0.8,col="blue") -mtext("0.33",side=1,at=0.33,cex=0.8,col="blue") +samp <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +samp <- sort(samp) +xx <- seq(0.01, 3, by = 0.01) + + +plot(xx, (0.4419 * plnorm(xx, meanlog = mean(log(samp[5:15])), sd = sd(log(samp[5:15]))) + + 0.5581 * plnorm(xx, meanlog = mean(log(samp[1:10])), sd = sd(log(samp[1:10])))), +col = "#d40830", type = "l", xlab = "Concentration", ylab = "Probability" +) +segments(0.33, -1, 0.33, 0.292, col = "blue", lty = 21) +segments(-1, 0.292, 0.33, 0.292, col = "blue", lty = 21) +mtext("0.3", side = 2, at = 0.3, cex = 0.8, col = "blue") +mtext("0.33", side = 1, at = 0.33, cex = 0.8, col = "blue") ``` Something's wrong - the fraction affected at concentration 0.33 is 30% - **not the required 20%**. This issue is taken up in the next section @@ -193,26 +190,26 @@ If you need a visual demonstration, we can plot $G\left( x \right)$ and the *inv ```{r echo=FALSE, fig.width=8,fig.height=6} -t<-seq(0.01,0.99,by=0.001) +t <- seq(0.01, 0.99, by = 0.001) - -F<-0.4419*qlnorm(t,-1.067,0.414) + 0.5581*qlnorm(t,-0.387,0.617) -plot(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15])))+ - 0.5581*plnorm(xx,meanlog=mean(log(samp[1:10])),sd=sd(log(samp[1:10])))) , - col="#d40830",type="l",xlab="Concentration",ylab="Probability") +F <- 0.4419 * qlnorm(t, -1.067, 0.414) + 0.5581 * qlnorm(t, -0.387, 0.617) -lines(F,t,col="#51c157",lwd=1.75) +plot(xx, (0.4419 * plnorm(xx, meanlog = mean(log(samp[5:15])), sd = sd(log(samp[5:15]))) + + 0.5581 * plnorm(xx, meanlog = mean(log(samp[1:10])), sd = sd(log(samp[1:10])))), +col = "#d40830", type = "l", xlab = "Concentration", ylab = "Probability" +) -segments(-1,0.2,0.34,0.2,col="black",lty=21,lwd=2) -segments(0.28,0.2,0.28,-1,col="red",lty=21,lwd=2) -segments(0.34,0.2,0.34,-1,col="#51c157",lty=21,lwd=2) -segments(1.12,-1,1.12,0.9,col="grey",lty=21,lwd=1.7) +lines(F, t, col = "#51c157", lwd = 1.75) -text(0.25,0.6,"Correct MA-SSD",col="red",cex=0.75) -text(0.75,0.4,"Erroneous MA-SSD",col="#51c157",cex=0.75) -mtext("1.12",side=1,at=1.12,cex=0.8,col="grey") +segments(-1, 0.2, 0.34, 0.2, col = "black", lty = 21, lwd = 2) +segments(0.28, 0.2, 0.28, -1, col = "red", lty = 21, lwd = 2) +segments(0.34, 0.2, 0.34, -1, col = "#51c157", lty = 21, lwd = 2) +segments(1.12, -1, 1.12, 0.9, col = "grey", lty = 21, lwd = 1.7) +text(0.25, 0.6, "Correct MA-SSD", col = "red", cex = 0.75) +text(0.75, 0.4, "Erroneous MA-SSD", col = "#51c157", cex = 0.75) +mtext("1.12", side = 1, at = 1.12, cex = 0.8, col = "grey") ``` Clearly, the two functions are **not** the same and thus *HCx* values derived from each will nearly always be different (as indicated by the positions of the vertical red and green dashed lines in the Figure above corresponding to the 2 values of the *HC20*). (Note: The two curves do cross over at a concentration of about 1.12 corresponding to the 90^th^ percentile, but in the region of ecotoxicological interest, there is no such cross-over and so the two approaches will **always** yield different *HCx* values with this difference → 0 as x → 0).

WE next discuss the use of a model-averaged SSD to obtain the *correct* model-averaged *HCx*. @@ -260,27 +257,26 @@ This is a little more complex, although we'll try to provide a non-mathematical

This time, we'll look at fitting a gamma, lognormal, and pareto distribution to our sample data: ```{r echo=FALSE,warning=FALSE, results="markup",message=FALSE,class.output="scroll-100"} -samp<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) - print(samp) +samp <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +print(samp) # knitr::kable(samp,caption="Some toxicity data (concentrations)") ```
The adequacy (or otherwise) of a fitted model can be assessed using a variety of numerical measures known as **goodness-of-fit** or GoF statistics. These are invariably based on a measure of discrepancy between the emprical data and the hypothesized model. Common GoF statistics used to test whether the hypothesis of some specified theoretical probability distribution is plausible for a given data set include: *Kolmogorov-Smirnov test; Anderson-Darling test; Shapiro-Wilk test;and Cramer-von Mises test*. [The Cramer-von Mises](https://en.wikipedia.org/wiki/Cram%C3%A9r%E2%80%93von_Mises_criterion) test is a good choice and is readily performed using the `cvm.test()` function in the `goftest` package in `R` as follows: ```{r, echo=TRUE,results='hide',warning=FALSE,message=FALSE} -dat<-data.frame(Conc=c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59)) +dat <- data.frame(Conc = c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59)) library(goftest) -library(EnvStats) # this is required for the Pareto cdf (ppareto) +library(EnvStats) # this is required for the Pareto cdf (ppareto) # Examine the fit for the gamma distribution (NB: parameters estimated from the data) -cvm.test(dat$Conc,null = "pgamma",shape = 2.0591977,scale = 0.3231032,estimated = TRUE) +cvm.test(dat$Conc, null = "pgamma", shape = 2.0591977, scale = 0.3231032, estimated = TRUE) # Examine the fit for the lognormal distribution (NB: parameters estimated from the data) -cvm.test(dat$Conc,null = "plnorm",meanlog=-0.6695120,sd=0.7199573,estimated = TRUE) +cvm.test(dat$Conc, null = "plnorm", meanlog = -0.6695120, sd = 0.7199573, estimated = TRUE) # Examine the fit for the Pareto distribution (NB: parameters estimated from the data) -cvm.test(dat$Conc,null = "ppareto",location = 0.1800000,shape = 0.9566756,estimated = TRUE) - +cvm.test(dat$Conc, null = "ppareto", location = 0.1800000, shape = 0.9566756, estimated = TRUE) ``` ``` @@ -319,17 +315,15 @@ From this output and using a level of significance of $p = 0.05$, we see that no ```{r echo=FALSE,fig.cap="Emprirical cdf (black); lognormal (green); gamma (blue); and Pareeto (red)", fig.width=7,fig.height=4.5} library(EnvStats) -samp<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) -samp<-sort(samp) -plot(ecdf(samp),main="Empirical and fitted SSDs",xlab="Concentration",ylab="Probability") -xx<-seq(0.01,3,by=0.01) -lines(xx,plnorm(xx,meanlog=-0.6695120,sd=0.7199573),col= "#77d408" ) -lines(xx,pgamma(xx,shape = 2.0591977,scale = 0.3231032),col="#08afd4") -lines(xx,ppareto(xx, location = 0.1800000,shape = 0.9566756),col="red") -#lines(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15])))+ +samp <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +samp <- sort(samp) +plot(ecdf(samp), main = "Empirical and fitted SSDs", xlab = "Concentration", ylab = "Probability") +xx <- seq(0.01, 3, by = 0.01) +lines(xx, plnorm(xx, meanlog = -0.6695120, sd = 0.7199573), col = "#77d408") +lines(xx, pgamma(xx, shape = 2.0591977, scale = 0.3231032), col = "#08afd4") +lines(xx, ppareto(xx, location = 0.1800000, shape = 0.9566756), col = "red") +# lines(xx,(0.4419*plnorm(xx,meanlog=mean(log(samp[5:15])),sd=sd(log(samp[5:15])))+ # 0.5581*plnorm(xx,meanlog=mean(log(samp[1:10])),sd=sd(log(samp[1:10])))) ,col="#d40830") - - ```

@@ -348,27 +342,27 @@ where $k$ is the number of model parameters and $\ell$ is the *likelihood* for t ```{r, echo=TRUE} -sum(log(dgamma(dat$Conc,shape = 2.0591977,scale = 0.3231032))) -sum(log(dlnorm(dat$Conc, meanlog = -0.6695120,sdlog = 0.7199573))) -sum(log(EnvStats::dpareto(dat$Conc,location = 0.1800000, shape=0.9566756))) +sum(log(dgamma(dat$Conc, shape = 2.0591977, scale = 0.3231032))) +sum(log(dlnorm(dat$Conc, meanlog = -0.6695120, sdlog = 0.7199573))) +sum(log(EnvStats::dpareto(dat$Conc, location = 0.1800000, shape = 0.9566756))) ``` From which the *AIC* values readily follow: ```{r echo=FALSE,results='markup'} -dat<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) -k<-2 # number of parameters for each of the distributions +dat <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +k <- 2 # number of parameters for each of the distributions # Gamma distribution -aic1<-2*k-2*sum(log(dgamma(dat,shape = 2.0591977,scale = 0.3231032))) -cat("AIC for gamma distribution =",aic1,"\n") +aic1 <- 2 * k - 2 * sum(log(dgamma(dat, shape = 2.0591977, scale = 0.3231032))) +cat("AIC for gamma distribution =", aic1, "\n") # lognormal distribution -aic2<-2*k-2*sum(log(dlnorm(dat, meanlog = -0.6695120,sdlog = 0.7199573))) -cat("AIC for lognormal distribution =",aic2,"\n") +aic2 <- 2 * k - 2 * sum(log(dlnorm(dat, meanlog = -0.6695120, sdlog = 0.7199573))) +cat("AIC for lognormal distribution =", aic2, "\n") # Pareto distribution -aic3<-2*k-2*sum(log(EnvStats::dpareto(dat,location = 0.1800000, shape=0.9566756))) -cat("AIC for Pareto distribution =",aic3,"\n") +aic3 <- 2 * k - 2 * sum(log(EnvStats::dpareto(dat, location = 0.1800000, shape = 0.9566756))) +cat("AIC for Pareto distribution =", aic3, "\n") ```

@@ -391,25 +385,27 @@ where $AI{C_0}$ is the *AIC* for the **best-fitting** model (i.e.$AI{C_0} = \mat ```{r echo=TRUE,results='hide'} -dat<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) -aic<-NULL -k<-2 # number of parameters for each of the distributions +dat <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +aic <- NULL +k <- 2 # number of parameters for each of the distributions -aic[1]<-2*k-2*sum(log(dgamma(dat,shape = 2.0591977,scale = 0.3231032))) # Gamma distribution +aic[1] <- 2 * k - 2 * sum(log(dgamma(dat, shape = 2.0591977, scale = 0.3231032))) # Gamma distribution -aic[2]<-2*k-2*sum(log(dlnorm(dat, meanlog = -0.6695120,sdlog = 0.7199573))) # lognormal distribution +aic[2] <- 2 * k - 2 * sum(log(dlnorm(dat, meanlog = -0.6695120, sdlog = 0.7199573))) # lognormal distribution -aic[3]<-2*k-2*sum(log(EnvStats::dpareto(dat,location = 0.1800000, shape=0.9566756))) # Pareto distribution +aic[3] <- 2 * k - 2 * sum(log(EnvStats::dpareto(dat, location = 0.1800000, shape = 0.9566756))) # Pareto distribution -delta<-aic-min(aic) # compute the delta values +delta <- aic - min(aic) # compute the delta values -aic.w<-exp(-0.5*delta); aic.w<-round(aic.w/sum(aic.w),4) - -cat(" AIC weight for gamma distribution =",aic.w[1],"\n", - "AIC weight for lognormal distribution =",aic.w[2],"\n", - "AIC weight for pareto distribution =",aic.w[3],"\n") +aic.w <- exp(-0.5 * delta) +aic.w <- round(aic.w / sum(aic.w), 4) +cat( + " AIC weight for gamma distribution =", aic.w[1], "\n", + "AIC weight for lognormal distribution =", aic.w[2], "\n", + "AIC weight for pareto distribution =", aic.w[3], "\n" +) ``` ``` AIC weight for gamma distribution = 0.1191 @@ -421,18 +417,17 @@ cat(" AIC weight for gamma distribution =",aic.w[1],"\n", Finally, let's look at the fitted *model-averaged SSD*: ```{r echo=FALSE,fig.cap="Empirical cdf (black) and model-averaged fit (magenta)",fig.width=8,fig.height=5} -samp<-c(1.73,0.57,0.33,0.28,0.3,0.29,2.15,0.8,0.76,0.54,0.42,0.83,0.21,0.18,0.59) -samp<-sort(samp) -plot(ecdf(samp),main="Empirical and fitted SSDs",xlab="Concentration",ylab="Probability") -xx<-seq(0.01,3,by=0.005) - -lines(xx,plnorm(xx,meanlog=-0.6695120,sd=0.7199573),col= "#959495",lty=2 ) -lines(xx,pgamma(xx,shape = 2.0591977,scale = 0.3231032),col="#959495",lty=3) -lines(xx,ppareto(xx, location = 0.1800000,shape = 0.9566756),col="#959495",lty=4) -lines(xx,0.1191*pgamma(xx,shape = 2.0591977,scale = 0.3231032) + - 0.3985*plnorm(xx,meanlog=-0.6695120,sd=0.7199573) + - 0.4824*ppareto(xx, location = 0.1800000,shape= 0.9566756),col="#FF33D5",lwd=1.5) - +samp <- c(1.73, 0.57, 0.33, 0.28, 0.3, 0.29, 2.15, 0.8, 0.76, 0.54, 0.42, 0.83, 0.21, 0.18, 0.59) +samp <- sort(samp) +plot(ecdf(samp), main = "Empirical and fitted SSDs", xlab = "Concentration", ylab = "Probability") +xx <- seq(0.01, 3, by = 0.005) + +lines(xx, plnorm(xx, meanlog = -0.6695120, sd = 0.7199573), col = "#959495", lty = 2) +lines(xx, pgamma(xx, shape = 2.0591977, scale = 0.3231032), col = "#959495", lty = 3) +lines(xx, ppareto(xx, location = 0.1800000, shape = 0.9566756), col = "#959495", lty = 4) +lines(xx, 0.1191 * pgamma(xx, shape = 2.0591977, scale = 0.3231032) + + 0.3985 * plnorm(xx, meanlog = -0.6695120, sd = 0.7199573) + + 0.4824 * ppareto(xx, location = 0.1800000, shape = 0.9566756), col = "#FF33D5", lwd = 1.5) ``` As can be seen from the figure above, the model-averaged fit provides a very good fit to the empirical data. diff --git a/vignettes/references.bib b/vignettes/references.bib index 203d3bbbe..2daacddbd 100644 --- a/vignettes/references.bib +++ b/vignettes/references.bib @@ -207,6 +207,15 @@ @techreport{fox_methodologies_2021 url={https://environmetrics.net/docs/FOX%20and%20FISHER%20Final_final_report_rev2.3.pdf?189db0&189db0} } +@techreport{fox_methodologies_2024, + title = {Final Report of the Joint Investigation into SSD Modelling and ssdtools Implementation for the Derivation of Toxicant Guidelines Values in Australia and New Zealand}, + institution = {Environmetrics Australia and Australian Institute of Marine Science}, + author = {Fox, David R and Fisher, Rebecca and Thorley, and Joseph L}, + month = apr, + year = {2024}, + url={https://doi.org/10.25845/xtvt-yc51} +} + @article{newman_2000, title = {Applying {species-sensitivity distributions} in {ecological} {risk assessment}: Assumptions of @@ -267,4 +276,57 @@ @article{fisher2019 type = {Journal Article} } +@Book{anzg, + author = {{ANZG}}, + publisher = {Australian and New Zealand Governments and Australian State and + Territory Governments}, + title = {Australian and New Zealand Guidelines for Fresh and Marine Water + Quality.}, + url = {https://www.waterquality.gov.au/guidelines/anz-fresh-marine}, + year = {2018}, +} + +@article{thorleyschwarz, + author = {Thorley, Joe and Schwarz, Carl}, + title = {ssdtools: Species Sensitivity Distributions. https://CRAN.R-project.org/package=ssdtools}, + year = {2018}, + type = {Journal Article} +} + +@Book{ccme, + author = {{BC Ministry of Environment and Climate Change Strategy}}, + publisher = {Province of British Columbia, Victoria, BC, Canada}, + title = {Derivation of Water Quality Guidelines for the Protection of Aquatic Life in British Columbia. Water Quality Guideline Series, WQG‐06.}, + url = {https://www2.gov.bc.ca/assets/gov/environment/air-land-water/water/waterquality/water-quality-guidelines/derivation-protocol/bc_wqg_aquatic_life_derivation_protocol.pdf&ved=2ahUKEwip7IfF_PCFAxUxqlYBHY0YBNMQFnoECBUQAQ&usg=AOvVaw16moKPwHywW1cutwlQaMoK}, + year = {2019}, +} + +@Manual{ssddata, + title = {ssddata: Species Sensitivity Distribution Data}, + author = {Rebecca Fisher and Joe Thorley}, + year = {2021}, + note = {R package version 1.0.0}, + url = {https://CRAN.R-project.org/package=ssddata}, +} + +@Article{thorleysschwartz2018joss, + title = {ssdtools: An R Package to Fit Species Sensitivity Distributions.}, + author = {Joe Thorley and Carl Schwarz}, + journal = {Journal of Open Source Software}, + volume = {3}, + number = {31}, + year = {2018}, + url = {https://joss.theoj.org/papers/10.21105/joss.01082}, +} + +@Article{Yanagihara, + title = {Which distribution to choose for deriving a species sensitivity distribution? Implications from analysis of acute and chronic ecotoxicity data.}, + author = {Yanagihara M, Hiki K, Iwasaki Y}, + journal = {Ecotoxicology and Environmental Safety}, + volume = {15}, + year = {2024}, + url = {https://joss.theoj.org/papers/10.21105/joss.01082}, +} + + diff --git a/vignettes/small-sample-bias.pdf b/vignettes/small-sample-bias.pdf new file mode 100644 index 000000000..5cbdf7f97 Binary files /dev/null and b/vignettes/small-sample-bias.pdf differ diff --git a/vignettes/small-sample-bias.pdf.asis b/vignettes/small-sample-bias.pdf.asis new file mode 100644 index 000000000..16a48f217 --- /dev/null +++ b/vignettes/small-sample-bias.pdf.asis @@ -0,0 +1,6 @@ +%\VignetteIndexEntry{Small sample bias in estimates} +%\VignetteEngine{R.rsp::asis} +%\VignetteKeyword{PDF} +%\VignetteKeyword{HTML} +%\VignetteKeyword{vignette} +%\VignetteKeyword{package} diff --git a/vignettes/ssdtools.Rmd b/vignettes/ssdtools.Rmd index 6e02fbf4f..372296975 100644 --- a/vignettes/ssdtools.Rmd +++ b/vignettes/ssdtools.Rmd @@ -197,7 +197,7 @@ The hazard/protection concentrations can be obtained using the ssd_hc function, ```{r, cache=TRUE} set.seed(99) -boron_hc5 <- ssd_hc(fits, proportion = 0.05, ci = TRUE) +boron_hc5 <- ssd_hc(fits, proportion = 0.05, ci = TRUE) print(boron_hc5) boron_pc <- ssd_hp(fits, conc = boron_hc5$est, ci = TRUE) print(boron_pc) @@ -209,11 +209,11 @@ If the `right` argument in `ssd_fit_dists()` is different to the `left` argument Let's make some example censored data. ```{r} -example_dat <- ssddata::ccme_boron |> - dplyr::mutate(left=Conc, right=Conc) +example_dat <- ssddata::ccme_boron |> + dplyr::mutate(left = Conc, right = Conc) -left_censored_example <- example_dat -left_censored_example$left[c(3,6,8)] <- NA +left_censored_example <- example_dat +left_censored_example$left[c(3, 6, 8)] <- NA ``` There are less goodness-of-fit statistics available for @@ -225,9 +225,10 @@ However, if all the models have the same number of parameters, the `AIC` `delta` For this reason, `ssdtools` only permits the analysis of censored data using two-parameter models. We can call only the default two parameter models using `ssd_dists_bcanz(n = 2)`. ```{r, eval = TRUE} -left_censored_dists <- ssd_fit_dists(left_censored_example, - dists = ssd_dists_bcanz(n = 2), - left = "left", right = "right") +left_censored_dists <- ssd_fit_dists(left_censored_example, + dists = ssd_dists_bcanz(n = 2), + left = "left", right = "right" +) ssd_hc(left_censored_dists, average = FALSE) ssd_hc(left_censored_dists) ssd_gof(left_censored_dists) @@ -247,11 +248,12 @@ ssd_plot(left_censored_example, left_censored_pred, Note that `ssdtools` doesn't currently support right censored data: ```{r, eval = TRUE} -right_censored_example <- example_dat -right_censored_example$right[c(3,6,8)] <- NA -right_censored_dists <- try(ssd_fit_dists(right_censored_example, - dists = ssd_dists_bcanz(n = 2), - left = "left", right = "right")) +right_censored_example <- example_dat +right_censored_example$right[c(3, 6, 8)] <- NA +right_censored_dists <- try(ssd_fit_dists(right_censored_example, + dists = ssd_dists_bcanz(n = 2), + left = "left", right = "right" +)) ``` diff --git a/vignettes/ssdtools_cache/latex/__packages b/vignettes/ssdtools_cache/latex/__packages deleted file mode 100644 index 12a860fa1..000000000 --- a/vignettes/ssdtools_cache/latex/__packages +++ /dev/null @@ -1,3 +0,0 @@ -ssdtools -ggplot2 -purrr diff --git a/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.RData b/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.RData deleted file mode 100644 index 97a1784f0..000000000 Binary files a/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.RData and /dev/null differ diff --git a/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.rdb b/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.rdb deleted file mode 100644 index e69de29bb..000000000 diff --git a/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.rdx b/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.rdx deleted file mode 100644 index d8f439f6e..000000000 Binary files a/vignettes/ssdtools_cache/latex/unnamed-chunk-10_ba88be8c12a6e12a5f979cc683dacc65.rdx and /dev/null differ diff --git a/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.RData b/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.RData deleted file mode 100644 index efbf4e8e9..000000000 Binary files a/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.RData and /dev/null differ diff --git a/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.rdb b/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.rdb deleted file mode 100644 index 5fc3e735c..000000000 Binary files a/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.rdb and /dev/null differ diff --git a/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.rdx b/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.rdx deleted file mode 100644 index ea305153d..000000000 Binary files a/vignettes/ssdtools_cache/latex/unnamed-chunk-13_dca6c0c0e78cc7e4bfa449baef65133b.rdx and /dev/null differ