View source: R/paired_SI.test.R
paired_SI.test | R Documentation |
This function will test for the difference in SI between sample(s) and the reference sample of the dataset. This tests descriptors individually, i.e. each morphological descriptor will have its own test.
paired_SI.test(dat, x, ref = 1, compsp = 1:length(dat))
dat |
Input data should be a list of matrices/data frames (same as for morpho_indices function). |
x |
Output from the morpho_indices function, containing the dataframes with SI values, as well as bootstraped values. |
ref |
Index of the reference sample (numeric or character), default is 1, so the first sample in 'dat' is taken to be the reference. Must be the same as defined for the morpho_indices function. |
compsp |
Vector of index(es) of the samples for which the difference is to be tested (numeric or character). Default is 1:length(dat), i.e. all samples, including the reference. |
NB: This test should be used only when the global test (global_SI.test function) showed significant global differences between sample(s) and reference. The test is based on H0: no significant difference between sample and reference. The statistic follows a Welch's T distribution. The expected input is 1) the original dataset, as formatted for the morpho_indices function (argument dat) and 2) the output from the morpho_indices function (argument x).
mat.res A matrix containing observed values of the statistic, 0.95 quantile values for the statistic under H0 (i.e. critical statistic values for significance with alpha=0.05), and P-values (i.e. P(SI >= SI_obs)).
data("equus", package="MorphoInd")
o <- morpho_indices(dat=equus, ref=1, data.type="summary", bootstrap="p", plot=F)
test <- paired_SI.test(dat=equus, x=o, ref=1, compsp=2:10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.