Add a counter for reciprocity errors
Arguments
- x
An object of class barry_graph.
- counter_type
An integer indicating the type of census to compute (see details).
Value
A data frame with columns id (integer perceiver identifier),
name (character label for the reciprocity error type), and value
(numeric count).
Details
We can also separate the counts as a function of whether the perceiver is looking
into all ties, only ties including them, or only ties not including them.
This is controlled by the counter_type argument:
0: All ties
1: Only ties including the perceiver
2: Only ties not including the perceiver
Examples
data(krackhardt_advice)
data(krackhardt_advice_perceptions)
n_people <- 21
advice_matrix <- matrix(0L, nrow = n_people, ncol = n_people)
advice_matrix[cbind(krackhardt_advice$from, krackhardt_advice$to)] <-
krackhardt_advice$value
krack_graph <- new_barry_graph(
c(list(advice_matrix), krackhardt_advice_perceptions)
)
count_recip_errors(krack_graph)
#> id name value
#> 1 0 Partially false recip (omission) (0) 46
#> 2 1 Partially false recip (omission) (1) 31
#> 3 2 Partially false recip (omission) (2) 37
#> 4 3 Partially false recip (omission) (3) 40
#> 5 4 Partially false recip (omission) (4) 52
#> 6 5 Partially false recip (omission) (5) 35
#> 7 6 Partially false recip (omission) (6) 48
#> 8 7 Partially false recip (omission) (7) 46
#> 9 8 Partially false recip (omission) (8) 42
#> 10 9 Partially false recip (omission) (9) 44
#> 11 10 Partially false recip (omission) (10) 40
#> 12 11 Partially false recip (omission) (11) 42
#> 13 12 Partially false recip (omission) (12) 35
#> 14 13 Partially false recip (omission) (13) 31
#> 15 14 Partially false recip (omission) (14) 42
#> 16 15 Partially false recip (omission) (15) 47
#> 17 16 Partially false recip (omission) (16) 41
#> 18 17 Partially false recip (omission) (17) 37
#> 19 18 Partially false recip (omission) (18) 51
#> 20 19 Partially false recip (omission) (19) 30
#> 21 20 Partially false recip (omission) (20) 41
#> 22 0 Partially false recip (comission) (0) 37
#> 23 1 Partially false recip (comission) (1) 31
#> 24 2 Partially false recip (comission) (2) 32
#> 25 3 Partially false recip (comission) (3) 31
#> 26 4 Partially false recip (comission) (4) 35
#> 27 5 Partially false recip (comission) (5) 40
#> 28 6 Partially false recip (comission) (6) 31
#> 29 7 Partially false recip (comission) (7) 40
#> 30 8 Partially false recip (comission) (8) 26
#> 31 9 Partially false recip (comission) (9) 38
#> 32 10 Partially false recip (comission) (10) 39
#> 33 11 Partially false recip (comission) (11) 36
#> 34 12 Partially false recip (comission) (12) 32
#> 35 13 Partially false recip (comission) (13) 40
#> 36 14 Partially false recip (comission) (14) 39
#> 37 15 Partially false recip (comission) (15) 35
#> 38 16 Partially false recip (comission) (16) 33
#> 39 17 Partially false recip (comission) (17) 39
#> 40 18 Partially false recip (comission) (18) 37
#> 41 19 Partially false recip (comission) (19) 42
#> 42 20 Partially false recip (comission) (20) 42
#> 43 0 Completely false recip (omission) (0) 1
#> 44 1 Completely false recip (omission) (1) 2
#> 45 2 Completely false recip (omission) (2) 5
#> 46 3 Completely false recip (omission) (3) 3
#> 47 4 Completely false recip (omission) (4) 4
#> 48 5 Completely false recip (omission) (5) 9
#> 49 6 Completely false recip (omission) (6) 2
#> 50 7 Completely false recip (omission) (7) 5
#> 51 8 Completely false recip (omission) (8) 4
#> 52 9 Completely false recip (omission) (9) 1
#> 53 10 Completely false recip (omission) (10) 6
#> 54 11 Completely false recip (omission) (11) 3
#> 55 12 Completely false recip (omission) (12) 3
#> 56 13 Completely false recip (omission) (13) 4
#> 57 14 Completely false recip (omission) (14) 4
#> 58 15 Completely false recip (omission) (15) 4
#> 59 16 Completely false recip (omission) (16) 1
#> 60 17 Completely false recip (omission) (17) 5
#> 61 18 Completely false recip (omission) (18) 6
#> 62 19 Completely false recip (omission) (19) 5
#> 63 20 Completely false recip (omission) (20) 4
#> 64 0 Completely false recip (comission) (0) 0
#> 65 1 Completely false recip (comission) (1) 1
#> 66 2 Completely false recip (comission) (2) 1
#> 67 3 Completely false recip (comission) (3) 1
#> 68 4 Completely false recip (comission) (4) 1
#> 69 5 Completely false recip (comission) (5) 1
#> 70 6 Completely false recip (comission) (6) 0
#> 71 7 Completely false recip (comission) (7) 3
#> 72 8 Completely false recip (comission) (8) 1
#> 73 9 Completely false recip (comission) (9) 1
#> 74 10 Completely false recip (comission) (10) 2
#> 75 11 Completely false recip (comission) (11) 2
#> 76 12 Completely false recip (comission) (12) 0
#> 77 13 Completely false recip (comission) (13) 2
#> 78 14 Completely false recip (comission) (14) 2
#> 79 15 Completely false recip (comission) (15) 1
#> 80 16 Completely false recip (comission) (16) 3
#> 81 17 Completely false recip (comission) (17) 1
#> 82 18 Completely false recip (comission) (18) 3
#> 83 19 Completely false recip (comission) (19) 4
#> 84 20 Completely false recip (comission) (20) 0
#> 85 0 Mixed reciprocity errors (0) 18
#> 86 1 Mixed reciprocity errors (1) 23
#> 87 2 Mixed reciprocity errors (2) 18
#> 88 3 Mixed reciprocity errors (3) 23
#> 89 4 Mixed reciprocity errors (4) 16
#> 90 5 Mixed reciprocity errors (5) 15
#> 91 6 Mixed reciprocity errors (6) 15
#> 92 7 Mixed reciprocity errors (7) 16
#> 93 8 Mixed reciprocity errors (8) 13
#> 94 9 Mixed reciprocity errors (9) 16
#> 95 10 Mixed reciprocity errors (10) 20
#> 96 11 Mixed reciprocity errors (11) 23
#> 97 12 Mixed reciprocity errors (12) 20
#> 98 13 Mixed reciprocity errors (13) 18
#> 99 14 Mixed reciprocity errors (14) 21
#> 100 15 Mixed reciprocity errors (15) 19
#> 101 16 Mixed reciprocity errors (16) 16
#> 102 17 Mixed reciprocity errors (17) 17
#> 103 18 Mixed reciprocity errors (18) 21
#> 104 19 Mixed reciprocity errors (19) 16
#> 105 20 Mixed reciprocity errors (20) 20
#> 106 0 (01) Accurate null (0) 45
#> 107 1 (01) Accurate null (1) 53
#> 108 2 (01) Accurate null (2) 53
#> 109 3 (01) Accurate null (3) 49
#> 110 4 (01) Accurate null (4) 47
#> 111 5 (01) Accurate null (5) 43
#> 112 6 (01) Accurate null (6) 50
#> 113 7 (01) Accurate null (7) 44
#> 114 8 (01) Accurate null (8) 50
#> 115 9 (01) Accurate null (9) 50
#> 116 10 (01) Accurate null (10) 46
#> 117 11 (01) Accurate null (11) 47
#> 118 12 (01) Accurate null (12) 51
#> 119 13 (01) Accurate null (13) 41
#> 120 14 (01) Accurate null (14) 46
#> 121 15 (01) Accurate null (15) 51
#> 122 16 (01) Accurate null (16) 45
#> 123 17 (01) Accurate null (17) 44
#> 124 18 (01) Accurate null (18) 47
#> 125 19 (01) Accurate null (19) 44
#> 126 20 (01) Accurate null (20) 46
#> 127 0 (02) Partial false positive (null) (0) 20
#> 128 1 (02) Partial false positive (null) (1) 11
#> 129 2 (02) Partial false positive (null) (2) 11
#> 130 3 (02) Partial false positive (null) (3) 15
#> 131 4 (02) Partial false positive (null) (4) 17
#> 132 5 (02) Partial false positive (null) (5) 21
#> 133 6 (02) Partial false positive (null) (6) 15
#> 134 7 (02) Partial false positive (null) (7) 18
#> 135 8 (02) Partial false positive (null) (8) 14
#> 136 9 (02) Partial false positive (null) (9) 14
#> 137 10 (02) Partial false positive (null) (10) 17
#> 138 11 (02) Partial false positive (null) (11) 16
#> 139 12 (02) Partial false positive (null) (12) 14
#> 140 13 (02) Partial false positive (null) (13) 22
#> 141 14 (02) Partial false positive (null) (14) 17
#> 142 15 (02) Partial false positive (null) (15) 13
#> 143 16 (02) Partial false positive (null) (16) 17
#> 144 17 (02) Partial false positive (null) (17) 20
#> 145 18 (02) Partial false positive (null) (18) 15
#> 146 19 (02) Partial false positive (null) (19) 17
#> 147 20 (02) Partial false positive (null) (20) 19
#> 148 0 (03) Complete false positive (null) (0) 0
#> 149 1 (03) Complete false positive (null) (1) 1
#> 150 2 (03) Complete false positive (null) (2) 1
#> 151 3 (03) Complete false positive (null) (3) 1
#> 152 4 (03) Complete false positive (null) (4) 1
#> 153 5 (03) Complete false positive (null) (5) 1
#> 154 6 (03) Complete false positive (null) (6) 0
#> 155 7 (03) Complete false positive (null) (7) 3
#> 156 8 (03) Complete false positive (null) (8) 1
#> 157 9 (03) Complete false positive (null) (9) 1
#> 158 10 (03) Complete false positive (null) (10) 2
#> 159 11 (03) Complete false positive (null) (11) 2
#> 160 12 (03) Complete false positive (null) (12) 0
#> 161 13 (03) Complete false positive (null) (13) 2
#> 162 14 (03) Complete false positive (null) (14) 2
#> 163 15 (03) Complete false positive (null) (15) 1
#> 164 16 (03) Complete false positive (null) (16) 3
#> 165 17 (03) Complete false positive (null) (17) 1
#> 166 18 (03) Complete false positive (null) (18) 3
#> 167 19 (03) Complete false positive (null) (19) 4
#> 168 20 (03) Complete false positive (null) (20) 0
#> 169 0 (04) Partial false negative (assym) (0) 22
#> 170 1 (04) Partial false negative (assym) (1) 19
#> 171 2 (04) Partial false negative (assym) (2) 16
#> 172 3 (04) Partial false negative (assym) (3) 21
#> 173 4 (04) Partial false negative (assym) (4) 28
#> 174 5 (04) Partial false negative (assym) (5) 19
#> 175 6 (04) Partial false negative (assym) (6) 26
#> 176 7 (04) Partial false negative (assym) (7) 27
#> 177 8 (04) Partial false negative (assym) (8) 22
#> 178 9 (04) Partial false negative (assym) (9) 25
#> 179 10 (04) Partial false negative (assym) (10) 27
#> 180 11 (04) Partial false negative (assym) (11) 19
#> 181 12 (04) Partial false negative (assym) (12) 19
#> 182 13 (04) Partial false negative (assym) (13) 13
#> 183 14 (04) Partial false negative (assym) (14) 23
#> 184 15 (04) Partial false negative (assym) (15) 25
#> 185 16 (04) Partial false negative (assym) (16) 26
#> 186 17 (04) Partial false negative (assym) (17) 22
#> 187 18 (04) Partial false negative (assym) (18) 27
#> 188 19 (04) Partial false negative (assym) (19) 15
#> 189 20 (04) Partial false negative (assym) (20) 22
#> 190 0 (05) Accurate assym (0) 53
#> 191 1 (05) Accurate assym (1) 49
#> 192 2 (05) Accurate assym (2) 57
#> 193 3 (05) Accurate assym (3) 49
#> 194 4 (05) Accurate assym (4) 48
#> 195 5 (05) Accurate assym (5) 54
#> 196 6 (05) Accurate assym (6) 51
#> 197 7 (05) Accurate assym (7) 44
#> 198 8 (05) Accurate assym (8) 61
#> 199 9 (05) Accurate assym (9) 44
#> 200 10 (05) Accurate assym (10) 43
#> 201 11 (05) Accurate assym (11) 48
#> 202 12 (05) Accurate assym (12) 50
#> 203 13 (05) Accurate assym (13) 61
#> 204 14 (05) Accurate assym (14) 47
#> 205 15 (05) Accurate assym (15) 43
#> 206 16 (05) Accurate assym (16) 53
#> 207 17 (05) Accurate assym (17) 53
#> 208 18 (05) Accurate assym (18) 43
#> 209 19 (05) Accurate assym (19) 55
#> 210 20 (05) Accurate assym (20) 46
#> 211 0 (06) Mixed assym (0) 8
#> 212 1 (06) Mixed assym (1) 12
#> 213 2 (06) Mixed assym (2) 6
#> 214 3 (06) Mixed assym (3) 14
#> 215 4 (06) Mixed assym (4) 6
#> 216 5 (06) Mixed assym (5) 8
#> 217 6 (06) Mixed assym (6) 7
#> 218 7 (06) Mixed assym (7) 7
#> 219 8 (06) Mixed assym (8) 5
#> 220 9 (06) Mixed assym (9) 7
#> 221 10 (06) Mixed assym (10) 8
#> 222 11 (06) Mixed assym (11) 13
#> 223 12 (06) Mixed assym (12) 13
#> 224 13 (06) Mixed assym (13) 8
#> 225 14 (06) Mixed assym (14) 8
#> 226 15 (06) Mixed assym (15) 10
#> 227 16 (06) Mixed assym (16) 5
#> 228 17 (06) Mixed assym (17) 6
#> 229 18 (06) Mixed assym (18) 8
#> 230 19 (06) Mixed assym (19) 5
#> 231 20 (06) Mixed assym (20) 9
#> 232 0 (07) Partial false positive (assym) (0) 17
#> 233 1 (07) Partial false positive (assym) (1) 20
#> 234 2 (07) Partial false positive (assym) (2) 21
#> 235 3 (07) Partial false positive (assym) (3) 16
#> 236 4 (07) Partial false positive (assym) (4) 18
#> 237 5 (07) Partial false positive (assym) (5) 19
#> 238 6 (07) Partial false positive (assym) (6) 16
#> 239 7 (07) Partial false positive (assym) (7) 22
#> 240 8 (07) Partial false positive (assym) (8) 12
#> 241 9 (07) Partial false positive (assym) (9) 24
#> 242 10 (07) Partial false positive (assym) (10) 22
#> 243 11 (07) Partial false positive (assym) (11) 20
#> 244 12 (07) Partial false positive (assym) (12) 18
#> 245 13 (07) Partial false positive (assym) (13) 18
#> 246 14 (07) Partial false positive (assym) (14) 22
#> 247 15 (07) Partial false positive (assym) (15) 22
#> 248 16 (07) Partial false positive (assym) (16) 16
#> 249 17 (07) Partial false positive (assym) (17) 19
#> 250 18 (07) Partial false positive (assym) (18) 22
#> 251 19 (07) Partial false positive (assym) (19) 25
#> 252 20 (07) Partial false positive (assym) (20) 23
#> 253 0 (08) Complete false negative (full) (0) 1
#> 254 1 (08) Complete false negative (full) (1) 2
#> 255 2 (08) Complete false negative (full) (2) 5
#> 256 3 (08) Complete false negative (full) (3) 3
#> 257 4 (08) Complete false negative (full) (4) 4
#> 258 5 (08) Complete false negative (full) (5) 9
#> 259 6 (08) Complete false negative (full) (6) 2
#> 260 7 (08) Complete false negative (full) (7) 5
#> 261 8 (08) Complete false negative (full) (8) 4
#> 262 9 (08) Complete false negative (full) (9) 1
#> 263 10 (08) Complete false negative (full) (10) 6
#> 264 11 (08) Complete false negative (full) (11) 3
#> 265 12 (08) Complete false negative (full) (12) 3
#> 266 13 (08) Complete false negative (full) (13) 4
#> 267 14 (08) Complete false negative (full) (14) 4
#> 268 15 (08) Complete false negative (full) (15) 4
#> 269 16 (08) Complete false negative (full) (16) 1
#> 270 17 (08) Complete false negative (full) (17) 5
#> 271 18 (08) Complete false negative (full) (18) 6
#> 272 19 (08) Complete false negative (full) (19) 5
#> 273 20 (08) Complete false negative (full) (20) 4
#> 274 0 (09) Partial false negative (full) (0) 24
#> 275 1 (09) Partial false negative (full) (1) 12
#> 276 2 (09) Partial false negative (full) (2) 21
#> 277 3 (09) Partial false negative (full) (3) 19
#> 278 4 (09) Partial false negative (full) (4) 24
#> 279 5 (09) Partial false negative (full) (5) 16
#> 280 6 (09) Partial false negative (full) (6) 22
#> 281 7 (09) Partial false negative (full) (7) 19
#> 282 8 (09) Partial false negative (full) (8) 20
#> 283 9 (09) Partial false negative (full) (9) 19
#> 284 10 (09) Partial false negative (full) (10) 13
#> 285 11 (09) Partial false negative (full) (11) 23
#> 286 12 (09) Partial false negative (full) (12) 16
#> 287 13 (09) Partial false negative (full) (13) 18
#> 288 14 (09) Partial false negative (full) (14) 19
#> 289 15 (09) Partial false negative (full) (15) 22
#> 290 16 (09) Partial false negative (full) (16) 15
#> 291 17 (09) Partial false negative (full) (17) 15
#> 292 18 (09) Partial false negative (full) (18) 24
#> 293 19 (09) Partial false negative (full) (19) 15
#> 294 20 (09) Partial false negative (full) (20) 19
#> 295 0 (10) Accurate full (0) 20
#> 296 1 (10) Accurate full (1) 31
#> 297 2 (10) Accurate full (2) 19
#> 298 3 (10) Accurate full (3) 23
#> 299 4 (10) Accurate full (4) 17
#> 300 5 (10) Accurate full (5) 20
#> 301 6 (10) Accurate full (6) 21
#> 302 7 (10) Accurate full (7) 21
#> 303 8 (10) Accurate full (8) 21
#> 304 9 (10) Accurate full (9) 25
#> 305 10 (10) Accurate full (10) 26
#> 306 11 (10) Accurate full (11) 19
#> 307 12 (10) Accurate full (12) 26
#> 308 13 (10) Accurate full (13) 23
#> 309 14 (10) Accurate full (14) 22
#> 310 15 (10) Accurate full (15) 19
#> 311 16 (10) Accurate full (16) 29
#> 312 17 (10) Accurate full (17) 25
#> 313 18 (10) Accurate full (18) 15
#> 314 19 (10) Accurate full (19) 25
#> 315 20 (10) Accurate full (20) 22