DTD: An example dataset for distributional data analysis

DTDR Documentation

An example dataset for distributional data analysis

Description

This is a simulated dataset, which can be used to try different tools for distributional data analysis. The idea is that there is a set of samples 'sample' from three regions, each containing many particles. From each particle we have observed a size parameter 'size' (volume equivalent diameter), a density 'density', and a shape parameter 'shape'

Usage

DTD

Format

A data frame with 20 rows (material samples) and 9 columns. Several columns hold one *function* per row (the particle PDFs / CDFs), and data holds one nested data frame per row:

sample

The id of the material sample

region

The region the sample comes from.

d50

A measured median particle size of the sample

shapePDF

Particle shape distribution in sample, provide as a probability density function. Shape is measured by a measure for sphericity.

shapeCDF

Particle shape distribution in sample, provided as Cummulative distribution.

sizePDF

Particle size distribution in the sample (diameter), provide as probability density function. Size is measured by equivalent diameter. The sieving diameter relevant for d50 is slightly different.

sizeCDF

Particle size distribution in the sample provided as cummulative distribution function (cdf).

rhoCDF

Particle mass density distribution provided as cummulative distribution function (CDF). Particle density does not have probability density, because liberated particles containing only one mineral all can only have very specific densities (e.g. Quarz 2.25 kg/l and Magnetit at 5.2 kg/l)

data

data.frames containing samples of the particles in each material sample. It has four columns: sample (the id of the sample), size (equivalent diameter of the particle), shape (sphericity), and density (mass density) of the particle.

Source

Simulated data, not based on real measurements. Generated by data-raw/DTD.R with set.seed(47) (N = 20 samples drawn from three regions A/B/C). Shipped as data/DTD.rda; see data-raw/DTD.R to regenerate.

Examples

data("DTD")
DTD
boxplot(DTD$d50)
# Looking at the size variable
plotFuncs(DTD$sizePDF)
plotFuncs(\(x)(dlnorm(x,meanlog=-0.2,sdlog=0.5)),add=TRUE,col="red",lwd=3)
RMForSize = ReferenceMeasureTransformed("plnorm",meanlog=-0.2,sdlog=0.5)
B2ForSize  = BayesSpace(RMForSize)
BasisForSize = BayesSpaceBasis(B2ForSize,nbasis=6)

sizePDFs = BDataPDFs(DTD$sizePDF,basis=BasisForSize)
plot(sizePDFs)
sizeDensities = as.BDataDensities(sizePDFs)
plot(sizeDensities)
sizeSplines   = as.BDataSplines(sizeDensities)
#plot(sizeSplines,add=TRUE,col="blue")
DTD$data[[1]]
summary(DTD$data[[1]])

DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.