Learn R Programming

rriskDistributions (version 2.1.1)

rriskDistributions-package: Fitting distributions to given data or known quantiles

Description

This packages provides a collection of functions for estimation parameters of continuous or discrete distributions (related to the rrisk project) to given data or to known quantiles.

Arguments

Details

This package is a part of the rrisk project and contains functions for fitting distributions to given data or by known quantiles. This package does not depend on the whole rrisk project and can be used separately. The rrisk project can be downloaded from http://www.bfr.bund.de/cd/52158. The main functions fit.perc and fit.cont call a GUI that allows users to choose an appropriate distribution family to given data or to known quantiles without any knowledge of the R syntax.

Examples

Run this code
q <- stats::qweibull(p = c(0.025, 0.5, 0.975), shape = 2, scale = 3)
get.weibull.par(q = q)
q <- stats::qweibull(p = c(0.025, 0.5, 0.975), shape = 0.01, scale = 1)
get.weibull.par(q = q)

p <- c(0.025, 0.50, 0.975)
q <- c(9.68, 29.2, 50.98)
fit.results <- rriskFitdist.perc(p, q, show.output = FALSE)
plotDiagnostics.perc(fit.results)

p <- c(0.25, 0.50, 0.75)
q <- c(9.68, 29.2, 50.98)
fit.results <- rriskFitdist.perc(p, q, show.output = FALSE)
plotDiagnostics.perc(fit.results)
plotDiagnostics.perc(fit.results, tolPlot = 2)

## Not run: 
#   if( class(tcltk::tclRequire("Tktable")) == "tclObj" ) {
#     res.fitcont <- fit.cont(data2fit = rnorm(100))
#     res.fitcont
#   }
#   if( class(tcltk::tclRequire("Tktable")) == "tclObj" ) {
#     res.fitperc <- fit.perc()
#     res.fitperc
#   }
# ## End(Not run)

Run the code above in your browser using DataLab