distl2dpar: \(L^2\) distance between Gaussian densities given their parameters
Description
\(L^2\) distance between two multivariate (\(p > 1\)) or univariate (dimension: \(p = 1\)) Gaussian densities, given their parameters (mean vectors and covariance matrices if the densities are multivariate, or means and variances if univariate).
Be careful! If check = FALSE and one variance matrix is degenerated (or one variance is zero if the densities are univariate), the result returned must not be considered.
Arguments
mean1, mean2
means of the probability densities.
var1, var2
variances (\(p\) = 1) or covariance matrices (\(p\) > 1) of the probability densities.
check
logical. When TRUE (the default is FALSE) the function checks if the covariance matrices are not degenerate, before computing the inner product.
If the variables are univariate, it checks if the variances are not zero.
Author
Rachid Boumaza, Pierre Santagostini, Smail Yousfi, Gilles Hunault, Sabine Demotes-Mainard
Details
The function distl2dpar computes the distance between two densities, say \(f_1\) and \(f_2\), from the formula: