qd2dens: Function for converting Quantile Densities to Densities

Description Usage Arguments Value References Examples

View source: R/qd2dens.R

Description

Function for converting Quantile Densities to Densities

Usage

1
2
3
4
5
6
qd2dens(
  qd,
  qdSup = seq(0, 1, length.out = length(qd)),
  dSup,
  useSplines = TRUE
)

Arguments

qd

quantile density on qdSup

qdSup

support for quantile domain - must begin at 0 and end at 1 (default = seq(0, 1, length.out = length(qd)))

dSup

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

useSplines

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

Value

dens density values on dSup

References

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

Examples

1
2
3
x <- seq(0,1,length.out =512)
y <- rep(2,length.out =512)
y.dens <- qd2dens(qd=y, qdSup = x, dSup = seq(0, 2, length.out = 512)) # should equate # 1/2

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