pfolded: Cumulative distribution function of folded model.

Description Usage Arguments Details Value References Examples

View source: R/gendist.R

Description

Computes cdf of the folded model.

Usage

1
pfolded(q, spec, arg, lower.tail = TRUE, log.p = FALSE)

Arguments

q

scale or vector of values to compute the cdf.

spec

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

arg

list of arguments/parameters of the parent distribution.

lower.tail

logical; if TRUE, cdf are returned, otherwise 1-cdf.

log.p

logical; if TRUE, probabilities returned are given as log(cdf).

Details

The cdf 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 q, giving the cdf values computed at q.

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=pfolded(x, spec="norm", arg=list(mean=1,sd=2) )

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