DeregulariseByAlpha: Function to deregularise densities to have (smaller) minimum...

Description Usage Arguments Details Value See Also Examples

View source: R/DeregulariseByAlpha.R

Description

If possible, deregularises the input density y to have minimum density value is alpha. See details.

Usage

1
DeregulariseByAlpha(x, y, alpha = 0)

Arguments

x

support of the density

y

values of the density

alpha

scalar to deregularise with (default = 0) - this will be the minimum value of the deregularised density, unless min(y) < alpha, in which case no deregularisation will be performed

Details

If min(y) <= alpha, or y is the uniform distribution, no deregularisation is performed and y is returned. If min(y)*diff(range(x)) > 1, the deregularisation is not possible and an error is thrown. Otherwise, the deregularised density in an inverse manner to RegulariseByAlpha.

Value

dens density values on x

See Also

RegulariseByAlpha

Examples

1
2
3
4
 x = seq(0,1,length.out=122)
 y = seq(0.1,1.9,length.out=122)
 z = DeregulariseByAlpha(x=x, y=y, alpha = 0)
 

fdadensity documentation built on Dec. 5, 2019, 9:07 a.m.