Description Usage Arguments Details Value Author(s) See Also Examples
The function can be used to calculate the difference in mean between two vectors. Statistical inference is obtained through permutation. F-ratio is also calculated. For data which is not normally distributed or lacks independence. The plotting method plots the actual values of the difference in mean and F against an histogram of the results of the permuted runs.
1 2 3 |
x |
Numeric vector. For the plotting method the |
y |
Numeric vector. Plotting object in the plotting method, optional when |
permutations |
Number of permutations. |
which |
which histogram should be plotted? 1 triggers the histogram for difference in mean, 2 the one for F. It defaults to 3: both histograms are plotted. If it is changed from default, the next argument ( |
two |
Should the histograms be printed on a divided display? And how? Can only be set if |
... |
Further arguments to the plotting method or to function |
The two vectors do not need to share the same length but they should not be too different. Otherwise the function might give spurious results.
Returns a list giving the function call, the difference in Mean, the mean of vector x and y, the mean of means, the F-value, the significance of the difference in Mean and the significance of F, as well as the number of permutations. The results of the permutation runs can be retrieved with result\$bootsM
(for the difference in mean) and result\$bootF
(for the F-values). There is a plot method for easily illustrating the test. The difference is plotted against an histogram displaying the distribution of the permuted values.
Gerald Jurasinski
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | data(abis)
## create subsetting vector describing the belonging to different
## vegetationtypes
tcs.sub <- rep(0, 61)
tcs.sub[abis.env[,29]==1] <- 1
tcs.sub[abis.env[,30]==1] <- 2
tcs.sub[abis.env[,31]==1] <- 3
## check distribution
summary(as.factor(tcs.sub))
## compare vegetation types "shrubby vegetation" (shrub=2) and
## "protected by snowcover" (protect=3) regarding difference in
## similarities
abis2.soer <- sim(abis.spec[tcs.sub==2,])
abis3.soer <- sim(abis.spec[tcs.sub==3,])
abis.23cmp <- diffmean(abis2.soer, abis3.soer)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.