calculate_dist: Calculate Hellinger's Squared Distance

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Hellinger's squared distance is calculated for the subpopulations of an hetset object.

Usage

1

Arguments

H

hetset object with metadata about parameters as created by estimate_densities

Details

A hetset object is a SummarizedExperiment container with information about a two-component normal mixture model fitted to a subset of features of the first assay of the container.

Once, parameters of the component-densities are listed in the metadata (e.g. by estimate_densities or scan_hetset), Hellinger's squared distance of the two densities can be calculated with this function.

For inversion of the covariance matrix, the matlib package is used.

Value

The same hetset object is returned with an updated sqHell-entry in the metadata.

Author(s)

Daniel Samaga

References

Pardo, L. (2006). Statistical Inference Based on Divergence Measures. New York: Chapman and Hall/CRC. page 51.

Michael Friendly, John Fox and Phil Chalmers (2018). matlib: Matrix Functions for Teaching and Learning Linear Algebra and Multivariate Statistics. R package version 0.9.1. https://CRAN.R-project.org/package=matlib

See Also

hetset, scan_hetset, estimate_densities

Examples

1
2
3
4
5
6
7
8
9
A <- matrix(data = rnorm(n = 2000,mean = 1,sd = 1),ncol = 20)
B <- matrix(data = rnorm(n = 2000,mean = 5,sd = 1),ncol = 20)
Hds <- hetset(D = cbind(A,B))
rm(A,B)
Hds$prt <- as.factor(sample(c("A","B"),ncol(Hds),TRUE))
Hds@metadata$slf <- c("F5","F15")
Hds <- estimate_densities(Hds)
Hds <- calculate_dist(Hds)
print(Hds@metadata$sqHell)

ZytoHMGU/hetset documentation built on June 6, 2019, 2:16 p.m.