Description Usage Arguments Value Details References
View source: R/dist_between_2_sigs.R
The utility function dist_between_2_sigs
computes the distance
between two fatty acid signatures.
1 | dist_between_2_sigs(sig_1, sig_2, dist_meas = 1, gamma = 1)
|
sig_1, sig_2 |
Equal-length numeric vectors of fatty acid signature proportions. |
dist_meas |
An integer indicator of the distance measure to compute. Default value 1. |
gamma |
The power parameter of the chi-square distance measure. See Details. Default value 1. |
The selected distance between the two signatures.
This is an internal utility function. The signatures in sig_1
and
sig_2
are presumed to be ready for analysis, which is best
accomplished by a call to the function prep_sig
. Consequently,
to increase execution speed during simulations, no numeric error checking is
performed. Please refer to documentation for the function
prep_sig
for additional details.
If the argument dist_meas
is not one of the following integers, a
value of NA is returned:
dist_meas == 1 yields the Aitchison distance measure (Stewart et al. 2014). This is the default value.
dist_meas == 2 yields the Kullback-Leibler distance measure of Iverson et al. (2004).
dist_meas == 3 yields the chi-square distance measure (Stewart et al. 2014).
The argument gamma
is only used if dist_meas == 3
and need not
be passed otherwise. If dist_meas == 3
, gamma
must be greater
than 0 and cannot exceed 1. If dist_meas == 3
and a value for
gamma
is not passed, a default value of 1 is used.
Iverson, S.J., C. Field, W.D. Bowen, and W. Blanchard. 2004. Quantitative fatty acid signature analysis: A new method of estimating predator diets. Ecological Monographs 74:211-235.
Stewart, C., S. Iverson, and C. Field. 2014. Testing for a change in diet using fatty acid signatures. Environmental and Ecological Statistics 21:775-792.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.