dfolded: Probabilty density function of folded model.

Description Usage Arguments Details Value Author(s) References Examples

View source: R/gendist.R

Description

Computes pdf of the folded model.

Usage

1
dfolded(x, spec, arg, log = FALSE)

Arguments

x

scale or vector of values to compute the pdf.

spec

a character string specifying the parent distribution (for example, "norm" if the parent disstribution correspond to the normal).

arg

list of arguments/parameters of the parent distribution.

log

logical; if TRUE, log(pdf) are returned.

Details

The pdf of folded model has a general form of:

f(x) = g(x) + g(-x) \quad x>0

where G(x) is the cdf of parent distribution.

Value

An object of the same length as x, giving the pdf values computed at x.

Author(s)

Shaiful Anuar Abu Bakar

References

Abu Bakar, S. A., Nadarajah, S., Adzhar, Z. A. A. K., & Mohamed, I. (2016). gendist: An R package for generated probability distribution models. PloS one, 11(6).
Brazauskas, V., & Kleefeld, A. (2011). Folded and log-folded-t distributions as models for insurance loss data. Scandinavian Actuarial Journal, 2011(1), 59-74.

Examples

1
2
x=runif(10, min=0, max=1)
y=dfolded(x, spec="norm", arg=list(mean=1,sd=2) )

gendist documentation built on May 2, 2019, 3:34 p.m.