Description Usage Arguments Details Value Author(s) Examples
View source: R/rriskDistributions_functions.R
This function fits the amount of distribution families to given quantiles and returns diagnostics that allow user to choose a most appropriate probability.
1 2 |
p |
numerical vector giving probabilities. |
q |
numerical vector giving percentiles. |
show.output |
logical, if |
tolConv |
positive numerical value, the absolute convergence tolerance for reaching zero by fitting distributions
|
fit.weights |
numerical vector of the same length as a probabilities vector
|
Both inputs p
and q
should be of the same length. The items of
the probability vector p
should lie between 0 and 1.
Returns a list containing the data frame with the input vectors p
and q
and the results matrix giving fitted distributions, estimated
parameters and a vector of theoretical percentiles calculated based on the
estimated parameters. If the consistency check of input parameters fails
the function returns NA
.
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 | fit.results1 <- rriskFitdist.perc(show.output = FALSE)
fit.results1
fit.results2 <- rriskFitdist.perc(show.output = FALSE, tolConv = 0.6)
fit.results2
p <- c(0.2, 0.7)
q <- c(2.6, 19.1)
fit.results3 <- rriskFitdist.perc(p = p, q = q, show.output = FALSE)
fit.results3
p <- c(0.3, 0.8, 0.9)
q <- c(10, 20, 40)
fit.results4 <- rriskFitdist.perc(p = p, q = q, show.output = FALSE)
fit.results4
## Example with fitted pert distribution
p <- c(0.025, 0.5, 0.6, 0.975)
q <- mc2d::qpert(p = p, min = 0, mode = 3, max = 10, shape = 5)
fit.results5 <- rriskFitdist.perc(p = p, q = q, show.output = FALSE)
fit.results5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.