Description Usage Arguments Details Value Author(s) See Also Examples
spatial.perm()
takes a list of scans (arrays), randomly permute
the scan labels of each voxel while keeping the spatial information
intact. This function is used in rep.test()
. flip()
is
a shortcut for pre/post analysis. diff.permed <- flip(pre - post)
is
equivalent to XY <- spatial.perm(pre, post); diff.permed <-
XY[[1]] - XY[[2]]
.
1 2 3 | spatial.perm(XYlist)
flip(diff.array)
|
XYlist |
Lists of multivariate samples to be spatially permuted. As an example, it can be a list of FA maps sampled from both groups. The elements in this list must be either R vectors or arrays. |
diff.array |
An array/vector of pre/post differences. |
Spatial permutations.
A list of N-distances using different kernels (Ndist()
) or
an K by N dimensional matrix of N-distances (Ndist.perm()
),
where each row represents one permutation and each column a kernel.
Xing Qiu
1 2 3 4 5 6 7 8 9 | ## Generate some FA maps
N.x <- 64; N.y <- 64; N.z <- 3
for (i in 1:8) assign(paste("FA",i,sep=""), array(rnorm(N.x*N.y*N.z), c(N.x,N.y,N.z)))
Xlist <- list(FA1, FA2, FA3, FA4); Ylist <- list(FA5, FA6, FA7, FA8)
diff.orig <- FA2 -FA1
diff.permed <- flip(diff.orig)
FAs.permed <- spatial.perm(c(Xlist, Ylist))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.