fitAndPlotDistribution: Fit and plot distribution functions

View source: R/fitAndPlotDistribution.R

fitAndPlotDistributionR Documentation

Fit and plot distribution functions

Description

Calls elicitation functions with inputs and plots the resulting distribution.

Usage

fitAndPlotDistribution(
  obsval_mu = NULL,
  obsval_lower = NULL,
  obsval_upper = NULL,
  refValue = NULL,
  probQuant_lower = 0.25,
  probQuant_upper = 0.75,
  type = "continuous",
  ...
)

Arguments

obsval_mu

input expected value

obsval_lower

input lower quartile

obsval_upper

input upper quartile

refValue

the reference value to be drawn in the plot

probQuant_lower

fixed parameter set to 0.25

probQuant_upper

fixed parameter set to 0.75

type

fixed parameter set to "continuous"

...

further arguments passed on to plotDistribution

Details

fitAndPlotDistribution calls estim which fits a two-parameter non-negative continuous model distribution to an expected value and lower and upper quartiles provided as input. It uses the least square criterion to find the best fit among a predetermined set of model distribution families: c("Gamma","LogNormal", "TruncNormal", "Weibull", "ZIExponential"). Thereafter the function calls plotDistribution which plot the distribution together with a reference value.

Note

In it's present form fitAndPlotDistribution only accepts expected value and lower and upper quartiles as input to obsval. It may be expanded to cover other observed parameters and more distributions.

Author(s)

Jens Åström

See Also

estim and plotDistribution


NINAnor/NIcalc documentation built on Oct. 26, 2023, 9:37 a.m.