dmatrix | R Documentation |
Function to obtain the Sij dyadic dominance relationship from an sociomatrix.
dmatrix(smatrix)
smatrix |
sociomatrix |
The dyadic relationship is obtained by the following expression: Sij = (Xij - Xji) / (|Xij - Xji|), where Sij is the social status of the ith animal relative to the jth animal; Xij is the number of times the animal i won the animal j; Xji is the number of times the animal j won the animal i.
Dyadic matrix
Julia P. S. Valente, Matheus Deniz, Karolini T. de Sousa.
Kondo, S., & Hurnik, J. F. (1990). Stabilization of social hierarchy in dairy cows. Applied Animal Behaviour Science, 27(4), 287-297.
x <- matrix(c(0,0,1,0,0,1,0,0,2,0,0,0,0,1,0,0,0,1,0,0,2, 0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0, 1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0), nrow=8,byrow=TRUE,) colnames(x) <- c(1,2,3,4,5,6,8,9) rownames(x) <- c(1,2,3,4,5,6,8,9) dyadic <- dmatrix(x) print(dyadic)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.