Function for converting densities to log quantile density functions

dens2lqd(
  dens,
  dSup,
  lqdSup = seq(0, 1, length.out = length(dSup)),
  t0 = dSup[1],
  verbose = TRUE
)

Arguments

dens

density values on dSup - must be strictly positive (otherwise will truncate) and integrate to 1

dSup

support (grid) for Density domain

lqdSup

support of length M for lqd domain - must begin at 0 and end at 1; (default: seq(0, 1, length(dSup)))

t0

value in dSup for which the cdf value c is retained, i.e. c = F(t0) (default: dSup[1])

verbose

if FALSE, repress some messages (default: TRUE)

Value

list with 'lqdSup' a grid on [0,1], 'lqd' the log quantile density on lqdSup, and 'c' the value of the cdf at t0

References

Functional Data Analysis for Density Functions by Transformation to a Hilbert space, Alexander Petersen and Hans-Georg Mueller, 2016

Examples

x <- seq(0,2,length.out =512)
y <- rep(0.5,length.out =512)
y.lqd <- dens2lqd( dens=y, dSup = x) # should equate # log(2)