Learn R Programming

fdadensity (version 0.1.4)

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

Description

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

Usage

DeregulariseByAlpha(x, y, alpha = 0)

Value

dens density values on x

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.

See Also

RegulariseByAlpha

Examples

Run this code

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

Run the code above in your browser using DataLab