Description Usage Arguments Details Value References Examples
View source: R/multivariance-functions.R
The distribution of the test statistic under the hypothesis of independence is required for the independence tests. This function generates approximate samples of this distribution either by sampling without replacement (permutations) or by sampling with replacement (bootstrap).
1 2 3 4 5 6 7 8 | resample.multivariance(
x,
vec = 1:ncol(x),
times = 300,
type = "multi",
resample.type = "permutation",
...
)
|
x |
matrix, the rows should be iid samples |
vec |
vector, which indicates which columns of |
times |
integer, number of samples to generate |
type |
one of |
resample.type |
one of |
... |
is passed to |
The resampling is done by sampling from the original data either without replacement ("permutation"
) or with replacement ("bootstrap"
). Using resampling without replacement is (much) faster (due to special identities which only hold in this case).
For convenience also the actual (total /m-) multivariance is computed and its p-value.
A list with elements
resampled
the (total/m-)multivariances of the resampled data,
original
the (total/m-)multivariance of the original data,
p.value
the p-value of the original data, computed using the resampled data
For the theoretic background see the reference [3] given on the main help page of this package: multivariance-package.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.