Skip to contents

Calculates proportion of species affected at specified concentration(s) 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().

Usage

ssd_hp(x, ...)

# S3 method for fitdists
ssd_hp(
  x,
  conc = 1,
  average = TRUE,
  ci = FALSE,
  level = 0.95,
  nboot = 1000,
  min_pboot = 0.95,
  multi_est = TRUE,
  ci_method = "weighted_samples",
  parametric = TRUE,
  delta = 9.21,
  samples = FALSE,
  save_to = NULL,
  control = NULL,
  ...
)

# S3 method for fitburrlioz
ssd_hp(
  x,
  conc = 1,
  ci = FALSE,
  level = 0.95,
  nboot = 1000,
  min_pboot = 0.95,
  parametric = FALSE,
  samples = FALSE,
  save_to = NULL,
  ...
)

Arguments

x

The object.

...

Unused.

conc

A numeric vector of concentrations to calculate the hazard proportions for.

average

A flag specifying whether to provide model averaged values as opposed to a value for each distribution.

ci

A flag specifying whether to estimate confidence intervals (by bootstrapping).

level

A number between 0 and 1 of the confidence level of the interval.

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.

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.

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.

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.

parametric

A flag specifying whether to perform parametric bootstrapping as opposed to non-parametrically resampling the original data with replacement.

delta

A non-negative number specifying the maximum absolute AIC difference cutoff. Distributions with an absolute AIC difference greater than delta are excluded from the calculations.

samples

A flag specfying whether to include a numeric vector of the bootstrap samples as a list column in the output.

save_to

NULL or a string specifying a directory to save where the bootstrap datasets and parameter estimates (when successfully converged) to.

control

A list of control parameters passed to stats::optim().

Value

A tibble of corresponding hazard proportions.

Methods (by class)

  • ssd_hp(fitdists): Hazard Proportions for fitdists Object

  • ssd_hp(fitburrlioz): Hazard Proportions for fitburrlioz Object

See also

Examples

fits <- ssd_fit_dists(ssddata::ccme_boron)
ssd_hp(fits, conc = 1)
#> # A tibble: 1 × 11
#>   dist     conc   est    se   lcl   ucl    wt method     nboot pboot samples  
#>   <chr>   <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>      <int> <dbl> <I<list>>
#> 1 average     1  3.90    NA    NA    NA     1 parametric     0   NaN <dbl [0]>

fit <- ssd_fit_burrlioz(ssddata::ccme_boron)
ssd_hp(fit)
#> # A tibble: 1 × 11
#>   dist       conc   est    se   lcl   ucl    wt method       nboot pboot samples
#>   <chr>     <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <chr>        <int> <dbl> <I<lis>
#> 1 invpareto     1  8.58    NA    NA    NA     1 non-paramet…     0    NA <dbl>