Description Usage Arguments Details Value Note Author(s) Examples
View source: R/rriskDistributions_functions.R
This function provides a GUI for choosing a most appropriate continuous distribution for known quantiles.
1 2 |
p |
numerical vector of probabilities. |
q |
numerical vector of quantiles. |
show.output |
logical, if |
tolPlot |
single positive numerical value giving a tolerance for plotting graphical diagnostics. If the sums of the differences between the distribution percentiles and the given percentiles are smaller than this value, the distribution will be plotted. |
tolConv |
positive numerical value, the absolute convergence tolerance for reaching zero. |
fit.weights |
numerical vector of the same length as a probabilities vector
|
The argument tolPlot
defines a tolerance for plotting graphical diagnostics.
If the sums of the differences between the percentiles of the estimated distribution
and the given percentiles are smaller than this value, the distribution will be plotted.
The items of the probability vector p
should lie between 0 and 1.
Returns a named list containing a chosen distribution, its estimated parameters and the data on which the estimation is based.
This function is used for defining a Monte-Carlo random variate item
(mcrv
) in the rrisk
project.
Matthias Greiner matthias.greiner@bfr.bund.de (BfR),
Kristin Tolksdorf kristin.tolksdorf@bfr.bund.de (BfR),
Katharina Schueller schueller@stat-up.de (STAT-UP Statistical Consulting),
Natalia Belgorodski belgorodski@stat-up.de (STAT-UP Statistical Consulting)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ## Not run:
chosenDistr1 <- fit.perc()
chosenDistr1
chosenDistr2 <- fit.perc(tolPlot = 5)
chosenDistr2
chosenDistr3 <- fit.perc(p = c(0.3, 0.8, 0.9), q = c(10, 20, 40))
chosenDistr3
chosenDistr4 <- fit.perc(p = c(0.3, 0.8, 0.9), q = c(10, 30, 40))
chosenDistr4
chosenDistr5 <- fit.perc(p = c(0.3, 0.8, 0.9), q = c(10, 30, 40), tolPlot = 10)
chosenDistr5
## Fitting a PERT distribution
p <- c(0.025, 0.5, 0.6, 0.975)
q <- round(mc2d::qpert(p = p, min = 0, mode = 3, max = 10, shape = 5), digits = 2)
chosenDistr6 <- fit.perc(p = p, q = q, tolPlot = 10)
chosenDistr6
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.