Description Usage Arguments Value References Examples

View source: R/get_di_matrix.R

Transforms a frequency interaction sociomatrix (valued data) into a dichotomized 1/0 matrix

1 | ```
get_di_matrix(m, type = "wl")
``` |

`m` |
A matrix with individuals ordered identically in rows and columns. |

`type` |
Determines the type of dichotomized matrix to be returned.
the default dichotomized win-loss
matrix will be returned but it will also return 0.5 into cells for tied
relationships.
If `type` ="wlties" the default dichotomized win-loss
matrix will be returned but it will also return 0.5 into cells for tied
relationships. Additionally, if two competitors never interacted both
cells for that relationship will be returned with a 0.
If `type` ="wlties0" every relationship within the win-loss
matrix is assessed for whether one competitor significantly wins more
competitive interactions than the other competitor. Significance is
calculated using a binomial test with probability of p=0.05. A '1' is
given to significant winners within a relationship and a '0' is given
to significant losers or if neither individual is a winner.
If `type` ="wlbinom" The same procedure is done as for
`type` ="wlbinomties", but if no signficiant winner/loser can
be determined then a 0.5 is returned rather than a 0.
If `type` ="wlbinom" the inputted matrix will be turned into a
dichotomized presence-absence matrix, with a '1' indicating that the
competitor in a the row of the matrix beat the competitor in the column
at least once. A '0' indicates that that competitor never beat the
other competitor.
If `type` ="pa" the inputted matrix will be turned into a
dominance score matrix, with a '1' indicating that the
competitor in a the row of the matrix dominates the competitor in the
column. A '-1' indicates that that competitor in a row is subordinate
to the competitor in the column. A '0.5' indicates a tie. A '0'
indicates an observational or structural zero.`type` ="dom" |

A dichotomized win/loss or presence/absence matrix.

Appleby, M. C. 1983. The probability of linearity in hierarchies. Animal Behaviour, 31, 600-608.

1 2 |

```
Dz He De Ho Lu Ki
Dz NA 0 0 0 0 0
He 1 NA 0 0 0 0
De 1 1 NA 0 0 0
Ho 1 0 1 NA 0 0
Lu 1 1 1 1 NA 0
Ki 1 1 1 1 1 NA
A B C D E F G H I J K L
A 0 0 0 1 0 0 1 0 0 0 0 0
B 1 0 0 1 0 0 0 0 0 0 0 0
C 0 1 0 0 0 0 0 0 1 0 0 1
D 0 0 0 0 0 0 0 0 0 0 0 1
E 0 1 0 0 0 0 0 0 0 0 0 0
F 0 0 1 1 0 0 1 0 0 0 0 0
G 0 1 0 0 0 0 0 0 0 0 0 1
H 1 1 1 1 1 1 1 0 1 1 1 1
I 0 1 0 1 1 0 1 0 0 0 0 0
J 1 1 1 1 1 1 1 0 1 0 1 1
K 1 1 1 1 1 1 1 0 1 0 0 1
L 0 1 0 0 0 1 0 0 0 0 0 0
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.