dens2quantile: Function for converting Densities to Quantile Functions

Description Usage Arguments Value References See Also Examples

View source: R/dens2quantile.R

Description

Function for converting Densities to Quantile Functions

Usage

1
2
3
4
5
6
dens2quantile(
  dens,
  dSup = seq(0, 1, length.out = length(dens)),
  qSup = seq(0, 1, length.out = length(dens)),
  useSplines = TRUE
)

Arguments

dens

density on dSup

dSup

support for Density domain - max and min values mark the boundary of the support.

qSup

support for quantile domain - must begin at 0 and end at 1

useSplines

fit spline to the qd when doing the numerical integration (default: TRUE)

Value

Q quantile function on qSup

References

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

See Also

normaliseDensities

Examples

1
2
3
x <- seq(0,2,length.out =512)
y <- rep(0.5,length.out =512)
y.quantile <- dens2quantile(dens=y, dSup = x) # should equate # 2*seq(0, 1, length.out = 512)

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