D_index {TestDimorph}R Documentation

Dissimilarity index

Description

Visual and statistical computation of the area of non-overlap in the trait distribution between two sex groups.

Usage

D_index(
  x,
  plot = FALSE,
  fill = "female",
  Trait = 1,
  B = NULL,
  verbose = FALSE,
  CI = 0.95,
  rand = TRUE,
  digits = 4
)

Arguments

x

A data frame containing summary statistics.

plot

logical; if TRUE a plot of densities for both sexes is returned, Default: FALSE

fill

Specify which sex's density to be filled with color in the plot; either "male" in blue color, "female" in pink color or "both", Default: 'female'

Trait

Number of the column containing names of measured parameters, Default: 1

B

number of bootstrap samples for generating confidence intervals. Higher number means greater accuracy but slower execution. If NULL bootstrap confidence intervals are not produced, Default:NULL

verbose

logical; if TRUE number of bootstraps is displayed, Default: FALSE

CI

confidence interval coverage takes value from 0 to 1, Default: 0.95.

rand

logical; if TRUE, uses random seed. If FALSE, then set.seed(42) for repeatability, Default: TRUE

digits

Number of significant digits, Default: 4

Details

Chakraborty and Majumder's (1982) D index. The calculations are done using Inman and Bradley's (1989) equations, and the relationship that D = 1 - OVL where OVL is the overlap coefficient described in Inman and Bradley. A parametric bootstrap was used assuming normal distributions. The method is known as the "bias-corrected percentile method" (Efron, 1981) or the "bias-corrected percentile interval" (Tibshirani, 1984)

Value

a table and a graphical representation of the selected traits and their corresponding dissimilarity indices, confidence intervals and significance tests.

References

Chakraborty, Ranajit, and Partha P. Majumder.(1982) "On Bennett's measure of sex dimorphism." American Journal of Physical Anthropology 59.3 : 295-298.

Inman, Henry F., and Edwin L. Bradley Jr.(1989) "The overlapping coefficient as a measure of agreement between probability distributions and point estimation of the overlap of two normal densities." Communications in Statistics-Theory and Methods 18.10:3851-3874.

Efron, B. (1981). Nonparametric standard errors and confidence intervals. Canadian Journal of Statistics, 9(2), 139-158.

Tibshirani, R. J. (1984). Bootstrap confidence intervals. Technical Report No. 3, Laboratory for Computational Statistics, Department of Statistics, Stanford University.

Examples

# plot and calculation of D
run.D <- function() {
  print(D_index(Cremains_measurements[1, ], plot = TRUE))
  cat("Published D value: ", Cremains_measurements[1, 8], "\n")
}
run.D()

## Not run: 
# confidence interval with bootstrapping
D_index(Cremains_measurements[1, ], rand = FALSE, B = 1000)

## End(Not run)


[Package TestDimorph version 0.5.8 Index]