Zero bounded density using log density transform

zero.bounded.density(x, bw = "SJ", n = 1001)

Arguments

x

data, as a numeric vector

bw

The smoothing bandwidth to be used. See 'bw.nrd'

n

number of points to use in kernel density estimate. See density

Value

data frame with back-transformed log density estimate

Details

Provides a zero bounded density estimate of a parameter. Kernel Density Estimation used by the density function will cause problems at the left hand end because it will put some weight on negative values. One useful approach is to transform to logs, estimate the density using KDE, and then transform back.

References

M. P. Wand, J. S. Marron and D. Ruppert, 1991. Transformations in Density Estimation. Journal of the American Statistical Association. 86(414):343-353 http://www.jstor.org/stable/2290569