Description Usage Arguments Details Value See Also Examples
Function performing standard, modified, twostep and sequential test to calculate significance of relationship between weightedmean of species attributes and sample attributes.
1 2 3 4 5 6 7 8 9 10  test.MR(M, env, method = c("cor"), cor.coef = c("pearson"),
dependence = "M ~ env", perm = 499, testLR.perm = NULL,
test = "twostep", fc.test = 6, parallel = NULL, testLR.P = 0.05,
chessel = FALSE)
## S3 method for class 'testMR'
print(x, digits = max(3, getOption("digits")  3), ...)
## S3 method for class 'testMR'
coef(object, ...)

M 
An object of the class 
env 
Vector or matrix with variables. See details. 
method 
Statistical method used to analyse the relationship between M (of class 
cor.coef 
Correlation coefficient for 
dependence 
Should 
perm 
Number of permutations. 
testLR.perm 
Relevant if 
test 
Vector of character values. Which test should be conducted? Partial match of vector with 
fc.test 
Test for the fourthcorner method. 
parallel 
NULL (default) or integer number. Number of cores for parallel calculation of modified permutation test. Maximum number of cores should correspond to number of available cores on the processor. 
testLR.P 
Relevant if 
chessel 
Logical; should the Chessel's variant of the fourth corner statistic be returned? Default is 
x, object 
object of the class 
digits 
number of digits reported by 
... 
Other arguments for 
Currently implemented statistical methods are ('cor', 'lm', 'fourthcorner'
).
Argument env
can be vector or matrix with one column. Only in case of linear regression (method = 'lm'
) it is possible to use matrix with several variables, which will all be used as independent variables in the model. For ANOVA and KruskalWallis test, make sure that 'env' is factor
(warning will be returned if this is not the case, but the calculation will be conducted).
Difference between method = 'lm'
and 'aov'
is in the format of summary tables, returned by summary.wm
function. In case of 'aov', this summary is expressed in the traditional language of ANOVA rather than linear models.
Both method = 'lm'
and 'slope'
are based on linear regression and calculated by function lm
, but differ by test statistic: while 'lm' is using F value and is testing the strength of the regression (measured by r2), 'slope' is using the slope of the regression line (b). This statistic is added here for comparison with the fourth corner method. While r2 (and r) is influenced by the issue of compositional autocorrelation, slope of regression is not.
Specific issue related to weighted mean is the case of missing species attributes. In current implementation, species with missing species attributes are removed from sample x species matrix prior to permutation of species attributes among species.
Function wm
returns list of the class "wm"
(with print
and summary
methods), which contains the following items:
real.summaries
summary of the method
coefs
model coefficients
stat
test statistic
orig.P
Pvalues from the original (parametric) test
perm.P
Pvalues from the notmodified permutation test (permuted are the whole rows of matrix M)
modif.P
Pvalues from the modified permutation test (permuted are species attributes in object M)
seq.P
Pvalues from sequential test (max (perm.P, modif.P)
)
perm
number of permutations
method
method of calculation
dependence
dependence (in case of method = 'lm'
)
1 2 3 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.