| DistributionalDDA-package | R Documentation |
Tools for the statistical analysis of *datasets of distributions* — where each observation is a whole probability distribution rather than a single number — using **Bayes space** calculus. A Bayes space is a Hilbert space whose elements are distributions, so the usual operations (mean, variance, distance, principal component analysis, clustering) carry over to densities once a reference measure and a finite-dimensional basis are fixed.
## Getting started — the typical workflow
Choose a **reference measure** that defines the geometry of the space and matches the support of your data: [ReferenceMeasureUniform], [ReferenceMeasureTransformed] (e.g. a Gaussian support via its CDF), or [ReferenceMeasureDiscrete].
Wrap it in a **Bayes space**: [BayesSpace] (predefined: 'B2Unif01', 'B2N01').
Pick a finite-dimensional **basis**: [BayesSpaceBasis] (predefined: 'B2Unif01Basis5', 'B2Unif01Basis7', ...). The default basis uses zero-integral B-splines (ZB-splines); see [getMetricTensor] for the resulting metric.
Put your data into a **BData** container that matches its form (see below).
Analyse: [mean][mean.BDataSplines], [mvar][mvar.BData], [msd][mvar.BData], [dist][dist.BData], [scale][scale.BData], [princomp][princomp.BData] (SFPCA), and the plotting methods.
## BData representations (which container to use)
raw samples drawn from each distribution.
binned data.
densities w.r.t. the Lebesgue measure.
densities w.r.t. the reference measure.
spline coefficients — the compact representation used for computation (PCA, distances, inner products).
Convert between them with the 'as.BData*' functions (e.g. [as.BDataDensities], [as.BDataSplines]); the usual path is Samples/Histograms -> Densities -> Splines.
## Key concepts
In a Bayes space, addition of two distributions is the (closed) product of their densities, subtraction the ratio, and scalar multiplication a power transform. See [Add], [Sub], [Mul], [Div].
[clr] is the centred log-ratio transform into the L2 space; [clo] closes a density to integrate to one.
The basis carries a Gram matrix 'S' with ‘S[i,j] = <psi_i, psi_j>'; inner products in coefficient space are 'c1’ S c2'. For ZB-splines 'S' is not the identity. See [getMetricTensor].
## Datasets
[age] (age distributions of Upper Austrian communes) and [DTD] (a simulated particle dataset) are included for examples.
Maintainer: K. Gerald van den Boogaart support@boogaart.de (ORCID)
Authors:
Ivana Pavlu ivana.pavlu@upol.cz (ORCID)
Raimon Tolosana-Delgado (ORCID)
Matthias Templ (ORCID)
The package vignettes for worked examples:
vignette("DistributionalDDA") and
vignette("PCA_distributional_data").
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.