Description Arguments Details References See Also Examples
make.permSpace
computes the perms
x n matrix of ids used for
test of dependence. make.signSpace
computes the perms
x n
vector of +1 and -1 used for symmetry test.
IDs |
vector of IDs to be permuted. If |
return.permIDs |
logical. If |
N |
number of elements of the sample. It is also the dimention of the
random orthogonal matrix in |
Y |
a vector of data. It can also be a vector 1:N referring to the IDs of observations. |
perms |
number of random permutations. If it is a list, it has two
elements |
T |
the (possibly multivariate) permutation space as returned, for
example by |
obs.only |
logical. If |
tail |
Tail of the distribution being significant for H1. See also
argument |
testType |
See argument |
Strata |
See argument |
X |
A vector of length |
... |
other parameters |
rom
computes a Random Orthogonal Matrix of size n
Xn
(C-compiled function, very fast). implements the algorithm of Stewart (1980). The function is
compiled in C++. NOTE: this option is not available in the newest versions. This is now equivalent to romFast
romFast
computes a Random Orthogonal Matrix of size n
Xn
using the qr.Q
decomposition. romFast
is faster than
rom
but can be inaccurate (i.e. providing inaccurate type I error
control when used in testing), specially for very small n
(i.e.
sample size).
allpermutations
computes all permutations of a vector Y
. Is is
based on the function permutations
of the library(e1071)
.
t2p
computes the (possibily multivariate) space of p-values from the
space of test statistic.
Pesarin (2001) Multivariate Permutation Tests with Applications in Biostatistics. Wiley, New York.
Stewart, G. W. (1980). The efficient generation of random orthogonal matrices with an application to condition estimators. SIAM Journal on Numerical Analysis 17, 403-409.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #10 random elements of the orbit of a one-sample test
make.signSpace(5, 10)
#All elements of the orbit of a one-sample test (the size of the space is 2^5 < 1000)
make.signSpace(5, 1000)
## Not run:
#A random rotation matrix of size 3
(r=rom(3))
#verify that it is orthogonal:
r%*%t(r)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.