Learn R Programming

ssdtools (version 0.1.0)

ssd_fit_dists: Fit Distributions

Description

Fits one or more distributions to species sensitivity data.

Usage

ssd_fit_dists(
  data,
  left = "Conc",
  right = left,
  weight = NULL,
  dists = c("burrIII2", "gamma", "lnorm"),
  computable = TRUE,
  silent = FALSE
)

Arguments

data

A data frame.

left

A string of the column in data with the concentrations.

right

A string of the column in data with the right concentration values.

weight

A string of the column in data with the weightings (or NULL)

dists

A character vector of the distribution names.

computable

A flag specifying whether to only return fits with numerically computable standard errors.

silent

A flag indicating whether fits should fail silently.

Value

An object of class fitdists (a list of fitdist objects).

Details

By default the 'burrIII2', 'gamma' and 'lnorm' distributions are fitted to the data. The ssd_fit_dists function has also been tested with the 'burrIII3', 'gompertz', 'lgumbel', 'llogis', 'pareto' and 'weibull' distributions.

If weight specifies a column in the data frame with positive integers, weighted estimation occurs. However, currently only the resultant parameter estimates are available (via coef).

If the `right` argument is different to the `left` argument then the data are considered to be censored. It may be possible to use artificial censoring to improve the estimates in the extreme tails (Liu et al 2018).

References

Liu, Y., Salibi<U+00E1>n-Barrera, M., Zamar, R.H., and Zidek, J.V. 2018. Using artificial censoring to improve extreme tail quantile estimates. Journal of the Royal Statistical Society: Series C (Applied Statistics).

Examples

Run this code
# NOT RUN {
ssd_fit_dists(boron_data)
data(fluazinam, package = "fitdistrplus")
ssd_fit_dists(fluazinam, left = "left", right = "right")
# }

Run the code above in your browser using DataLab