| diffMantel {MigConnectivity} | R Documentation |
Pairwise differences between two or more independent Mantel correlation estimates
Description
Estimates mean (and median) differences in Mantel correlations (rM), and includes measures of uncertainty (SE and CI). For those measures of uncertainty to be accurate, only apply this function to rM estimates where all data sources are independent (e.g., different species).
Usage
diffMantel(estimates, nSamples = 1e+05, alpha = 0.05, returnSamples = FALSE)
diffCorr(estimates, nSamples = 1e+05, alpha = 0.05, returnSamples = FALSE)
Arguments
estimates |
List of at least two Mantel correlation estimates, provided by either the estMC or the estMantel functions. If this is a named list (recommended), the function will use these names in labeling the differences. |
nSamples |
A positive integer, number of samples (with replacement) to draw from each pair of MC estimates (default 100000). If set to NULL, compares all Mantel correlation samples from each pair. |
alpha |
Level for confidence/credible intervals provided. |
returnSamples |
Should the function return all the sampled differences? Defaults to FALSE to reduce storage requirements. Change to TRUE to compute your own summary statistics. |
Value
diffMantel returns a list with elements:
meanDiff, medianDiffVectors with mean and medians of sampled differences for each pairwise comparison. Estimates of difference between rM values incorporating parametric uncertainty.
seDiffVector with standard errors of rM differences for each pairwise comparison, estimated from SD of sampled differences.
simpleCIMatrix of
1 - alphaconfidence intervals for rM differences, estimated asalpha/2and1 - alpha/2quantiles ofsampleCorr.bcCIMatrix of bias-corrected
1 - alphaconfidence intervals for rM differences for each pairwise comparison. Preferable tosimpleCIwhenmeanDiffis the best estimate of the rM difference.simpleCIis preferred whenmedianDiffis a better estimator. WhenmeanDiff==medianDiff, these should be identical. Estimated as thepnorm(2 * z0 + qnorm(alpha / 2))andpnorm(2 * z0 + qnorm(1 - alpha / 2))quantiles of sampled differences, where z0 is the proportion ofsampleDiff < meanDiff.sampleDiffOnly provided if
returnSamplesis TRUE. List of sampled values for each pairwise rM difference.
References
Cohen, E. B., C. S. Rushing, F. R. Moore, M. T. Hallworth, J. A. Hostetler, M. Gutierrez Ramirez, and P. P. Marra. 2019. The strength of migratory connectivity for birds en route to breeding through the Gulf of Mexico.