Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dist-distCheck

Distribution Check


Description

Tests properties of an R implementation of a distribution, i.e. of all four of its “dpqr” functions.

Usage

distCheck(fun = "norm", n = 1000, robust = TRUE, subdivisions = 100, ...)

Arguments

fun

a character string denoting the name of the distribution.

n

an integer specifying the number of random variates to be generated.

robust

logical flag, should robust estimates be used? By default TRUE.

subdivisions

integer specifying the numbers of subdivisions in integration.

...

the distributional parameters.

Examples

distCheck("norm", mean = 1, sd = 1)

distCheck("lnorm", meanlog = 0.5, sdlog = 2, robust=FALSE)
## here, true E(X) = exp(mu + 1/2 sigma^2) = exp(.5 + 2) = exp(2.5) = 12.182
## and      Var(X) = exp(2*mu + sigma^2)*(exp(sigma^2) - 1) =       7954.67

fBasics

Rmetrics - Markets and Basic Statistics

v3042.89.1
GPL (>= 2)
Authors
Diethelm Wuertz [aut], Tobias Setz [cre], Yohan Chalabi [ctb] Martin Maechler [ctb]
Initial release
2017-11-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.