dyadicLongConverter: dyadic long format converter

Description Usage Arguments Details Value See Also Examples

View source: R/conductance.R

Description

dyadicLongConverter convert win-loss probability matrix into long format for each dyad

Usage

1

Arguments

matrix

the win-loss matrix which is the second output from conductance.

Details

values on the diagonal of the matrix are not included in the converted long-format data.

Value

a dataframe of dyadic level win-loss probability and ranking certainty.

See Also

conductance, valueConverter, individualDomProb

Examples

1
2
3
4
5
6
7
# convert an edgelist to conflict matrix
confmatrix <- as.conflictmat(sampleEdgelist)
# find win-loss probability matrix
perm2 <- conductance(confmatrix, 2)
perm2$imputed.conf
perm2$p.hat
dl <- dyadicLongConverter(perm2$p.hat)

Example output

             Kalani        Kale   Kalleigh      Keira    Kibitz     Kimora
Kalani   0.00000000  0.00000000  0.0000000 0.00000000 0.0000000 0.00000000
Kale     0.00000000  0.00000000  0.0000000 0.00000000 4.0557534 0.00000000
Kalleigh 0.05575338  1.00000000  0.0000000 0.11150676 0.2230135 1.11150676
Keira    0.00000000  0.00000000  0.0000000 0.00000000 0.0000000 0.00000000
Kibitz   0.00000000  6.05575338  0.0000000 0.05575338 0.0000000 0.05575338
Kimora   0.05575338  0.05575338  0.1115068 0.05575338 1.0000000 0.00000000
Kioga    0.05575338  0.05575338  3.1115068 1.05575338 0.1672601 7.11150676
Kolyma   0.00000000 17.05575338  0.0000000 0.00000000 6.0557534 0.00000000
Koppy    1.00000000  0.05575338 11.1115068 0.11150676 0.1115068 0.16726014
Kuai     0.05575338  0.11150676 12.0557534 0.05575338 3.0557534 0.11150676
Kyushu   0.00000000  0.05575338  0.1115068 1.05575338 1.1115068 8.05575338
              Kioga      Kolyma     Koppy        Kuai      Kyushu
Kalani   0.00000000  0.00000000 0.0000000  0.00000000  0.00000000
Kale     0.00000000  7.05575338 0.0000000  0.00000000  0.05575338
Kalleigh 1.16726014  0.05575338 5.1672601  6.16726014  1.16726014
Keira    0.00000000  0.00000000 0.0000000  0.00000000  0.00000000
Kibitz   0.05575338 18.05575338 0.0000000  0.05575338  1.00000000
Kimora   2.05575338  0.05575338 1.0557534  0.11150676  0.16726014
Kioga    0.00000000  0.00000000 1.1672601  2.16726014 10.16726014
Kolyma   0.00000000  0.00000000 0.0000000  0.00000000  0.05575338
Koppy    3.11150676  0.00000000 0.0000000 10.16726014  1.16726014
Kuai     0.16726014  0.05575338 5.0557534  0.00000000  3.16726014
Kyushu   9.05575338  0.05575338 0.1672601  4.05575338  0.00000000
attr(,"class")
[1] "conf.mat" "matrix"  
            Kalani      Kale  Kalleigh     Keira    Kibitz    Kimora     Kioga
Kalani   0.0000000 0.5000000 0.4236125 0.5000000 0.5000000 0.4236125 0.4236125
Kale     0.5000000 0.0000000 0.1180829 0.5000000 0.4040371 0.4236125 0.4236125
Kalleigh 0.5763875 0.8819171 0.0000000 0.6325280 0.7095211 0.8263286 0.2881139
Keira    0.5000000 0.5000000 0.3674720 0.0000000 0.4236125 0.4236125 0.1132596
Kibitz   0.5000000 0.5959629 0.2904789 0.5763875 0.0000000 0.1541064 0.3952394
Kimora   0.5763875 0.5763875 0.1736714 0.5763875 0.8458936 0.0000000 0.2332463
Kioga    0.5763875 0.5763875 0.7118861 0.8867404 0.6047606 0.7667537 0.0000000
Kolyma   0.5000000 0.7047444 0.4236125 0.5000000 0.2543067 0.4236125 0.5000000
Koppy    0.8819171 0.5763875 0.6791736 0.6325280 0.6325280 0.2100593 0.7118861
Kuai     0.5763875 0.6325280 0.6588720 0.5763875 0.9385078 0.5000000 0.1217430
Kyushu   0.5000000 0.5000000 0.1675738 0.8867404 0.5230320 0.9622779 0.4715468
            Kolyma     Koppy       Kuai    Kyushu
Kalani   0.5000000 0.1180829 0.42361253 0.5000000
Kale     0.2952556 0.4236125 0.36747202 0.5000000
Kalleigh 0.5763875 0.3208264 0.34112804 0.8324262
Keira    0.5000000 0.3674720 0.42361253 0.1132596
Kibitz   0.7456933 0.3674720 0.06149216 0.4769680
Kimora   0.5763875 0.7899407 0.50000000 0.0377221
Kioga    0.5000000 0.2881139 0.87825704 0.5284532
Kolyma   0.0000000 0.5000000 0.42361253 0.5000000
Koppy    0.5000000 0.0000000 0.66454550 0.8041909
Kuai     0.5763875 0.3354545 0.00000000 0.4410203
Kyushu   0.5000000 0.1958091 0.55897968 0.0000000

Perc documentation built on May 12, 2021, 1:08 a.m.