Description Usage Arguments Value Author(s) References See Also Examples
The Floating Grid Permutation Technique is a spatially restricted permutation technique. Please read the reference mentioned below and/or the vignette before using this function. fgeasy
can be used to perform single step permutation tests. This function can be used for detecting spatial autocorrelation for univariate observations (using Moran's I), pairwise observations (using a correlation coefficient) or multivariate observations for both single and pairwise sets of multivariate observations (using mean distance or relatedness).
1 2 |
xy |
Geographical locations of observations. |
group |
Group membership for the observations. |
marks |
Should be a vector containing all observations, a two-column matrix containing two paired observations or a squared matrix containing relationships or distances between all observations (such as genetic relatedness or distance). The latter can be used to perform multivariate analyses. Note that the squared matrix does not need to be symmetrical: for instance, the genetic relatedness between paired individuals can be investigated by using males as columns and females as rows. |
iter |
Number of iterations for every grid cell size. Default is 999, though it is adviseable to perform 9999 interations for the final results. |
ratio |
The ratio between the sides of the grid cells. Default is 1. |
scale.seq |
Sequence of all grid cell sizes that will be tested. The number, order and values of this sequence are completely free, as long as they are numeric. Default is 20 equaly spaced out grid cell sizes from slightly larger than 0 to the maximum distance between any two individuals. |
bootstrap |
|
pairwise |
|
correlate |
If one wants to compare two paired observations correlations between the observations can be used. The argument |
fgeasy
returns an object of class
"fg", which can be accessed with the functions summary
and plot
.
Reinder Radersma
Reinder Radersma & Ben C. Sheldon, 2015. A new permutation technique to explore and control for spatial autocorrelation. Submitted
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ## A simple univariate example
##
## Produce 49 geographical locations in a regular grid.
loc.x <- rep(1:7,7)
loc.y <- rep(1:7, each=7)
## Produce 49 observations with negative spatial autocorrelation.
marks <- c(rep(c(1,2), 24),1)+rnorm(49,0,0.1)
fg1 <- fgeasy(xy=cbind(loc.x,loc.y), marks=marks, iter=99)
summary(fg1)
plot(fg1)
## An example for two paired marks
##
## Produce 20 geographical locations.
loc.x <- 1:20
loc.y <- runif(20,0,5)
## Produce 2 x 20 phenotypes.
type1 <- 11:30+runif(20,0,5)
type2 <- 11:30+runif(20,0,5)
fg2 <- fgeasy(xy=cbind(loc.x,loc.y), marks=cbind(type1,type2), iter=99,
pairwise=TRUE, correlate="pearson")
summary(fg2)
plot(fg2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.