Cohen's Kappa on Categorical Data in R - Gestural Repertoires

#1
Hi There,

First time user here. I am a Master's student of Primatology, I wasn't sure Psychology Stats was the way to go but it seems to fit better than Biostatistics for my question.

My thesis is the gestural communication and social cognition of captive northern white-cheeked gibbons (Nomascus leucogenys). I collected my data on ten gibbons in three families groups in separate enclosures, using video-recorded all-occurrence sampling of dyadic interactions. I later coded the videos for "sender", "recipient", "gesture", "recipient attentional state", and other variables not relevant to this question. My data is non-independent and categorical. I've attached screenshots of my data sheet to help clarify. (And just FYI, I'm still early on in coding my videos so I only have 412 instances of gesture at this point- my numbers/results are sure to get more impressive later on).

One of my hypotheses concerns group differences of gestural repertoires, which could provide evidence for the mechanism by which gestures are learned. This means that I'd like to look at the concordance of gestural repertoires both within and between groups. There are 29 total gestures on my ethogram. Similar studies have used inter-rater reliability statistics like Cohen's Kappa. I'm pretty sure that the gibbons themselves are considered the "raters".

The statisticians I have access to on campus, lots of googling, and similar studies have not yet been able to sort this out for me. From what I can gather this is a unique use of Cohen's Kappa. One description of how this statistic was used by another gestural study is what I've primarily been trying to go by "In determining the distribution of signals, the degree of concordance of the signal repertoire was analyzed within each group as well as between groups, applying Cohen's kappa... ...To measure within-group agreement in signal performance, the median kappa was calculated for each dyad of individuals based on the total number of signals that each individual performed and how many of them were also present in the other individual's repertoire in the compared dyad. Finally these median kappas were divided by the number of dyads within this group. Analogously, between-group kappas were calculated out of all median kappas between each individual of one group and each individual of the other group and divided by the number of all dyads between the two groups. The Wilcoxon test was applied to compare each individual's median kappa within group and with members of the other group" (Liebal, Pika, Tomasello, 2004).

At first I thought I understood this, but when calculating the median kappas between dyads, is that simply the number of gestures that overlap? The wording I made red is what bugs me. Or do I divide an individual's total by the number of gestures that overlap in the dyad (meaning two kappas per dyad- one for each individual) or some other formula there? Did I totally misunderstand this/is there a better way?

I am using R and Google sheets (seems to work the same as Excel). I do not have access to SPSS. And yes, I do plan to also email the authors of that study. I thought I might as well reach out to a statistical help forum, too!

Sorry if this is super long, thank you in advance for your help!

-Kaylen