E-statistics (energy) tests and statistics for multivariate and univariate inference, including distance correlation, one-sample, two-sample, and multi-sample tests for comparing multivariate distributions, are implemented. Measuring and testing multivariate independence based on distance correlation, partial distance correlation, multivariate goodness-of-fit tests, k-groups and hierarchical clustering based on energy distance, testing for multivariate normality, distance components (disco) for non-parametric analysis of structured data, and other energy statistics/methods are implemented.
energy package for R
The energy package for R implements several methods in multivariate analysis and multivariate inference based on the energy distance, which characterizes equality of distributions.
Distance correlation (multivariate independence), disco (nonparametric extension of ANOVA), and goodness-of-fit tests are examples of some of the methods included.
energy is named based on the analogy with potential energy in physics. See the references in the manual for more details.
[]https://cran.r-project.org/package=energy)
User level changes:
Internal changes:
User level changes
Internal changes
Partial Distance Correlation statistics and tests added
updated NAMESPACE and DESCRIPTION imports, etc.
revised package Title and Description in DESCRIPTION
package now links to Rcpp
mvnorm c code ported to c++ (mvnorm.cpp); corresponding changes in Emvnorm.R
syntax for bcdcor: "distance" argument removed, now argument can optionally be a dist object
syntax for energy.hclust: first argument must now be a dist object
default number of replicates R in tests: for all tests, R now defaults to 0 or R has no default value.
In distance correlation, distance covariance functions (dcov, dcor, DCOR) and dcov.test, arguments x and y can now optionally be distance objects (result of dist function or as.dist). Matrices x and y will always be treated as data.
Functions in dcov.c and utilities.c were modified to support arguments that are distances rather than data. In utilities.c the index_distance function changed. In dcov.c there are many changes. Most importantly for the exported objects, there is now an extra required parameter in the dims argument passed from R. In dCOVtest dims must be a vector c(n, p, q, dst, R) where n is sample size, p and q are dimensions of x and y, dst is logical (TRUE if distances) and R is number of replicates. For dCOV dims must be c(n, p, q, dst).