energyStats | R Documentation |
Compute difference between two multivariate samples
energyStats(
sample1 = NULL,
sample2 = NULL,
edist_method = "original",
edist_replicates = 199
)
sample1 |
Numeric. Matrix or data.frame with values sampled from a multivariate distribution. |
sample2 |
Numeric. Matrix or data.frame with a second example of values sampled from a multivariate distribution. |
edist_method |
Character. Selects the method used in a call to function eqdist.etest in the package energy. |
edist_replicates |
Numeric (integer). Number of replicates used in energy statistics calculation. Default is 199 which appears to give reliable results without significant computational cost. |
This function is a wrapper around the function eqdist.etest in the package energy designed to facilitate its orderly and robust application to testing the difference between a base sample and a second sample (typically a sub-sample) of points in a multivariate environmental space.
An object of class htest as returned by function eqdist.etest.
## Not run:
m1 <- matrix(runif(100), 10, 10)
df1 <- data.frame(m1)
m2 <- matrix(runif(100), 10, 10)
df2 <- data.frame(m2)
ans1 <- energyStats(m1, m2)
print(ans1)
ans2 <- energyStats(df1, df2)
print(ans2)
m2 <- matrix(runif(120), 10, 12)
df2 <- data.frame(m2)
ans <- energyStats(df1, df2)
print(ans)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.