Title: | Assessment of Individual Identity in Animal Signals |
---|---|
Description: | Provides tools for assessment and quantification of individual identity information in animal signals. This package accompanies a research article by Linhart et al. (2019) <doi:10.1101/546143>: "Measuring individual identity information in animal signals: Overview and performance of available identity metrics". |
Authors: | Pavel Linhart [aut, cre] |
Maintainer: | Pavel Linhart <[email protected]> |
License: | CC0 |
Version: | 1.0.0 |
Built: | 2024-11-20 06:34:01 UTC |
Source: | CRAN |
Species: Little owl, Athene noctua
Number of individuals: 33
Number of calls per individual: 10
Number of acoustic variables: 11
Individual identity: HS=3.48
Reference: Linhart, P., & Salek, M. (2017). The assessment of biases in the acoustic discrimination of individuals. PLOS ONE, 12(5), e0177206. doi:10.1371/journal.pone.0177206
Calls of little owls were collected in Czech Republic and Hungary.
Territorial calls of each male were recorded for three minutes after a short
playback provocation (1 min) inside their territories from up to 50 m
distance from the individuals. The recordings were made during comparable,
favourable meteorological conditions (without strong wind or precipitation),
from sunset until midnight between March and April of 2013 and 2014. This period
covered the mating season. The period and the time of the day for recording
were selected with regard to the peak in vocal activity of little owls both
within a day and within a season. The original dataset included 54 males with
more than 20 calls each (20-41 calls per individual, mean, SD = 26.9, 6.0)
with good recording quality.The number of individuals and calls per
individual was reduced to match parameters of the other datasets.
Eleven variables were measured to describe the modulation of the fundamental
frequency within the call (shape of the call on spectrogram) and the duration
of the call. Fundamental frequency was measured at ten measuring points
spread equidistantly throughout the call duration. Variables were extracted
in SASLab Pro by Avisoft.
ANmodulation
ANmodulation
A data frame with 330 rows and 12 variables:
factor, identity code of an individual emitting the call
fundamental frequency at the specific measuring point, in Hertz
numeric, duration of the call, in seconds
Species: Little owl, Athene noctua
Number of individuals: 33
Number of calls per individual: 10
Number of acoustic variables: 7
Individual identity: HS=4.68
Reference: Linhart, P., & Salek, M. (2017). The assessment of biases in the acoustic discrimination of individuals. PLOS ONE, 12(5), e0177206. doi:10.1371/journal.pone.0177206
Calls of little owls were collected in Czech Republic and Hungary.
Territorial calls of each male were recorded for three minutes after a short
playback provocation (1 min) inside their territories from up to 50 m
distance from the individuals. The recordings were made during comparable,
favourable meteorological conditions (without strong wind or precipitation),
from sunset until midnight between March and April of 2013 and 2014. This period
covered the mating season. The period and the time of the day for recording
were selected with regard to the peak in vocal activity of little owls both
within a day and within a season. The original dataset included 54 males with
more than 20 calls each (20-41 calls per individual, mean, SD = 26.9, 6.0)
with good recording quality.The number of individuals and calls per
individual was reduced to match parameters of the other datasets.
Variables were selected to measure basic parameters of call spectrum
like the peak frequency, distribution of frequency amplitudes within
spectrum, and range of the frequencies (minimum and maximum). Additionally,
the duration of the call was measured. Variables were extracted in SASLab Pro
by Avisoft.
ANspec
ANspec
A data frame with 330 rows and 8 variables:
factor, identity code of an individual emitting the call
duration of the call, in seconds
frequency of maximum amplitude within the spectrum - peak frequency, in Hertz
minimum and maximum fequency at -25dB relative to the call peak amplitude, in Hertz
frequencies at the three quartiles of amplitude distribution; frequencies below which lie 25, 50 and 75 percent of the energy of the call, respectively, in Hertz
This function calculates centroid of all samples in a given dataset and sums distances between the centroid and each sample. Euclidean distances are used.
calcDistT(df)
calcDistT(df)
df |
A data frame with the first column indicating individual identity. |
Numeric. Total distance.
Other calcHM support function: calcDistW
,
calcMeanVec
calcDistT(ANmodulation)
calcDistT(ANmodulation)
This function calculates centroid for each individual and sums distances of samples from centroid for that particular individual. When the within individual sum of distances is known for each individual, it calculates their mean. Euclidean distances are used.
calcDistW(df)
calcDistW(df)
df |
A data frame with the first column indicating individual identity. |
Numeric. Average within individual distance in dataset.
Other calcHM support function: calcDistT
,
calcMeanVec
calcDistW(ANmodulation)
calcDistW(ANmodulation)
This function will take the specified data frame and will perform linear
discrimination analysis with leave-one-out crossvalidation and equal priors
for each individual (e.g., all priors will be set to 1/10 in case that the
dataset contains 10 individuals). Variables are not modified in any way;
scaling, centering, transformation of variables, or principal component
analysis, etc., if required, need to be done on dataset before calling this
function.
Reference: e.g. Hafner, G. W., Hamilton, C. L.,
Steiner, W. W., Thompson, T. J., & Winn, H. E. (1979). Signature information
in the song of the humpback whale. Journal of the Acoustical Society of
America, 66, 1-6. doi:10.1121/1.383072
calcDS(df)
calcDS(df)
df |
A data frame with the first column noting individual identity of the sample. |
Proportion of samples correctly classified by LDA in df
.
Other individual identity metrics: calcF
,
calcHM
, calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcDS(ANmodulation)
calcDS(ANmodulation)
This function calculates ANOVA F-values (type I sum of squares) for all
identity traits in dataset along with its significance. Each trait is used as
dependent and identity code as independent variable.
Reference: e.g., Miller, D. B. (1978). Species-typical and individually distinctive acoustic features of crow calls of red jungle fowl. Zeitschrift Fur Tierpsychologie-Journal of Comparative Ethology, 47, 182–193.
calcF(df)
calcF(df)
df |
A data frame with the first column indicating individual identity. |
A data frame with 11 rows and 3 columns (trait, f-value, and p-value).
Other individual identity metrics: calcDS
,
calcHM
, calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcF(ANmodulation)
calcF(ANmodulation)
This function calculates information capacity of a signal.
Reference: Searby, A., & Jouventin, P. (2004). How to measure
information carried by a modulated vocal signature? Journal of the Acoustical
Society of America, 116, 3192-3198. doi:10.1121/1.1775271
calcHM(df)
calcHM(df)
df |
A data frame with the first column indicating individual identity. |
Numeric value. Individual identity information capacity HM (in bits) in dataset.
Other individual identity metrics: calcDS
,
calcF
, calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcHM(ANmodulation)
calcHM(ANmodulation)
This function calculates Beecher's information statistic (HS) for all
variables within the dataset.
Reference: Beecher, M. D.
(1989). Signaling Systems for Individual Recognition - an Information-Theory
Approach. Animal Behaviour, 38, 248-261. doi:10.1016/S0003-3472(89)80087-9.
calcHS
(equivalent to calcHSnpergroup
) is the correct
variant of the function calculating Beechers information statistic. The other
variants use total sample size (calcHSntot
) or number of individuals
in dataset (calcHSngroups
) instead of number of samples per individual
to calculate HS. calcHSvarcomp
calculates HS from variance components
of mixed models. HS values calculated by calcHSvarcomp
were found to
be twice as large compared to HS calculated by standard approach.
Please note, sumHS = TRUE
should be used in datasets where
individuality traits are uncorrelated. If traits are correlated, Principal
component analysis (PCA) should be applied and HS should be calculated on
uncorrelated principal componenets instead of original trait variables.
calcHS(df, sumHS = TRUE)
calcHS(df, sumHS = TRUE)
df |
A data frame with the first column indicating individual identity. |
sumHS |
|
For sumHS = TRUE
: Numeric vector of two elements indicating
indicating: 1) HS summed over variables that significantly differ between
individuals (in one-way Anova with individual as independent and a specific
signal trait as dependent variable; or 2) HS summed over all variables in
dataset.
For sumHS = FALSE
: Data frame with thre columns and number of rows
equal to number of variables in dataset. First column includes names of
traits considered for individuality. Second column includes significance
test for each trait (from one-way ANOVA with individual identity as
independent factor and trait as dependent variable). Third column includes
values of HS for each variable trait.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcMI
,
calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcHS(ANmodulation) temp <- calcPCA(ANmodulation) calcHS(temp)
calcHS(ANmodulation) temp <- calcPCA(ANmodulation) calcHS(temp)
This function calculates Beecher's information statistic (HS) for all
variables within the dataset.
Reference:
from Beecher, M. D. (1989). Signaling Systems for Individual Recognition - an
Information-Theory Approach. Animal Behaviour, 38, 248-261.
doi:10.1016/S0003-3472(89)80087-9. calcHS
(equivalent to calcHSnpergroup
) is the
correct variant of the function calculating Beechers information statistic. The other
variants use total sample size (calcHSntot
) or number of individuals in dataset (calcHSngroups
) instead of
number of samples per individual to calculate HS. calcHSvarcomp
calculates
HS from variance components of mixed models. HS values calculated by
calcHSvarcomp
were found to be twice as large compared to HS calculated by standard
approach.
Please note, sumHS = TRUE
should be used in datasets where
individuality traits are uncorrelated. If traits are correlated, Principal
component analysis (PCA) should be applied and HS should be calculated on
uncorrelated principal componenets instead of original trait variables.
calcHSngroups(df, sumHS = T)
calcHSngroups(df, sumHS = T)
df |
A data frame with the first column indicating individual identity. |
sumHS |
|
For sumHS = TRUE
: Numeric vector of two elements indicating indicating: 1) HS summed
over variables that significantly differ between individuals (in one-way
Anova with individual as independent and a specific signal trait as
dependent variable; or 2) HS summed over all variables in dataset.
For sumHS = FALSE
: Data frame with thre columns and number of rows equal to
number of variables in dataset. First column includes names of traits
considered for individuality. Second column includes significance test for
each trait (from one-way ANOVA with individual identity as independent
factor and trait as dependent variable). Third column includes values of HS
for each variable trait.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcHSngroups(ANmodulation) temp <- calcPCA(ANmodulation) calcHSngroups(temp)
calcHSngroups(ANmodulation) temp <- calcPCA(ANmodulation) calcHSngroups(temp)
This function calculates Beecher's information statistic (HS) for all
variables within the dataset.
Reference:
from Beecher, M. D. (1989). Signaling Systems for Individual Recognition - an
Information-Theory Approach. Animal Behaviour, 38, 248-261.
doi:10.1016/S0003-3472(89)80087-9. calcHS
(equivalent to calcHSnpergroup
) is the
correct variant of the function calculating Beechers information statistic. The other
variants use total sample size (calcHSntot
) or number of individuals in dataset (calcHSngroups
) instead of
number of samples per individual to calculate HS. calcHSvarcomp
calculates
HS from variance components of mixed models. HS values calculated by
calcHSvarcomp
were found to be twice as large compared to HS calculated by standard
approach.
Please note, sumHS = TRUE
should be used in datasets where
individuality traits are uncorrelated. If traits are correlated, Principal
component analysis (PCA) should be applied and HS should be calculated on
uncorrelated principal componenets instead of original trait variables.
calcHSnpergroup(df, sumHS = TRUE)
calcHSnpergroup(df, sumHS = TRUE)
df |
A data frame with the first column indicating individual identity. |
sumHS |
|
For sumHS = TRUE
: Numeric vector of two elements indicating indicating: 1) HS summed
over variables that significantly differ between individuals (in one-way
Anova with individual as independent and a specific signal trait as
dependent variable; or 2) HS summed over all variables in dataset.
For sumHS = FALSE
: Data frame with thre columns and number of rows equal to
number of variables in dataset. First column includes names of traits
considered for individuality. Second column includes significance test for
each trait (from one-way ANOVA with individual identity as independent
factor and trait as dependent variable). Third column includes values of HS
for each variable trait.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcHSnpergroup(ANmodulation) temp <- calcPCA(ANmodulation) calcHSnpergroup(temp)
calcHSnpergroup(ANmodulation) temp <- calcPCA(ANmodulation) calcHSnpergroup(temp)
This function calculates Beecher's information statistic (HS) for all
variables within the dataset.
Reference:
from Beecher, M. D. (1989). Signaling Systems for Individual Recognition - an
Information-Theory Approach. Animal Behaviour, 38, 248-261.
doi:10.1016/S0003-3472(89)80087-9. calcHS
(equivalent to calcHSnpergroup
) is the
correct variant of the function calculating Beechers information statistic. The other
variants use total sample size (calcHSntot
) or number of individuals in dataset (calcHSngroups
) instead of
number of samples per individual to calculate HS. calcHSvarcomp
calculates
HS from variance components of mixed models. HS values calculated by
calcHSvarcomp
were found to be twice as large compared to HS calculated by standard
approach.
Please note, sumHS = TRUE
should be used in datasets where
individuality traits are uncorrelated. If traits are correlated, Principal
component analysis (PCA) should be applied and HS should be calculated on
uncorrelated principal componenets instead of original trait variables.
calcHSntot(df, sumHS = T)
calcHSntot(df, sumHS = T)
df |
A data frame with the first column indicating individual identity. |
sumHS |
|
For sumHS = TRUE
: Numeric vector of two elements indicating indicating: 1) HS summed
over variables that significantly differ between individuals (in one-way
Anova with individual as independent and a specific signal trait as
dependent variable; or 2) HS summed over all variables in dataset.
For sumHS = FALSE
: Data frame with thre columns and number of rows equal to
number of variables in dataset. First column includes names of traits
considered for individuality. Second column includes significance test for
each trait (from one-way ANOVA with individual identity as independent
factor and trait as dependent variable). Third column includes values of HS
for each variable trait.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
,
calcHSnpergroup
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcHSntot(ANmodulation) temp <- calcPCA(ANmodulation) calcHSntot(temp)
calcHSntot(ANmodulation) temp <- calcPCA(ANmodulation) calcHSntot(temp)
This function calculates Beecher's information statistic (HS) for all
variables within the dataset.
Reference:
from Beecher, M. D. (1989). Signaling Systems for Individual Recognition - an
Information-Theory Approach. Animal Behaviour, 38, 248-261.
doi:10.1016/S0003-3472(89)80087-9. calcHS
(equivalent to calcHSnpergroup
) is the
correct variant of the function calculating Beechers information statistic. The other
variants use total sample size (calcHSntot
) or number of individuals in dataset (calcHSngroups
) instead of
number of samples per individual to calculate HS. calcHSvarcomp
calculates
HS from variance components of mixed models. HS values calculated by
calcHSvarcomp
were found to be twice as large compared to HS calculated by standard
approach.
Please note, sumHS = TRUE
should be used in datasets where
individuality traits are uncorrelated. If traits are correlated, Principal
component analysis (PCA) should be applied and HS should be calculated on
uncorrelated principal componenets instead of original trait variables.
calcHSvarcomp(df, sumHS = T)
calcHSvarcomp(df, sumHS = T)
df |
A data frame with the first column indicating individual identity. |
sumHS |
|
For sumHS = TRUE
: Numeric vector of two elements indicating indicating: 1) HS summed
over variables that significantly differ between individuals (in one-way
Anova with individual as independent and a specific signal trait as
dependent variable; or 2) HS summed over all variables in dataset.
For sumHS = FALSE
: Data frame with thre columns and number of rows equal to
number of variables in dataset. First column includes names of traits
considered for individuality. Second column includes significance test for
each trait (from one-way ANOVA with individual identity as independent
factor and trait as dependent variable). Third column includes values of HS
for each variable trait.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHS
, calcMI
,
calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcHSvarcomp(ANmodulation) temp <- calcPCA(ANmodulation) calcHSvarcomp(temp)
calcHSvarcomp(ANmodulation) temp <- calcPCA(ANmodulation) calcHSvarcomp(temp)
This function calculates centroid of the individual identity traits. Euclidean distances are used.
calcMeanVec(df)
calcMeanVec(df)
df |
A data frame with the individual identity traits without identity codes (NA will be produced for the column with identity code). |
Numeric vector with the centroid values for each trait.
Other calcHM support function: calcDistT
,
calcDistW
#incorrect use (with identity codes, NA will be produced): calcMeanVec(ANmodulation) #correct use (with identity codes removed) calcMeanVec(ANmodulation[-1])
#incorrect use (with identity codes, NA will be produced): calcMeanVec(ANmodulation) #correct use (with identity codes removed) calcMeanVec(ANmodulation[-1])
This function calculates Mutual information of actual and predicted
individual identities in the dataset. It uses Linear discrimination analysis
(MASS::lda) to predict individual identity. Settings for LDA are identical to
those used in calcDS
function, i.e., LDA uses leave-one-out
cross-validation and priors are equal for each individual in dataset.
Reference: Mathevon, N., Koralek, A., Weldele, M., Glickman, S. E.,
& Theunissen, F. E. (2010). What the hyena’s laugh tells: Sex, age, dominance
and individual signature in the giggling call of Crocuta crocuta. BMC
Ecology, 10, 9-Article No.: 9. doi:10.1186/1472-6785-10-9
calcMI(df)
calcMI(df)
df |
A data frame with the first column indicating individual identity. |
Numeric value of mutual information (in bits).
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcPICbetweenmeans
,
calcPICbetweentot
, calcPIC
calcMI(ANmodulation)
calcMI(ANmodulation)
This function subjects the trait variables from the original dataset to the
Principal component analysis (PCA, stats:prcomp
) and calculates
principal componenets scores for each sample. All variables are centered by
subtracting the variable mean from a particular value and scaled to the unit
variance by dividing the value by the standard deviation of a trait
(stats::prcomp
parameters center = T
, scale = T
). Some
functions like, for example, calcHS
require uncorrelated input
variables to calculate individual identity information properly.
calcPCA(df)
calcPCA(df)
df |
A data frame with the first column indicating individual identity. |
df A data frame with the same attributes like the df
, but the
original individuality traits are replaced by principal components.
summary(ANmodulation) temp <- calcPIC(ANmodulation) summary(temp)
summary(ANmodulation) temp <- calcPIC(ANmodulation) summary(temp)
This function calculates Potential of individual coding for all variables
within the dataset.
Reference: Robisson, P. (1992). Roles of
pitch and duration in the discrimination of the mate's call in the King
penguin Aptenodytes patagonicus. Bioacoustics, 4, 25-36.
calcPIC(df)
calcPIC(df)
df |
A data frame with the first column indicating individual identity. |
Numeric vector with PIC values for each variable in df
.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPICbetweentot
calcPIC(ANmodulation)
calcPIC(ANmodulation)
This function calculates Potential of individual coding for all variables
within the dataset.
Reference: Robisson, P. (1992). Roles of
pitch and duration in the discrimination of the mate's call in the King
penguin Aptenodytes patagonicus. Bioacoustics, 4, 25-36.
calcPICbetweenmeans(df)
calcPICbetweenmeans(df)
df |
A data frame with the first column indicating individual identity. |
Numeric vector with PIC values for each variable in df
.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweentot
,
calcPIC
calcPICbetweenmeans(ANmodulation)
calcPICbetweenmeans(ANmodulation)
This function calculates Potential of individual coding for all variables
within the dataset.
Reference: Robisson, P. (1992). Roles of
pitch and duration in the discrimination of the mate's call in the King
penguin Aptenodytes patagonicus. Bioacoustics, 4, 25-36.
calcPICbetweentot(df)
calcPICbetweentot(df)
df |
A data frame with the first column indicating individual identity. |
Numeric vector with PIC values for each variable in df
.
Other individual identity metrics: calcDS
,
calcF
, calcHM
,
calcHSngroups
,
calcHSnpergroup
, calcHSntot
,
calcHSvarcomp
, calcHS
,
calcMI
, calcPICbetweenmeans
,
calcPIC
calcPICbetweentot(ANmodulation)
calcPICbetweentot(ANmodulation)
Species: Corncrake, Crex crex
Number of individuals: 33
Number of calls per individual: 10
Number of acoustic variables: 4
Individual identity: HS=10.51
Reference: Budka, M., & Osiejuk, T. S. (2013). Formant Frequencies are Acoustic Cues to Caller Discrimination and are a Weak Indicator of the Body Size of Corncrake Males. Ethology, 119, 960-969. doi:10.1111/eth.12141
Corncrake calls were recorded at three sites in Poland and one in the Czech
Republic Recordings were made during the corncrake breeding season, from 8 to
30 July, in 2011 and in 2012. Males were recorded when calling spontaneously,
in favourable conditions, at night (from 22.00 to 03.30, local time) from a
distance of ca. 5-10 m. The original dataset comprised 104 males with 10
calls measured from each male.
Formants (second to fifth) were measured within the first syllable of the
call. Formants were extracted by PRAAT.
CCformants
CCformants
A data frame with 330 rows and 5 variables:
factor, identity code of an individual emitting the call
formants 2 to 5, respectively, measured within the first syllable of the call, in Hertz
Species: Corncrake, Crex crex
Number of individuals: 33
Number of calls per individual: 10
Number of acoustic variables: 7
Individual identity: HS=5.68
Reference: Budka, M., & Osiejuk, T. S. (2013). Formant Frequencies are Acoustic Cues to Caller Discrimination and are a Weak Indicator of the Body Size of Corncrake Males. Ethology, 119, 960-969. doi:10.1111/eth.12141
Corncrake calls were recorded at three sites in Poland and one in the Czech
Republic Recordings were made during the corncrake breeding season, from 8 to
30 July, in 2011 and in 2012. Males were recorded when calling spontaneously,
in favourable conditions, at night (from 22.00 to 03.30, local time) from a
distance of ca. 5-10 m. The original dataset comprised 104 males with 10
calls measured from each male.
Seven variables were selected to measure duration of the first syllable of
the call and its basic spectral parameters of each first syllable of the call
like the peak frequency, distribution of frequency amplitudes within
spectrum, and range of the frequencies (minimum and maximum). Additionally,
the duration of the call was measured. Variables were extracted in SASLab Pro
by Avisoft.
CCspec
CCspec
A data frame with 330 rows and 8 variables:
factor, identity code of an individual emitting the call
duration of the call, in seconds
frequency of maximum amplitude within the spectrum - peak frequency, in Hertz
minimum and maximum fequency at -25dB relative to the call peak amplitude, in Hertz
frequencies at the three quartiles of amplitude distribution; frequencies below which lie 25, 50 and 75 percent of the energy of the call, respectively, in Hertz
This function converts DS to HS. Because the model used to convert values is
derived from stats::loess model
, it cannot make predictions outside
the range of the values used to construct the model. The model was tailored
to the sampling frequently used by studies on individuality:
- number of
individuals should be between 5 and 40 individuals
- number of
observations per individual should be between 5 - 20
- DS value should be
between 0 - 1
Consider increasing your sampling if number of
individuals and/or number of observations are lower than 5. If number of
individuals and observations exceeds the function limits, it might be
acceptable to use the largest possible values allowed by the model to get the
estimate - biases get smaller with larger sampling, so, if your sampling
exceeds function limits a little bit, the estimate should be still quite
precise.
convertDStoHS(nindivs, nobs, DS, se = FALSE)
convertDStoHS(nindivs, nobs, DS, se = FALSE)
nindivs |
Number of individuals. Must be within 5-40 individuals. |
nobs |
Number of observations per individual. Must be within 5-20 observations. |
DS |
DS value to be converted into HS. Must be within 0-1. |
se |
should standard errors be computed (takes more time)? |
If se = FALSE
, Numeric value. DS for a specified number of
individuals and number of observations per individual.
If se = TRUE
,
a list containing components fit, se, residual.scale, df. See
predict.loess
for more details.
Other metric conversion: convertHStoDS
convertDStoHS(nindivs=10, nobs=10, DS=0.7)
convertDStoHS(nindivs=10, nobs=10, DS=0.7)
This function converts HS to DS. Because the model used to convert values is
derived from stats::loess model
model, it cannot make predictions
outside the range of the values used to construct the model. Our model was
tailored to the values frequently used by studies on individuality:
-
number of individuals should be between 5 and 40 individuals
- number of
observations per individual should be between 5 - 20
- HS value should be
between 0 - 12.9
Consider increasing your sampling if number of
individuals and number of observations are lower than 5. If number of
individuals and observations exceeds the function limits, it might be
possible to use the largest possible values allowed by the model to get the
estimate - biases get smaller with large sampling, so, if your sampling
exceeds function limits a little bit, the estimate should be still quite
precise.
convertHStoDS(nindivs, nobs, HS, se = FALSE)
convertHStoDS(nindivs, nobs, HS, se = FALSE)
nindivs |
Number of individuals. Must be within 5-40 individuals. |
nobs |
Number of observations per individual. Must be within 5-20 observations. |
HS |
HS value to be converted into DS. Must be within 0-12.9 bits. |
se |
should standard errors be computed (takes more time)? |
If se = FALSE
, Numeric value. DS for a specified number of
individuals and number of observations per individual.
If se = TRUE
,
a list containing components fit, se, residual.scale, df. See
predict.loess
for more details.
Other metric conversion: convertDStoHS
convertHStoDS(nindivs=10, nobs=10, HS=5)
convertHStoDS(nindivs=10, nobs=10, HS=5)
This functions generates a dataset with desired parameters (number of
individuals and number of observations per individual, number of variables
and covariance between variables, individuality). Unlike for the function
GenerateUnivariate
, trait means are not customizable and are always set to 0.
GenerateMultivariate(nindivs, nobs, nvars, covar, individuality)
GenerateMultivariate(nindivs, nobs, nvars, covar, individuality)
nindivs |
Indicates how many individuals should be in dataset |
nobs |
Indicates how many observations per individual should be in dataset |
nvars |
Indicates how many trait variables should be in dataset. |
covar |
Indicates covariance between variables in dataset. covar=0 for uncorrelated variables; covar=1 for fully correlated variables |
individuality |
Indicates the ratio of between to within individual variation in each trait variable. |
Data frame with the identity codes in the first column and trait variables in subsequent columns. Number of rows and columns depends on the parameters used to generate dataset.
Other Operations with datasets: GenerateUnivariate
id1 <- GenerateMultivariate(nindivs=10, nobs=10, nvars=2, covar=0, individuality=1)
id1 <- GenerateMultivariate(nindivs=10, nobs=10, nvars=2, covar=0, individuality=1)
This functions generates a dataset with desired parameters (number of individuals and number of observations per individual, mean of the parameter, individuality).
GenerateUnivariate(nindivs, nobs, betweenM, individuality)
GenerateUnivariate(nindivs, nobs, betweenM, individuality)
nindivs |
Indicates how many individuals should be in dataset |
nobs |
Indicates how many observations per individual should be in dataset |
betweenM |
Indicates the mean value of the trait. |
individuality |
Indicates the ratio of between to within individual variation. |
Data frame with two columns. Identity codes are in the first column and the trait values are in the second column.
Other Operations with datasets: GenerateMultivariate
GenerateUnivariate(nindivs=10, nobs=10, betweenM=1000, individuality=2)
GenerateUnivariate(nindivs=10, nobs=10, betweenM=1000, individuality=2)
The IDmeasurer
package provides functions for calculation of univariate and
multivariate individual identity metrics, functions generating dataset for
simulation of individual identity in signals, and functions for conversions
between the metrics
calcF
calcPIC
calcHS
calcDS
calcMI
calcHM
GenerateUnivariate
GenerateMultivariate
convertHStoDS
convertDStoHS
Please, use vignette('idmeasurer-workflow-examples')
to learn more about the functions.
Species: Yellow-breasted boubou, Laniarius atroflavus
Number of individuals: 33
Number of calls per individual: 10
Number of acoustic variables: 6
Individual identity: HS=3.83
Reference: Osiejuk, unpublished data
Male Yellow-breasted boubous were recorded in Bamenda region in Cameroon.
Birds were recorded between 06.00 to 10.00 in the morning in 2016, typically,
from the distance of 10 - 20 meters. The calls were recorded after short
provocation with playback. Repertoire of males at the field site included
three distinct call types and only the most common call typed labeled as
“High wee woo” was used for this study. The original dataset comprised 33
individuals and 10 calls per individual.
Variables were selected to measure basic spectral parameters of each “high
weewoo” call like the peak frequency, distribution of frequency amplitudes
within spectrum, and range of the frequencies (minimum and maximum).
Additionally, the duration of the call was measured. Variables were extracted
in Raven Pro 1.5 by the Cornell Bioacoustic Research Program.
LAhighweewoo
LAhighweewoo
A data frame with 330 rows and 7 variables:
factor, identity code of an individual emitting the call
duration of the call, in seconds
frequency of maximum amplitude within the spectrum - peak frequency, in Hertz
minimum and maximum fequency at -25dB relative to the call peak amplitude, in Hertz
frequencies at the two quartiles of amplitude distribution; frequencies below which lie 25 and 75 percent of the energy of the call, respectively, in Hertz
Osiejuk, unpublished data
Species: Domestic pig, Sus scrofa domestica
Number of individuals: 33
Number of calls per individual: 10
Number of acoustic variables: 10
Individual identity: HS=3.18
Reference: Syrova, M., Policht, R., Linhart, P., & Spinka, M. (2017). Ontogeny of individual and litter identity signaling in grunts of piglets. The Journal of the Acoustical Society of America, 142(5), 3116-3121. doi:10.1121/1.5010330
Piglet grunts were recorded in 2014 and 2015 at the research farm of
Institute of Animal Science in Prague. To elicit the calls piglets were
separated from the litter and sow and were recorded in social isolation in
age of 25-30 days after birth from the distance of 1m. Piglets were recorded
opportunistically during the day. The original dataset comprised 97 piglets
coming from 13 different litters and 10 calls per individual piglet.
Variables were selected to be the most informative regarding the individual
identity by the reference study. Variables were extracted using the LMA 2008
software for analysis of animal sounds by Kurt Hammerschmidt.
SSgrunts
SSgrunts
A data frame with 330 rows and 8 variables:
factor, identity code of an individual emitting the call
mean amplitude of the 1st frequency peak, relative amplitude
mean frequency of the 1st DFreqA; equivalent to q25 in ANspec, CCspec, and LAhighweewoo, in Hertz
mean correlation coefficient of successive time segments
estimation of segments with detectable fundamental frequency, in percents
mean frequency of the 3nd DFreqA; equivalent to q75 in ANspec, CCspec, and LAhighweewoo, in Hertz
percentage of noise time segments, in percents
mean frequency range, in Hertz
mean frequency of the 2nd DFreqA; equivalent to q50 in ANspec, CCspec, and LAhighweewoo, in Hertz
percentage of time segments where 2nd DomFreqB detected, in percents
min frequency of the 2nd DFreqA, in Hertz