Description Usage Arguments Details Value Author(s) References See Also Examples
Hellinger's squared distance is calculated for the subpopulations of an hetset
object.
1 |
H |
|
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.
The same hetset object is returned with an updated sqHell-entry in the metadata.
Daniel Samaga
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
hetset
, scan_hetset
, estimate_densities
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.