Display data:
options (width=200)
my_data <- read.csv("anonymizedData.tsv", sep = "\t")
my_data
## participant language.group tone.contrast.type coda.consonant response correct
## 1 p1 English FF k Same 1
## 2 p1 English FH k Different 1
## 3 p1 English FL k Different 1
## 4 p1 English HF k Different 1
## 5 p1 English HH k Same 1
## 6 p1 English HL k Different 1
## 7 p1 English LF k Different 1
## 8 p1 English LH k Different 1
## 9 p1 English LL k Same 1
## 10 p1 English FF p Same 1
## 11 p1 English FH p Different 1
## 12 p1 English FL p Different 1
## 13 p1 English HF p Different 1
## 14 p1 English HH p Same 1
## 15 p1 English HL p Different 1
## 16 p1 English LF p Different 1
## 17 p1 English LH p Different 1
## 18 p1 English LL p Same 1
## 19 p1 English FF t Same 1
## 20 p1 English FH t Different 1
## 21 p1 English FL t Different 1
## 22 p1 English HF t Different 1
## 23 p1 English HH t Same 1
## 24 p1 English HL t Different 1
## 25 p1 English LF t Different 1
## 26 p1 English LH t Different 1
## 27 p1 English LL t Same 1
## 28 p2 English FF k Same 1
## 29 p2 English FH k Different 1
## 30 p2 English FL k Different 1
## 31 p2 English HF k Different 1
## 32 p2 English HH k Same 1
## 33 p2 English HL k Different 1
## 34 p2 English LF k Different 1
## 35 p2 English LH k Different 1
## 36 p2 English LL k Same 1
## 37 p2 English FF p Same 1
## 38 p2 English FH p Different 1
## 39 p2 English FL p Different 1
## 40 p2 English HF p Different 1
## 41 p2 English HH p Same 1
## 42 p2 English HL p Different 1
## 43 p2 English LF p Different 1
## 44 p2 English LH p Different 1
## 45 p2 English LL p Same 1
## 46 p2 English FF t Same 1
## 47 p2 English FH t Different 1
## 48 p2 English FL t Different 1
## 49 p2 English HF t Different 1
## 50 p2 English HH t Same 1
## 51 p2 English HL t Different 1
## 52 p2 English LF t Different 1
## 53 p2 English LH t Different 1
## 54 p2 English LL t Same 1
## 55 p3 English FF k Same 1
## 56 p3 English FH k Different 1
## 57 p3 English FL k Different 1
## 58 p3 English HF k Different 1
## 59 p3 English HH k Same 1
## 60 p3 English HL k Same 0
## 61 p3 English LF k Different 1
## 62 p3 English LH k Different 1
## 63 p3 English LL k Same 1
## 64 p3 English FF p Same 1
## 65 p3 English FH p Different 1
## 66 p3 English FL p Different 1
## 67 p3 English HF p Different 1
## 68 p3 English HH p Same 1
## 69 p3 English HL p Different 1
## 70 p3 English LF p Different 1
## 71 p3 English LH p Different 1
## 72 p3 English LL p Same 1
## 73 p3 English FF t Same 1
## 74 p3 English FH t Different 1
## 75 p3 English FL t Different 1
## 76 p3 English HF t Different 1
## 77 p3 English HH t Same 1
## 78 p3 English HL t Different 1
## 79 p3 English LF t Different 1
## 80 p3 English LH t Same 0
## 81 p3 English LL t Same 1
## 82 p4 English FF k Same 1
## 83 p4 English FH k Different 1
## 84 p4 English FL k Different 1
## 85 p4 English HF k Same 0
## 86 p4 English HH k Same 1
## 87 p4 English HL k Same 0
## 88 p4 English LF k Different 1
## 89 p4 English LH k Same 0
## 90 p4 English LL k Same 1
## 91 p4 English FF p Same 1
## 92 p4 English FH p Different 1
## 93 p4 English FL p Different 1
## 94 p4 English HF p Different 1
## 95 p4 English HH p Same 1
## 96 p4 English HL p Different 1
## 97 p4 English LF p Same 0
## 98 p4 English LH p Different 1
## 99 p4 English LL p Same 1
## 100 p4 English FF t Same 1
## 101 p4 English FH t Different 1
## 102 p4 English FL t Different 1
## 103 p4 English HF t Different 1
## 104 p4 English HH t Same 1
## 105 p4 English HL t Different 1
## 106 p4 English LF t Different 1
## 107 p4 English LH t Different 1
## 108 p4 English LL t Same 1
## 109 p5 English FF k Same 1
## 110 p5 English FH k Different 1
## 111 p5 English FL k Different 1
## 112 p5 English HF k Different 1
## 113 p5 English HH k Different 0
## 114 p5 English HL k Different 1
## 115 p5 English LF k Different 1
## 116 p5 English LH k Different 1
## 117 p5 English LL k Different 0
## 118 p5 English FF p Different 0
## 119 p5 English FH p Different 1
## 120 p5 English FL p Different 1
## 121 p5 English HF p Different 1
## 122 p5 English HH p Same 1
## 123 p5 English HL p Different 1
## 124 p5 English LF p Different 1
## 125 p5 English LH p Different 1
## 126 p5 English LL p Same 1
## 127 p5 English FF t Same 1
## 128 p5 English FH t Same 0
## 129 p5 English FL t Different 1
## 130 p5 English HF t Different 1
## 131 p5 English HH t Same 1
## 132 p5 English HL t Different 1
## 133 p5 English LF t Different 1
## 134 p5 English LH t Different 1
## 135 p5 English LL t Different 0
## 136 p6 English FF k Different 0
## 137 p6 English FH k Different 1
## 138 p6 English FL k Different 1
## 139 p6 English HF k Different 1
## 140 p6 English HH k Same 1
## 141 p6 English HL k Different 1
## 142 p6 English LF k Different 1
## 143 p6 English LH k Different 1
## 144 p6 English LL k Same 1
## 145 p6 English FF p Same 1
## 146 p6 English FH p Different 1
## 147 p6 English FL p Different 1
## 148 p6 English HF p Different 1
## 149 p6 English HH p Different 0
## 150 p6 English HL p Different 1
## 151 p6 English LF p Different 1
## 152 p6 English LH p Different 1
## 153 p6 English LL p Same 1
## 154 p6 English FF t Same 1
## 155 p6 English FH t Different 1
## 156 p6 English FL t Different 1
## 157 p6 English HF t Different 1
## 158 p6 English HH t Same 1
## 159 p6 English HL t Same 0
## 160 p6 English LF t Same 0
## 161 p6 English LH t Different 1
## 162 p6 English LL t Same 1
## 163 p7 English FF k Same 1
## 164 p7 English FH k Different 1
## 165 p7 English FL k Different 1
## 166 p7 English HF k Different 1
## 167 p7 English HH k Same 1
## 168 p7 English HL k Different 1
## 169 p7 English LF k Different 1
## 170 p7 English LH k Same 0
## 171 p7 English LL k Same 1
## 172 p7 English FF p Different 0
## 173 p7 English FH p Different 1
## 174 p7 English FL p Different 1
## 175 p7 English HF p Different 1
## 176 p7 English HH p Same 1
## 177 p7 English HL p Different 1
## 178 p7 English LF p Different 1
## 179 p7 English LH p Same 0
## 180 p7 English LL p Same 1
## 181 p7 English FF t Same 1
## 182 p7 English FH t Different 1
## 183 p7 English FL t Different 1
## 184 p7 English HF t Different 1
## 185 p7 English HH t Same 1
## 186 p7 English HL t Different 1
## 187 p7 English LF t Different 1
## 188 p7 English LH t Different 1
## 189 p7 English LL t Same 1
## 190 p8 English FF k Same 1
## 191 p8 English FH k Different 1
## 192 p8 English FL k Different 1
## 193 p8 English HF k Different 1
## 194 p8 English HH k Same 1
## 195 p8 English HL k Same 0
## 196 p8 English LF k Different 1
## 197 p8 English LH k Different 1
## 198 p8 English LL k Same 1
## 199 p8 English FF p Same 1
## 200 p8 English FH p Different 1
## 201 p8 English FL p Different 1
## 202 p8 English HF p Different 1
## 203 p8 English HH p Same 1
## 204 p8 English HL p Different 1
## 205 p8 English LF p Different 1
## 206 p8 English LH p Different 1
## 207 p8 English LL p Same 1
## 208 p8 English FF t Same 1
## 209 p8 English FH t Different 1
## 210 p8 English FL t Different 1
## 211 p8 English HF t Different 1
## 212 p8 English HH t Same 1
## 213 p8 English HL t Different 1
## 214 p8 English LF t Same 0
## 215 p8 English LH t Different 1
## 216 p8 English LL t Same 1
## 217 p9 English FF k Same 1
## 218 p9 English FH k Different 1
## 219 p9 English FL k Different 1
## 220 p9 English HF k Different 1
## 221 p9 English HH k Same 1
## 222 p9 English HL k Different 1
## 223 p9 English LF k Different 1
## 224 p9 English LH k Different 1
## 225 p9 English LL k Same 1
## 226 p9 English FF p Same 1
## 227 p9 English FH p Different 1
## 228 p9 English FL p Different 1
## 229 p9 English HF p Different 1
## 230 p9 English HH p Same 1
## 231 p9 English HL p Different 1
## 232 p9 English LF p Different 1
## 233 p9 English LH p Different 1
## 234 p9 English LL p Different 0
## 235 p9 English FF t Same 1
## 236 p9 English FH t Different 1
## 237 p9 English FL t Same 0
## 238 p9 English HF t Different 1
## 239 p9 English HH t Same 1
## 240 p9 English HL t Different 1
## 241 p9 English LF t Different 1
## 242 p9 English LH t Different 1
## 243 p9 English LL t Same 1
## 244 p10 English FF k Same 1
## 245 p10 English FH k Different 1
## 246 p10 English FL k Different 1
## 247 p10 English HF k Different 1
## 248 p10 English HH k Same 1
## 249 p10 English HL k Different 1
## 250 p10 English LF k Different 1
## 251 p10 English LH k Different 1
## 252 p10 English LL k Same 1
## 253 p10 English FF p Same 1
## 254 p10 English FH p Different 1
## 255 p10 English FL p Different 1
## 256 p10 English HF p Different 1
## 257 p10 English HH p Same 1
## 258 p10 English HL p Different 1
## 259 p10 English LF p Different 1
## 260 p10 English LH p Different 1
## 261 p10 English LL p Same 1
## 262 p10 English FF t Same 1
## 263 p10 English FH t Different 1
## 264 p10 English FL t Different 1
## 265 p10 English HF t Different 1
## 266 p10 English HH t Same 1
## 267 p10 English HL t Different 1
## 268 p10 English LF t Different 1
## 269 p10 English LH t Different 1
## 270 p10 English LL t Same 1
## 271 p11 English FF k Same 1
## 272 p11 English FH k Different 1
## 273 p11 English FL k Different 1
## 274 p11 English HF k Different 1
## 275 p11 English HH k Same 1
## 276 p11 English HL k Different 1
## 277 p11 English LF k Different 1
## 278 p11 English LH k Different 1
## 279 p11 English LL k Same 1
## 280 p11 English FF p Same 1
## 281 p11 English FH p Different 1
## 282 p11 English FL p Different 1
## 283 p11 English HF p Different 1
## 284 p11 English HH p Same 1
## 285 p11 English HL p Different 1
## 286 p11 English LF p Different 1
## 287 p11 English LH p Different 1
## 288 p11 English LL p Same 1
## 289 p11 English FF t Same 1
## 290 p11 English FH t Different 1
## 291 p11 English FL t Different 1
## 292 p11 English HF t Different 1
## 293 p11 English HH t Same 1
## 294 p11 English HL t Different 1
## 295 p11 English LF t Different 1
## 296 p11 English LH t Different 1
## 297 p11 English LL t Same 1
## 298 p12 English FF k Same 1
## 299 p12 English FH k Different 1
## 300 p12 English FL k Different 1
## 301 p12 English HF k Different 1
## 302 p12 English HH k Same 1
## 303 p12 English HL k Different 1
## 304 p12 English LF k Different 1
## 305 p12 English LH k Different 1
## 306 p12 English LL k Same 1
## 307 p12 English FF p Same 1
## 308 p12 English FH p Different 1
## 309 p12 English FL p Different 1
## 310 p12 English HF p Different 1
## 311 p12 English HH p Same 1
## 312 p12 English HL p Different 1
## 313 p12 English LF p Different 1
## 314 p12 English LH p Different 1
## 315 p12 English LL p Same 1
## 316 p12 English FF t Same 1
## 317 p12 English FH t Different 1
## 318 p12 English FL t Different 1
## 319 p12 English HF t Same 0
## 320 p12 English HH t Same 1
## 321 p12 English HL t Different 1
## 322 p12 English LF t Different 1
## 323 p12 English LH t Different 1
## 324 p12 English LL t Same 1
## 325 p13 Mandarin FF k Same 1
## 326 p13 Mandarin FH k Different 1
## 327 p13 Mandarin FL k Different 1
## 328 p13 Mandarin HF k Different 1
## 329 p13 Mandarin HH k Same 1
## 330 p13 Mandarin HL k Different 1
## 331 p13 Mandarin LF k Different 1
## 332 p13 Mandarin LH k Different 1
## 333 p13 Mandarin LL k Same 1
## 334 p13 Mandarin FF p Same 1
## 335 p13 Mandarin FH p Different 1
## 336 p13 Mandarin FL p Different 1
## 337 p13 Mandarin HF p Different 1
## 338 p13 Mandarin HH p Same 1
## 339 p13 Mandarin HL p Different 1
## 340 p13 Mandarin LF p Different 1
## 341 p13 Mandarin LH p Different 1
## 342 p13 Mandarin LL p Same 1
## 343 p13 Mandarin FF t Same 1
## 344 p13 Mandarin FH t Different 1
## 345 p13 Mandarin FL t Different 1
## 346 p13 Mandarin HF t Different 1
## 347 p13 Mandarin HH t Same 1
## 348 p13 Mandarin HL t Different 1
## 349 p13 Mandarin LF t Different 1
## 350 p13 Mandarin LH t Different 1
## 351 p13 Mandarin LL t Same 1
## 352 p14 Mandarin FF k Same 1
## 353 p14 Mandarin FH k Different 1
## 354 p14 Mandarin FL k Different 1
## 355 p14 Mandarin HF k Different 1
## 356 p14 Mandarin HH k Same 1
## 357 p14 Mandarin HL k Different 1
## 358 p14 Mandarin LF k Different 1
## 359 p14 Mandarin LH k Different 1
## 360 p14 Mandarin LL k Same 1
## 361 p14 Mandarin FF p Same 1
## 362 p14 Mandarin FH p Different 1
## 363 p14 Mandarin FL p Different 1
## 364 p14 Mandarin HF p Different 1
## 365 p14 Mandarin HH p Same 1
## 366 p14 Mandarin HL p Different 1
## 367 p14 Mandarin LF p Different 1
## 368 p14 Mandarin LH p Different 1
## 369 p14 Mandarin LL p Same 1
## 370 p14 Mandarin FF t Same 1
## 371 p14 Mandarin FH t Different 1
## 372 p14 Mandarin FL t Different 1
## 373 p14 Mandarin HF t Different 1
## 374 p14 Mandarin HH t Same 1
## 375 p14 Mandarin HL t Different 1
## 376 p14 Mandarin LF t Different 1
## 377 p14 Mandarin LH t Different 1
## 378 p14 Mandarin LL t Same 1
## 379 p15 Mandarin FF k Same 1
## 380 p15 Mandarin FH k Different 1
## 381 p15 Mandarin FL k Different 1
## 382 p15 Mandarin HF k Different 1
## 383 p15 Mandarin HH k Same 1
## 384 p15 Mandarin HL k Different 1
## 385 p15 Mandarin LF k Different 1
## 386 p15 Mandarin LH k Different 1
## 387 p15 Mandarin LL k Same 1
## 388 p15 Mandarin FF p Same 1
## 389 p15 Mandarin FH p Different 1
## 390 p15 Mandarin FL p Different 1
## 391 p15 Mandarin HF p Different 1
## 392 p15 Mandarin HH p Same 1
## 393 p15 Mandarin HL p Different 1
## 394 p15 Mandarin LF p Different 1
## 395 p15 Mandarin LH p Different 1
## 396 p15 Mandarin LL p Same 1
## 397 p15 Mandarin FF t Same 1
## 398 p15 Mandarin FH t Different 1
## 399 p15 Mandarin FL t Different 1
## 400 p15 Mandarin HF t Different 1
## 401 p15 Mandarin HH t Same 1
## 402 p15 Mandarin HL t Different 1
## 403 p15 Mandarin LF t Different 1
## 404 p15 Mandarin LH t Different 1
## 405 p15 Mandarin LL t Same 1
## 406 p16 Mandarin FF k Same 1
## 407 p16 Mandarin FH k Different 1
## 408 p16 Mandarin FL k Different 1
## 409 p16 Mandarin HF k Different 1
## 410 p16 Mandarin HH k Same 1
## 411 p16 Mandarin HL k Different 1
## 412 p16 Mandarin LF k Different 1
## 413 p16 Mandarin LH k Different 1
## 414 p16 Mandarin LL k Same 1
## 415 p16 Mandarin FF p Same 1
## 416 p16 Mandarin FH p Different 1
## 417 p16 Mandarin FL p Different 1
## 418 p16 Mandarin HF p Different 1
## 419 p16 Mandarin HH p Same 1
## 420 p16 Mandarin HL p Different 1
## 421 p16 Mandarin LF p Different 1
## 422 p16 Mandarin LH p Different 1
## 423 p16 Mandarin LL p Same 1
## 424 p16 Mandarin FF t Same 1
## 425 p16 Mandarin FH t Different 1
## 426 p16 Mandarin FL t Different 1
## 427 p16 Mandarin HF t Different 1
## 428 p16 Mandarin HH t Same 1
## 429 p16 Mandarin HL t Different 1
## 430 p16 Mandarin LF t Different 1
## 431 p16 Mandarin LH t Different 1
## 432 p16 Mandarin LL t Same 1
## 433 p17 Mandarin FF k Different 0
## 434 p17 Mandarin FH k Different 1
## 435 p17 Mandarin FL k Different 1
## 436 p17 Mandarin HF k Different 1
## 437 p17 Mandarin HH k Same 1
## 438 p17 Mandarin HL k Different 1
## 439 p17 Mandarin LF k Different 1
## 440 p17 Mandarin LH k Different 1
## 441 p17 Mandarin LL k Same 1
## 442 p17 Mandarin FF p Same 1
## 443 p17 Mandarin FH p Different 1
## 444 p17 Mandarin FL p Different 1
## 445 p17 Mandarin HF p Different 1
## 446 p17 Mandarin HH p Same 1
## 447 p17 Mandarin HL p Different 1
## 448 p17 Mandarin LF p Different 1
## 449 p17 Mandarin LH p Different 1
## 450 p17 Mandarin LL p Same 1
## 451 p17 Mandarin FF t Same 1
## 452 p17 Mandarin FH t Different 1
## 453 p17 Mandarin FL t Different 1
## 454 p17 Mandarin HF t Different 1
## 455 p17 Mandarin HH t Same 1
## 456 p17 Mandarin HL t Different 1
## 457 p17 Mandarin LF t Different 1
## 458 p17 Mandarin LH t Different 1
## 459 p17 Mandarin LL t Same 1
## 460 p18 Mandarin FF k Same 1
## 461 p18 Mandarin FH k Different 1
## 462 p18 Mandarin FL k Different 1
## 463 p18 Mandarin HF k Different 1
## 464 p18 Mandarin HH k Same 1
## 465 p18 Mandarin HL k Different 1
## 466 p18 Mandarin LF k Different 1
## 467 p18 Mandarin LH k Same 0
## 468 p18 Mandarin LL k Same 1
## 469 p18 Mandarin FF p Same 1
## 470 p18 Mandarin FH p Different 1
## 471 p18 Mandarin FL p Same 0
## 472 p18 Mandarin HF p Different 1
## 473 p18 Mandarin HH p Same 1
## 474 p18 Mandarin HL p Different 1
## 475 p18 Mandarin LF p Different 1
## 476 p18 Mandarin LH p Different 1
## 477 p18 Mandarin LL p Same 1
## 478 p18 Mandarin FF t Same 1
## 479 p18 Mandarin FH t Different 1
## 480 p18 Mandarin FL t Different 1
## 481 p18 Mandarin HF t Different 1
## 482 p18 Mandarin HH t Same 1
## 483 p18 Mandarin HL t Different 1
## 484 p18 Mandarin LF t Different 1
## 485 p18 Mandarin LH t Different 1
## 486 p18 Mandarin LL t Same 1
## 487 p19 Mandarin FF k Same 1
## 488 p19 Mandarin FH k Different 1
## 489 p19 Mandarin FL k Different 1
## 490 p19 Mandarin HF k Different 1
## 491 p19 Mandarin HH k Same 1
## 492 p19 Mandarin HL k Different 1
## 493 p19 Mandarin LF k Different 1
## 494 p19 Mandarin LH k Same 0
## 495 p19 Mandarin LL k Same 1
## 496 p19 Mandarin FF p Same 1
## 497 p19 Mandarin FH p Different 1
## 498 p19 Mandarin FL p Different 1
## 499 p19 Mandarin HF p Different 1
## 500 p19 Mandarin HH p Same 1
## 501 p19 Mandarin HL p Different 1
## 502 p19 Mandarin LF p Different 1
## 503 p19 Mandarin LH p Different 1
## 504 p19 Mandarin LL p Same 1
## 505 p19 Mandarin FF t Same 1
## 506 p19 Mandarin FH t Different 1
## 507 p19 Mandarin FL t Different 1
## 508 p19 Mandarin HF t Different 1
## 509 p19 Mandarin HH t Same 1
## 510 p19 Mandarin HL t Different 1
## 511 p19 Mandarin LF t Different 1
## 512 p19 Mandarin LH t Different 1
## 513 p19 Mandarin LL t Same 1
## 514 p20 Mandarin FF k Same 1
## 515 p20 Mandarin FH k Different 1
## 516 p20 Mandarin FL k Different 1
## 517 p20 Mandarin HF k Different 1
## 518 p20 Mandarin HH k Same 1
## 519 p20 Mandarin HL k Same 0
## 520 p20 Mandarin LF k Different 1
## 521 p20 Mandarin LH k Different 1
## 522 p20 Mandarin LL k Same 1
## 523 p20 Mandarin FF p Same 1
## 524 p20 Mandarin FH p Different 1
## 525 p20 Mandarin FL p Different 1
## 526 p20 Mandarin HF p Different 1
## 527 p20 Mandarin HH p Same 1
## 528 p20 Mandarin HL p Different 1
## 529 p20 Mandarin LF p Different 1
## 530 p20 Mandarin LH p Different 1
## 531 p20 Mandarin LL p Same 1
## 532 p20 Mandarin FF t Same 1
## 533 p20 Mandarin FH t Different 1
## 534 p20 Mandarin FL t Different 1
## 535 p20 Mandarin HF t Different 1
## 536 p20 Mandarin HH t Same 1
## 537 p20 Mandarin HL t Different 1
## 538 p20 Mandarin LF t Different 1
## 539 p20 Mandarin LH t Different 1
## 540 p20 Mandarin LL t Same 1
## 541 p21 Mandarin FF k Same 1
## 542 p21 Mandarin FH k Different 1
## 543 p21 Mandarin FL k Different 1
## 544 p21 Mandarin HF k Different 1
## 545 p21 Mandarin HH k Same 1
## 546 p21 Mandarin HL k Different 1
## 547 p21 Mandarin LF k Same 0
## 548 p21 Mandarin LH k Different 1
## 549 p21 Mandarin LL k Same 1
## 550 p21 Mandarin FF p Same 1
## 551 p21 Mandarin FH p Different 1
## 552 p21 Mandarin FL p Different 1
## 553 p21 Mandarin HF p Different 1
## 554 p21 Mandarin HH p Same 1
## 555 p21 Mandarin HL p Different 1
## 556 p21 Mandarin LF p Different 1
## 557 p21 Mandarin LH p Different 1
## 558 p21 Mandarin LL p Same 1
## 559 p21 Mandarin FF t Same 1
## 560 p21 Mandarin FH t Different 1
## 561 p21 Mandarin FL t Different 1
## 562 p21 Mandarin HF t Different 1
## 563 p21 Mandarin HH t Same 1
## 564 p21 Mandarin HL t Different 1
## 565 p21 Mandarin LF t Same 0
## 566 p21 Mandarin LH t Different 1
## 567 p21 Mandarin LL t Same 1
## 568 p22 Mandarin FF k Same 1
## 569 p22 Mandarin FH k Different 1
## 570 p22 Mandarin FL k Different 1
## 571 p22 Mandarin HF k Different 1
## 572 p22 Mandarin HH k Different 0
## 573 p22 Mandarin HL k Different 1
## 574 p22 Mandarin LF k Different 1
## 575 p22 Mandarin LH k Different 1
## 576 p22 Mandarin LL k Different 0
## 577 p22 Mandarin FF p Different 0
## 578 p22 Mandarin FH p Different 1
## 579 p22 Mandarin FL p Different 1
## 580 p22 Mandarin HF p Different 1
## 581 p22 Mandarin HH p Different 0
## 582 p22 Mandarin HL p Different 1
## 583 p22 Mandarin LF p Different 1
## 584 p22 Mandarin LH p Different 1
## 585 p22 Mandarin LL p Different 0
## 586 p22 Mandarin FF t Different 0
## 587 p22 Mandarin FH t Different 1
## 588 p22 Mandarin FL t Different 1
## 589 p22 Mandarin HF t Different 1
## 590 p22 Mandarin HH t Same 1
## 591 p22 Mandarin HL t Same 0
## 592 p22 Mandarin LF t Different 1
## 593 p22 Mandarin LH t Same 0
## 594 p22 Mandarin LL t Different 0
## 595 p23 Mandarin FF k Same 1
## 596 p23 Mandarin FH k Different 1
## 597 p23 Mandarin FL k Different 1
## 598 p23 Mandarin HF k Different 1
## 599 p23 Mandarin HH k Same 1
## 600 p23 Mandarin HL k Different 1
## 601 p23 Mandarin LF k Different 1
## 602 p23 Mandarin LH k Different 1
## 603 p23 Mandarin LL k Same 1
## 604 p23 Mandarin FF p Same 1
## 605 p23 Mandarin FH p Different 1
## 606 p23 Mandarin FL p Different 1
## 607 p23 Mandarin HF p Different 1
## 608 p23 Mandarin HH p Same 1
## 609 p23 Mandarin HL p Different 1
## 610 p23 Mandarin LF p Different 1
## 611 p23 Mandarin LH p Different 1
## 612 p23 Mandarin LL p Same 1
## 613 p23 Mandarin FF t Same 1
## 614 p23 Mandarin FH t Different 1
## 615 p23 Mandarin FL t Different 1
## 616 p23 Mandarin HF t Different 1
## 617 p23 Mandarin HH t Same 1
## 618 p23 Mandarin HL t Different 1
## 619 p23 Mandarin LF t Different 1
## 620 p23 Mandarin LH t Different 1
## 621 p23 Mandarin LL t Same 1
## 622 p24 Mandarin FF k Same 1
## 623 p24 Mandarin FH k Different 1
## 624 p24 Mandarin FL k Different 1
## 625 p24 Mandarin HF k Different 1
## 626 p24 Mandarin HH k Same 1
## 627 p24 Mandarin HL k Different 1
## 628 p24 Mandarin LF k Different 1
## 629 p24 Mandarin LH k Different 1
## 630 p24 Mandarin LL k Same 1
## 631 p24 Mandarin FF p Same 1
## 632 p24 Mandarin FH p Different 1
## 633 p24 Mandarin FL p Different 1
## 634 p24 Mandarin HF p Different 1
## 635 p24 Mandarin HH p Same 1
## 636 p24 Mandarin HL p Different 1
## 637 p24 Mandarin LF p Different 1
## 638 p24 Mandarin LH p Different 1
## 639 p24 Mandarin LL p Same 1
## 640 p24 Mandarin FF t Same 1
## 641 p24 Mandarin FH t Different 1
## 642 p24 Mandarin FL t Different 1
## 643 p24 Mandarin HF t Different 1
## 644 p24 Mandarin HH t Same 1
## 645 p24 Mandarin HL t Different 1
## 646 p24 Mandarin LF t Different 1
## 647 p24 Mandarin LH t Different 1
## 648 p24 Mandarin LL t Same 1
## 649 p25 Mandarin FF k Same 1
## 650 p25 Mandarin FH k Different 1
## 651 p25 Mandarin FL k Same 0
## 652 p25 Mandarin HF k Different 1
## 653 p25 Mandarin HH k Same 1
## 654 p25 Mandarin HL k Different 1
## 655 p25 Mandarin LF k Different 1
## 656 p25 Mandarin LH k Different 1
## 657 p25 Mandarin LL k Same 1
## 658 p25 Mandarin FF p Same 1
## 659 p25 Mandarin FH p Different 1
## 660 p25 Mandarin FL p Different 1
## 661 p25 Mandarin HF p Different 1
## 662 p25 Mandarin HH p Same 1
## 663 p25 Mandarin HL p Different 1
## 664 p25 Mandarin LF p Different 1
## 665 p25 Mandarin LH p Different 1
## 666 p25 Mandarin LL p Same 1
## 667 p25 Mandarin FF t Same 1
## 668 p25 Mandarin FH t Different 1
## 669 p25 Mandarin FL t Different 1
## 670 p25 Mandarin HF t Different 1
## 671 p25 Mandarin HH t Same 1
## 672 p25 Mandarin HL t Different 1
## 673 p25 Mandarin LF t Different 1
## 674 p25 Mandarin LH t Different 1
## 675 p25 Mandarin LL t Same 1
Run the model:
library(lme4)
## Loading required package: Matrix
contrast <- cbind (c(-1/2, +1/2))
colnames (contrast) <- c("-English+Mandarin")
my_data$language.group <- as.factor (my_data$language.group)
contrasts (my_data$language.group) <- contrast
modelAccuracy <- glmer (correct ~ language.group + (1 | participant), data = my_data, family = "binomial")
summary (modelAccuracy)
## Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
## Family: binomial ( logit )
## Formula: correct ~ language.group + (1 | participant)
## Data: my_data
##
## AIC BIC logLik deviance df.resid
## 291.4 304.9 -142.7 285.4 672
##
## Scaled residuals:
## Min 1Q Median 3Q Max
## -5.5413 0.1292 0.1805 0.2640 0.5795
##
## Random effects:
## Groups Name Variance Std.Dev.
## participant (Intercept) 1.13 1.063
## Number of obs: 675, groups: participant, 25
##
## Fixed effects:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 3.2643 0.3413 9.565 <2e-16 ***
## language.group-English+Mandarin 0.6560 0.5932 1.106 0.269
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Correlation of Fixed Effects:
## (Intr)
## lngg.gr-E+M 0.143
confint (modelAccuracy)
## Computing profile confidence intervals ...
## 2.5 % 97.5 %
## .sig01 0.5929067 1.847018
## (Intercept) 2.6823886 4.092366
## language.group-English+Mandarin -0.5219077 1.970285
Calculate separate probabilities for each language group:
#Mandarin
log_odds_mandarin <- 3.2643 + 0.5 * 0.6560
prob_mandarin <- exp(log_odds_mandarin) / (1 + exp(log_odds_mandarin))
prob_mandarin
## [1] 0.9732029
#English
log_odds_english <- 3.2643 - 0.5 * 0.6560
prob_english <- exp(log_odds_english) / (1 + exp(log_odds_english))
prob_english
## [1] 0.949612
Calculate the odds ratio of the language effect:
log_odds <- c(-0.5219077, 1.970285)
odds_ratios <- exp(log_odds)
print(odds_ratios)
## [1] 0.5933875 7.1727204
Plot for quantitative analysis
# Load required library
library(ggplot2)
# Create a data frame with the given data
data <- data.frame(
Language = c("English", "Mandarin"),
Average = c(prob_english, prob_mandarin)
)
# Create the bar plot
ggplot(data, aes(x = Language, y = Average, fill = Language)) +
geom_bar(stat = "identity") +
scale_fill_manual(values = c("skyblue", "orange")) +
labs(title = "Average Language Group Scores",
x = "Language",
y = "Average Score") +
theme_minimal()
Plot for exploratory observation
library(ggplot2)
data <- data.frame(
participant = paste0("p", 1:25),
language_group = c(rep("English", 12), rep("Mandarin", 13)),
correct = c(27, 27, 25, 23, 22, 23, 24, 25, 25, 27, 27, 26, 27, 27, 27, 27, 26, 25, 26, 26, 25, 18, 27, 27, 26),
incorrect = c(0, 0, 2, 4, 5, 4, 3, 2, 2, 0, 0, 1, 0, 0, 0, 0, 1, 2, 1, 1, 2, 9, 0, 0, 1)
)
english_data <- subset(data, language_group == "English")
mandarin_data <- subset(data, language_group == "Mandarin")
english_data$participant <- factor(english_data$participant, levels = unique(english_data$participant))
mandarin_data$participant <- factor(mandarin_data$participant, levels = unique(mandarin_data$participant))
ggplot(english_data, aes(x = participant, y = correct, fill = "Correct")) +
geom_bar(stat = "identity", position = "dodge") +
geom_bar(aes(y = -incorrect, fill = "Incorrect"), stat = "identity", position = "dodge") +
scale_fill_manual(values = c("Correct" = "darkolivegreen3", "Incorrect" = "pink2")) +
labs(title = "English",
x = "Participant",
y = "Count") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
theme(legend.position = "bottom")
ggplot(mandarin_data, aes(x = participant, y = correct, fill = "Correct")) +
geom_bar(stat = "identity", position = "dodge") +
geom_bar(aes(y = -incorrect, fill = "Incorrect"), stat = "identity", position = "dodge") +
scale_fill_manual(values = c("Correct" = "darkolivegreen3", "Incorrect" = "pink2")) +
labs(title = "Mandarin",
x = "Participant",
y = "Count") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
theme(legend.position = "bottom")