sbdiv {simboot}R Documentation

Perform simultaneous confidence intervals or adjusted p–values for the Shannon and the Simpson index.

Description

Function sbdiv estimates simultaneous confidence intervals for the Shannon or the Simpson index. This function provides calculation of several pre–defined contrasts for confidence intervals.Further self-defined contrast are applicable. Simultaneous resampling confidence intervals are estimated according to the Algorithm of Besag et al. (1995) using method rpht, Westfall et al. (1993) using method WYht or similar to Beran (1988) using method tsht. Further estimation of simultaneous asymptotic intervals adjusting for heterogeneous variances is provided by method asht according to Fritsch and Hsu (1999) and Rogers and Hsu (2001). However, estimation of asymptotic intervals may make no sense in data sets with replicated samples due to overdispersion.

Usage

sbdiv(X, f, theta = c("Shannon", "Simpson"),
type = c("Dunnett", "Tukey", "Sequen", "AVE", 
                     "Changepoint", "Williams", "Marcus", 
                     "McDermott", "UmbrellaWilliams", "GrandMean"),
cmat = NULL, method = c("WYht", "tsht", "rpht", "asht"), conf.level =
0.95, alternative = c("two.sided", "less", "greater"), R = 2000, base =
1, ...)

Arguments

X

Data frame containing numerical values for counts in columns. Every column represents on species.

f

Vector of factorial variables for treatment groups. Vector length must be equal to the length of treatment groups multiplicated with sample replications.

theta

Biodiversity index. Options are Shannon and Simpson index.

type

Type of comparison. Options are Dunnett, Tukey, Sequen, AVE, Changepoint, Williams, Marcus, McDermott, UmbrellaWilliams, GrandMean intervals. We tested only Dunnett and Tukey contrasts in simulations.

cmat

Optional self-defined contrast matrix. In case of using this argument, the type argument is not considered.

method

Possible methods are simultaneous bootstrap confidence intervals: WYht, tsht, rpht and asymptotic simultaneous confidence intervals: asht. Adjusted and unadjusted p–values are estimated with method WYht and method tsht.

conf.level

Pre-defined overall confidence level. Default is 0.95, while two-sided inference is estimated with (1-conf.level)/2 for each side and one-sided inference is estimated with 1-conf.level for the side of interest.

alternative

Specified type of interval. Could be "one-sided" or "two.sided".

R

Number of bootstrap steps. Default is 2000, which is a good compromise between accuracy and computing time

base

Control group. base = 1 uses the first group in alphabetical order.

...

Further optional arguments for the internal used function boot from package boot. Most importantly, the number of Bootstrap samples can be chosen via the parameter R (default is R=2000); see ?boot for further options.

Details

sbdiv is the main function for estimating the different multiplicity adjusted confidence intervals. Different methods are called from internal functions.

Value

conf.int

estimate: Estimated difference between groups. Estimators differ between the methods due to calculation. lower: Lower bounds of estimated intervals. upper: Upper bounds of estimated intervals.

p.value

adj. p: multiplicity adjusted p-values. raw p: unadjusted p-values

conf.level

Pre-specified confidence level

alternative

Pre-specified alternative

Author(s)

Ralph Scherer

References

Scherer, R. and Schaarschmidt, F. (2013) Simultaneous confidence intervals for comparing biodiversity indices estimated from overdispersed count data. Biometrical Journal 55, 246–263.

Evaluation of the methods in sbdiv

Westfall, P. H. and Young, S. S. (1993) Resampling-Based Multiple Testing: Examples and Methods for p–Value Adjustment. New York: Wiley.

Corresponding method sbdiv with method WYht

Besag, J., Green, P. J., Higdon, D., Mengersen, K. (1995) Bayesian computation and stochastic systems (with discussion) . Statistical Science, 10, 3–66.

Corresponding method sbdiv with method rpht

Beran, R. (1988) Balanced simultaneous confidence sets. Journal of the American Statistical Association, 83, 679–686.

Corresponding method sbdiv with method tsht

Fritsch, K. S., Hsu, J. C. (1999) Multiple comparison of entropies with application to dinosaur biodiversity. Biometrics, 55, 4, 1300–1305.

Rogers, J. A., Hsu, J. C. (2001) Multiple comparisons of biodiversity. Biometrical Journal, 43, 5, 617–625.

Corresponding method sbdiv with method asht

Examples

## For plots of the datasets see the help files for the data sets.

## First dataset
data(predatGM)

## structure of data
str(predatGM)

## remove block variable
datspec_1 <- predatGM[, -1]
str(datspec_1)

## Order of factorial variable
datspec_1$Variety

## argument base = 1 uses GM as control group. Not directly executable
## due to intensive computing time
# sbdiv(X = datspec_1[, 2:length(datspec_1)], f = datspec_1[, 1], theta =
# "Shannon", type = "Dunnett", method = "WYht", conf.level = 0.95,
# alternative = "two.sided", R = 2000, base = 1)

## Directly executable but senseless value for boot steps R
sbdiv(X = datspec_1[, 2:length(datspec_1)], f = datspec_1[, 1], theta =
"Shannon", type = "Dunnett", method = "WYht", conf.level = 0.95,
alternative = "two.sided", R = 100, base = 1)


## Second dataset
data(saproDipGM)

## structure
str(saproDipGM)

## remove block variable
datspec_2 <- saproDipGM[, -1]
str(datspec_2)

## Order of factor variable
datspec_2$Variety

## argument base = 2 uses Ins as control group. Not directly executable
## due to intensive computing time
# sbdiv(X = datspec_2[, 2:length(datspec_2)], f = datspec_2[, 1], theta =
# "Shannon", type = "Dunnett", method = "rpht", conf.level = 0.95,
# alternative = "two.sided", R = 2000, base = 2)

## Directly executable but senseless value for boot steps R
sbdiv(X = datspec_2[, 2:length(datspec_2)], f = datspec_2[, 1], theta =
"Shannon", type = "Dunnett", method = "rpht", conf.level = 0.95,
alternative = "two.sided", R = 100, base = 2)


[Package simboot version 0.2-8 Index]