tt_test: Torus Translation Test to determine habitat associations of...

Description Usage Arguments Details Value Acknowledgments Interpretation of Output References Author(s) See Also Examples

View source: R/tt_test.R

Description

Determine habitat-species associations with code developed by Sabrina Russo, Daniel Zuleta, Matteo Detto, and Kyle Harms.

Usage

1
tt_test(census, sp, habitat, plotdim = NULL, gridsize = NULL)

Arguments

census

A dataframe; a ForestGEO tree table (see details).

sp

Character sting giving any number of species-names.

habitat

Object giving the habitat designation for each plot partition defined by gridsize. See fgeo_habitat().

plotdim, gridsize

Plot dimensions and gridsize. If NULL (default) they will be guessed, and a message will inform you of the chosen values. If the guess is wrong, you should provide the correct values manually (and check that your habitat data is correct).

Details

You should only try to determine the habitat association for sufficiently abundant species. In a 50-ha plot, a minimum abundance of 50 trees/species has been used. Also, you should use data of individual trees (i.e. a tree table, and not a stem table with potentially multiple stems per tree. This test only makes sense at the population level. We are interested in knowing whether or not individuals of a species are aggregated on a habitat. Multiple stems of an individual do not represent population level processes but individual level processes.

Value

A list of matrices. You can summarize the output with summary() and convert it to a dataframe with to_df(). You can also view the result with View(your-result), and reduce it from a list of matrices to a single matix with Reduce(rbind, your-result). See examples.

Acknowledgments

Nestor Engone Obiang, David Kenfack, Jennifer Baltzer, and Rutuja Chitra-Tarak provided feedback. Daniel Zuleta provided guidance.

Interpretation of Output

The probabilities associated with the test for whether these patterns are statistically significant are in the Obs.Quantile columns for each habitat. Note that to calculate the probability for repelled, it is the value given, but to calculate the probability for aggregated, it is 1 - the value given.

Values of the Obs.Quantile < 0.025 means that the species is repelled from that habitat, while values of the Obs.Quantile > 0.975 means that the species is aggregated on that habitat.

References

Zuleta, D., Russo, S.E., Barona, A. et al. Plant Soil (2018). https://doi.org/10.1007/s11104-018-3878-0.

Author(s)

Sabrina Russo, Daniel Zuleta, Matteo Detto, and Kyle Harms.

See Also

summary.tt_lst(), to_df(), fgeo_habitat().

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
library(dplyr)

# Example data
tree <- luquillo_top3_sp
elevation <- fgeo.x::elevation

# Pick alive trees, of 10 mm or more
census <- filter(tree, status == "A", dbh >= 10)

# Pick sufficiently abundant species
pick <- filter(add_count(census, sp), n > 50)
species <- unique(pick$sp)

# Use your habitat data or create it from elevation data
habitat <- fgeo.tool::fgeo_habitat(elevation, gridsize = 20, n = 4)

# A list or matrices
tt_lst <- tt_test(census, species, habitat)
tt_lst

# A simple summary to help you interpret the results
summary(tt_lst)

# A combined matrix
Reduce(rbind, tt_lst)

# A dataframe
dfm <- to_df(tt_lst)

# Using dplyr to summarize results by species and distribution
summarize(group_by(dfm, sp, distribution), n = sum(stem_count))

forestgeo/soilkrig documentation built on Dec. 9, 2018, 1:26 a.m.