ZLAvian

Introduction

The package ZLAvian tests for patterns consistent with Zipf’s Law of Abbreviation (ZLA) in animal communication following the methods described in Lewis et al. (202#) and Gilman et al. (202#).

library(ZLAvian)

testZLA

This function tests for evidence of ZLA in a sample of animal communication represented in a dataframe that must include columns with the following names and information:

Other columns in the dataframe are ignored in the analysis.

testZLA computes the mean concordance (i.e., Kendall’s tau) across all individuals in the data set, and compares this to the expectation under the null hypothesis that note duration and frequency of use are unrelated. The null distribution is computed by permutation while constraining for the observed similarity of note repertoires among individuals. This controls for the possibility that individuals in the population learn their repertoires from others. See Lewis at al (202#) for the formal computation of the null distribution and Gilman et al (202#) for discussion.

Users can control the following parameters in testZLA:

data(testdata, package = "ZLAvian")
test.ZLA.output = testZLA(data, minimum = 1, null = 999, est = "mixed", cores = 2)
#>                          tau         p
#> individual level -0.03745038 0.4180000
#> population level -0.15000000 0.2088536

testZLA prints a table that reports concordances (tau) and p-values at the individual and population levels. Results at the individual level are obtained using the method described in Lewis et al (202#) and Gilman et al (202#). Results at the population level report the concordance between note type duration and frequency of use in the full data set, without considering which individuals produced which notes. Population-level concordances may be problematic when studying ZLA in animal communication (see Gilman et al 202# for discussion) but have been widely used to study ZLA in human languages.

Further information can be pulled from the function:

plotZLA

plotZLA uses the output of testZLA to produce a webplot illustrating the concordance between note type duration and frequency of use within individuals in the population.

store <- testZLA(data, minimum = 1, null = 1000, est = "mixed", cores = 2)
#>                          tau         p
#> individual level -0.03745038 0.4255744
#> population level -0.15000000 0.2088536

plotZLA(store)

In the figure produced by plotZLA, each point represents a note or phrase type in the population repertoire. Note types are joined by a line if both note types are produced by the same individual. The weight of the line is proportional to the number of individuals that produce both note types. The color of the lines indicates whether there is a positive (blue) or negative (red) concordance between the duration and frequency of use of the note types. Negative concordances are consistent with Zipf’s law of abbreviation. Shades between blue and red indicate that the concordance is positive in some individuals and negative in others. For example, this can happen if some individuals use the note types more frequently than others, such that the rank order of frequency of use varies among individuals. Grey crosses centered on each point show the longest and shortest durations of the note type (vertical) and the highest and lowest frequencies of use (horizontal) in the population.