sim.groups: Within- and Between-Group Similarities

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Given two groups with multiple samples (e.g. sites, plots) the sim.groups function calculates all possible pairwise combinations of within- and between-group comparisons.

Usage

1
sim.groups(abundances1, abundances2, q = 1, labels = FALSE, boot = FALSE, boot.arg = list(s.sizes = NULL, num.iter = 100))

Arguments

abundances1

Community data as a matrix where columns are individual species and rows are sites or a vector of different species within a site. Matrix and vector elements are abundance data (e.g. counts, percent cover estimates).

abundances2

Community data, a vector of different species within a site. Vector elements are abundance data (e.g. counts, percent cover estimates). If abundances1 is given a matrix, then abundances2 defaults to a logical FALSE statement.

q

Order of the diversity measure. Defaults to the Shannon case where q = 1.

labels

Logical statement. If labels=TRUE, then site names are given as the first column of the abundance matrix. The default is labels=FALSE where no site names are given in the abundance matrix.

boot

Logical indicating whether to use bootstrapping to estimate uncertainty. If boot=TRUE, only standard errors will be output in table; to get both values and standard error of similarities, must call sim.groups twice, setting boot to both TRUE and FALSE

boot.arg

(optional) List of arguments to pass bootstrapping function: list(s.sizes=number you specify, num.iter=number you specify)

Details

Depending on the specification of the order (q), other different similarity indices may be calculated (e.g. Sorenson index when q=0, Horn index when q=1, Morisita-Horn index when q=2) (Jost 2007).

Value

within.1

Within-group similarities (or standard errors) for first group.

within.2

Within-group similarities (or standard errors) for second group.

between

Between group similarities (or standard errors).

Author(s)

Noah Charney, Sydne Record

References

Jost, L. 2007. Partitioning diversity into independent alpha and beta components. Ecology 88(10): 2427-2439.

See Also

similarity, sim.table

Examples

1
2
3
4
5
data(simesants)
sim.groups(simesants[1:3,],simesants[4:5,],labels=TRUE,boot=TRUE)
sim.groups(simesants[1:3,-1],simesants[4:5,-1])
sim.groups(simesants[1:3,-1],simesants[4:5,-1],labels=TRUE,boot=TRUE)#gives standard errors only
sim.groups(simesants[1:3,-1],simesants[4:5,-1],labels=TRUE,boot=TRUE,boot.arg=list(num.iter=200))#gives standard errors only

Example output

$within.1
[1] 0.02227010 0.05168003 0.04714824

$within.2
[1] 0.02849476

$between
[1] 0.02681434 0.02679088 0.05046991 0.03072453 0.02804491 0.04779836

$within.1
[1] 0.8847291 0.4505731 0.4672154

$within.2
[1] 0.7687828

$between
[1] 0.8445172 0.8957444 0.4361535 0.7809052 0.8439991 0.5196775

$within.1
[1] 0.02257804 0.05010731 0.05118709

$within.2
[1] 0.03357419

$between
[1] 0.03006001 0.02318102 0.04722632 0.02762819 0.02268712 0.04129363

$within.1
[1] 0.02053456 0.04973854 0.04782496

$within.2
[1] 0.03063125

$between
[1] 0.02895894 0.02837632 0.04945613 0.02867306 0.02084208 0.04184798

vegetarian documentation built on May 1, 2019, 8:01 p.m.