Description Usage Arguments Details Value Author(s) References Examples
Extract Moran's eigenvectors given a distance matrix among sampling locations of genetic material. This matrix could be Euclidean or otherwise. If truncation and/or transformation parameters are provided these operations occur. Truncation implies that distances that exceed a threshold amount are assigned to 4 * threshold. Minimum spanning tree truncation is the recommended default. Transformation performs an exponential or gaussian transformation of the distance matrix after truncation.
1 |
locD |
A symmetric distance matrix giving the distances (typically Euclidean) among the sampling locations of genetic material (i.e. of genotyped individuals). |
truncation |
See details (EXPERIMENTAL) |
transformation |
Can be character "exponential" or "gaussian" or NULL for no transformation (EXPERIMENTAL) |
If sampling locations are in longitude/latitude and are far apart, be sure to
supply the geodesic distance as locD
. (Note that mgQuick
implements
geodesic distances using the longlat=TRUE
parameter when provided with sampling coordinates)
truncation
1. Can be numeric from 0 to 1 specifying the
proportion of the maximum distance in locD to truncate
following this a minimum spanning tree is used to further
truncate as in PCNM (aka dbMEM or classical MEM)
2. Can be NULL (default) indicating only the minimum spanning tree (MST) truncation where
links that exceed the longest link in the MST (dMST) are replaced with 4 * dMST
3. Can be FALSE indicating that nothing is done to the distance matrix which is only suitable when locD is non-euclidean (i.e. will have negative eigenvectors
A list
$valuesMEM
gives the eigenvalues all Moran's eigenvectors
$vectorsMEM
gives the Moran's eigenvectors in columns
Pedro Peres-Neto (peres-neto.pedro@uqam.ca)
Paul Galpern (pgalpern@ucalgary.ca)
Legendre, P., and Legendre L. 2012. Numerical Ecology, 3rd. ed. Elsevier, Amsterdam.
1 2 3 4 5 6 7 8 | ## Prepare the radial data for analysis
radialData <- read.csv(system.file("extdata/radial.csv", package="memgene"))
radialXY <- radialData[, 1:2]
## Find Moran's eigenvectors given sampling locations
## by first finding the Euclidean distance matrix
radialEuclid <- dist(radialXY)
radialMEM <- mgMEM(radialEuclid)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.