Description Usage Arguments Details Value Author(s) References See Also Examples

This function runs the Mantel test from the `vegan`

package for each pair of variables. In the case of 3 matrices, every combination of pairwise mantel tests is run, as well as the partial mantel test. In addition, this function utilizes MRQAP DSP from the `asnipe`

package. In the case of two matrices, it runs the regression once; with two matrices, it runs the regression three times, with every combination of pairwise tests, treating the second matrix as dependent every time. To correctly order the matrices for this purpose, please read the `x_list`

argument entry.

1 2 |

`x_list` |
A list of 2 or 3 matrices, ideally formatted by the |

`permutations` |
The number of times each matrix is permutated for the Mantel test. Default value is |

`intercept` |
Boolean for whether or not MRQAP DSP calculates the intercept in it's regression. Default is |

`directed` |
Whether or not the networks provided to the MRQAP DSP are |

`diagonal` |
Boolean for whether or not MRQAP DSP includes the repeated values across the diagonal. Default is |

`test.statistic` |
Which test statistic is calculated: |

`tol` |
Tolerance value for the matrix decomposition. Default is |

`randomisations` |
The number of times the matrices are randomized when determining the p-value. Default is |

This function relies on the `vegan`

package for the mantel and partial mantel test. The permutations argument is passed to these functions. The `asnipe`

package is necessary for the application of the MRQAP DSP test. The remaining arguments are passed to this function as parameters.

If the list provided contains two matrices, the function will return a list of length 2, with the results of the mantel test and MRQAP DSP regression. If the list contains 3 matrices, the function will return a list of length 7, with each permutation of two variables (keeping the dependent variable constant) run through the mantel test and MRQAP regression, as well as the partial mantel test result from all 3 variables.

Karthik Yarlagadda

Dekker, D., Krackhard, D., Snijders, T.A.B (2007) Sensitivity of MRQAP tests to collinearity and autocorellation conditions. Psychometrika 72(4): 563-581.

Legendre, P. and Legendre, L. (2012) Numerical Ecology. 3rd English Edition. Elsevier.

`vegan`

package in R

`asnipe`

package in R

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 <- matrix(c(0,0.0106,0.384,0.0106,0,0.002,0.384,0.002,0), nrow=3, ncol=3, byrow = TRUE)
colnames(a) <- c("Sample1","Sample2","Sample3")
b <- matrix(c(0,0.014,0.0352,0.014,0,0.0235,0.0352,0.0235,0), nrow=3, ncol=3, byrow = TRUE)
colnames(b) <- c("Sample1","Sample2","Sample3")
example.list <- list(a,b)
Example.analysis <- Analysis(example.list,permutations=5)
Example.analysis
a <- matrix(c(0,0.0106,0.384,0.0106,0,0.002,0.384,0.002,0), nrow=3, ncol=3, byrow = TRUE)
colnames(a) <- c("Sample1","Sample2","Sample3")
rownames(a) <- c("Sample1","Sample2","Sample3")
b <- matrix(c(0,0.014,0.0352,0.014,0,0.0235,0.0352,0.0235,0), nrow=3, ncol=3, byrow = TRUE)
colnames(b) <- c("Sample1","Sample2","Sample3")
rownames(b) <- c("Sample1","Sample2","Sample3")
c <- matrix(c(0,0.04,0.02,0.04,0,0.01,0.02,0.01,0), nrow=3, ncol=3, byrow = TRUE)
colnames(c) <- c("Sample1","Sample2","Sample3")
rownames(c) <- c("Sample1","Sample2","Sample3")
example.list <- list(a,b,c)
Example.analysis <- Analysis(example.list,permutations=5)
Example.analysis
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.