Upgrade to Pro — share decks privately, control downloads, hide ads and more …

一般化線形混合モデルの実践:気をつけたい3つのポイント / 2021-11-06 LMM and GLMM

Yu Tamura
November 06, 2021

一般化線形混合モデルの実践:気をつけたい3つのポイント / 2021-11-06 LMM and GLMM

2021年11月6日(土)名古屋大学大学院人文学研究科英語教育分野主催の連続公開講座『データサイエンス時代の英語教育』(2)における発表資料です。

Yu Tamura

November 06, 2021
Tweet

More Decks by Yu Tamura

Other Decks in Research

Transcript

  1. ҰൠԽઢܗࠞ߹Ϟσϧͷ
    ࣮ફ
    ؾΛ͚͍ͭͨ3ͭͷϙΠϯτ
    2021.11.06 ࿈ଓެ։ߨ࠲ʮσʔλαΠΤϯε࣌୅ͷݴޠڭҭʯୈ2ճݴޠڭҭݚڀͷ࣮ࡍ

    View full-size slide

  2. ͜Εͷʮվగ൛ʯͱ͍͏͔ʮൃల൛ʯͱ͍͏͔…

    View full-size slide

  3. • ҰൠԽઢܗࠞ߹ϞσϧΛ༻͍ͨ෼ੳ͸ීٴ͕ਐΜͩͱࢥΘΕ
    ΔҰํͰɼϋʔυϧ͸Ή͠Ζ͕͍͋ͬͯΔ͔΋


    • ϨϏϡʔ࿦จ͕ग़͖͍ͯͯΔ͚ΕͲ΋ɼ࣮ࡍͷ෼ੳͷաఔʹ
    ͸͍͔ͭ͘൑அ͕෼͔ΕΔ෦෼΋


    • ࠓճ͸ɼͦ͏ͨ͠෦෼Ͱ͜͜͸͓͓͖͍͑ͯͨ͞ͱ͍͏ϙ
    ΠϯτʹϑΥʔΧε


    • શฤʹΘͨͬͯlme4ύοέʔδʢBates et al, 2019ʣ࢖͏લ
    ఏͰ͢
    ͸͡Ίʹ
    4

    View full-size slide

  4. “[T]here is no single correct way to
    implement an LMM, and…the choices
    they [researchers] make during analysis
    will comprise one path, however
    justi
    f
    ied, amongst multiple alternatives. ”
    Meteyard & Davies (2020, pp.1–2)

    View full-size slide

  5. • ͸͡Ίʹ


    • ҰൠԽઢܗࠞ߹ޮՌϞσϧͱ͸


    • ݚڀऀͨͪͷײ͡Δෆ҆


    • ෼ੳͷํ๏


    • ෼ੳͷʢ݁Ռʣͷใࠂ


    • ࠶ݱੑͷ֬อ
    ͸͡Ίʹ
    3ͭͷϙΠϯτ
    6

    View full-size slide

  6. • ాଜ༞ʢͨΉΒΏ͏ʣ


    • ؔ੢େֶ֎ࠃޠֶ෦ʢ4೥໨ʣ


    • ઐ໳


    • ୈೋݴޠशಘʢओʹจ๏ʣ


    • ୈೋݴޠจॲཧ


    • झຯɿαοΧʔ؍ઓ


    • Rͷ͜ͱɿ݁ߏ޷͖ʢҰॹʹ͍Δͱ࣌ؒΛ๨Εͤͯ͘͞ΕΔʣ
    ࣗݾ঺հ
    7
    https://tam07pb915.wordpress.com/
    https://tamurayu.wordpress.com/

    View full-size slide

  7. ҰൠԽઢܗࠞ߹ޮՌ
    Ϟσϧͱ͸
    8

    View full-size slide

  8. • tݕఆɼ෼ࢄ෼ੳɼ୯ճؼɾॏճؼ -> ʢҰൠʣઢܗϞσϧ


    • ਖ਼ن෼෍Ҏ֎ͷ෼෍΁ͷ֦ு -> ҰൠԽઢܗϞσϧ


    • ݸਓࠩ౳Λߟྀ͍ͨ͠ ->ࠞ߹ޮՌϞσϧ


    • ܏͖and/or੾ยΛࢀՃऀ͝ͱɾ߲໨͝ͱʹਪఆ


    • ࢀՃऀ෼ੳͱ߲໨෼ੳΛ଍͠߹ΘͤͨΑ͏ͳ΋ͷ
    ҰൠԽઢܗࠞ߹ޮՌϞσϧͱ͸
    ઢܗʁҰൠԽʁࠞ߹ޮՌʁ
    9

    View full-size slide

  9. • LME (Linear Mixed-Effect)


    • ઢܗࠞ߹ޮՌϞσϧͱݺ͹ΕΔ΋ͷ


    • ਖ਼ن෼෍


    • GLMM (Generalized Linear Mixed-Effect Model)


    • ҰൠԽઢܗࠞ߹Ϟσϧͱݺ͹ΕΔ΋ͷ


    • ਖ਼ن෼෍Ҏ֎ʢϙΞιϯ෼෍ɼೋ߲෼෍ɼΨϯϚ෼෍,
    etc.ʣ
    ҰൠԽઢܗࠞ߹ޮՌϞσϧͱ͸
    LMEʁGLMMʁ
    10

    View full-size slide

  10. ࠞ߹ޮՌϞσϧͷಋೖ͸
    Gries (2021)ͷΠϯτϩ෦
    ෼͕؆ܿͰΘ͔Γ΍͍͢
    Gries, S. T. (2021). (Generalized Linear) Mixed-E
    ff
    ects
    Modeling: A Learner Corpus Example. Language Learning, 71,
    757

    798. https://doi.org/10.1111/lang.12448


    11

    View full-size slide

  11. ݚڀऀͨͪͷײ͡Δෆ҆
    12

    View full-size slide

  12. • खॱ΁ͷίϯηϯαε͕͚͍ܽͯΔ͜ͱ


    • ෼ੳͷͨΊͷτϨʔχϯά΍෼ੳɾ݁Ռͷղऍ΍ใࠂʹ͍ͭ
    ͯͷ໌֬ͳΨΠυϥΠϯͷෆ଍
    ݚڀऀͨͪͷײ͡Δෆ҆
    Meteyard & Davies (2020)
    13
    Best practice guidance for reporting LMMs

    View full-size slide

  13. ͜ͷ࿦จʹԊͬͯ࿩͠Α͏ͱࢥͬͯ
    ·͕ͨ͠ઌʹ΋ͬͱ༗ӹͳ·ͱΊΛ
    ͞Εͨํ͕…

    View full-size slide

  14. ໊ാ໨ઌੜͷnoteͷهࣄΈͳ͞ΜಡΜͰ͍ͩ͘͞…

    View full-size slide

  15. ෼ੳͷख๏
    17

    View full-size slide

  16. • ࢀՃऀ਺ɾ߲໨਺ͱݕఆྗ෼ੳ


    • Ԡ౴ม਺͸ͳʹʁ


    • આ໌ม਺͸ͳʹʁ


    • ݻఆޮՌ͸ʁ


    • มྔޮՌ͸ʁ


    • Ϟσϧͷ਍அ
    ෼ੳͷख๏
    ϙΠϯτ
    18

    View full-size slide

  17. • ʮαϯϓϦϯάɾϢχοτʯΛ૿΍͢ʢMeteyard & Ravies,
    2020)


    • “As a general rule of thumb, increasing the sample size at
    the highest level (i.e., sampling more groups) will do
    more to increase power than increasing the number of
    individuals in the groups. “ (Scherbaum & Ferreter, 2009,
    p.352)
    ෼ੳͷख๏
    ࢀՃऀ਺ɾ߲໨਺ͱݕఆྗ෼ੳ
    19

    View full-size slide

  18. ֶߍB
    Ϋϥε2 Ϋϥε3 Ϋϥε1 Ϋϥε2 Ϋϥε3
    ֶߍA
    Ϋϥε1
    ࢀՃऀ͕ωετ͍ͯ͠Δ৔߹͸্ͷϨϕϧΛͰ͖Δ
    ͚ͩ૿΍͠·͠ΐ͏

    View full-size slide

  19. • ࣮ݧܥͰ͋Ε͹ɼࢀՃऀ਺ͱ߲໨਺ͷֻ͚ࢉΛҙࣝ


    • ࢀՃऀؒͷ͹Β͖͕ͭେ͖͍->ࢀՃऀΛ૿΍͢


    • ߲໨ؒͷ͹Β͖͕ͭେ͖͍->߲໨਺Λ૿΍͢


    • มྔޮՌͷ෼ࢄΛใࠂ͢Δ͜ͱ͕େࣄͳཧ༝͸͜͜
    ෼ੳͷख๏
    ࢀՃऀ਺ɾ߲໨਺ͱݕఆྗ෼ੳ
    21

    View full-size slide




  20. • Ԡ౴ม਺ = ੾ย + ݻఆޮՌ + ݸਓࠩ + ߲໨ࠩ


    • ඞͣʮԠ౴ม਺͸XXXͰ͢ʯͱॻ͘


    • ͱ͘ʹ஫ҙ͍ͨ͠ͷ͸ϩδεςΟοΫճؼͷͱ͖


    • ਖ਼౴ɾޡ౴͸ਖ਼౴1ɼޡ౴0ͰΘ͔Γ΍͍͕͢…


    • preference taskͷΑ͏ͳͱ͖͸Ͳ͕ͬͪ0ͰͲ͕ͬͪ1͔໌ࣔత
    ʹهड़
    yi
    = β1
    + β2
    xi
    + ri
    + rj
    ෼ੳͷख๏
    Ԡ౴ม਺ʢresponse variableʣ͸ͳʹʁ
    22

    View full-size slide




  21. • Ԡ౴ม਺ = ੾ย + ݻఆޮՌ + ݸਓࠩ + ߲໨ࠩ


    • ඞͣʮઆ໌ม਺ʢݻఆޮՌʣ͸XXXͰ͢ʯͱॻ͘


    • ΧςΰϦม਺ͷίʔσΟϯάͷઆ໌͸ஸೡʹʢޙड़ʣ


    • Ͳͷํ๏ͰίʔσΟϯά͔ͨ͠


    • ਫ४ͷઃఆΛͲ͏ͨ͠ͷ͔


    • ݚڀ՝୊ʹج͍͍ͮͯΔ͔Ͳ͏͔
    yi
    = β1
    +β2
    xi
    +ri
    + rj
    ෼ੳͷख๏
    આ໌ม਺ʢexplanatory variableʣ͸ͳʹʁ
    23

    View full-size slide

  22. Hou (2021, Language and Cognition)
    Ԡ౴ม਺ͳʹ…
    p.481

    View full-size slide

  23. Hou (2021, Language and Cognition)
    ਫ४Ͳ͏ͳͬͯΔͷ…
    p.480

    View full-size slide

  24. Ϟσϧͷ਍அ
    DHARMaύοέʔδʢHartig, 2021ʣ
    26
    simulateResiduals(model,plot=T) %>% testResiduals()
    ৄ͘͠͸͜ͷϖʔδɿhttps://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html

    View full-size slide

  25. ͲͷΑ͏ʹใࠂ͢΂͖͔
    27

    View full-size slide

  26. • ෼ੳʹ༻͍ͨ΋ͷ


    • ม਺ͷίʔσΟϯά΍த৺Խ


    • ϞσϧΛཱͯͨํ๏


    • දͱͯ͠ͷใࠂ
    ࿦จͰͷใࠂͷ࢓ํ
    ϙΠϯτ
    28

    View full-size slide

  27. • ιϑτ΢ΣΞʢRͷόʔδϣϯ΋ؚΊͯʣ


    • ύοέʔδ


    • όʔδϣϯΛඞؚͣΊΔ


    • ԿΛ͢ΔͨΊʹͲͷύοέʔδΛ༻͍ͨͷ͔
    ෼ੳʹ༻͍ͨ΋ͷ
    29

    View full-size slide

  28. ෼ੳʹ༻͍ͨ΋ͷ
    RͳΒsessionInfo()ؔ਺͕ศར
    30

    View full-size slide

  29. • ྫ1ɿcontrasts(dat$freq) <- contr.sum(2)


    • ྫ2ɿifelse(dat$freq == “low”, -0.5, 0.5) -> dat$freq_c


    • RͰ͸σϑΥϧτͩͱΞϧϑΝϕοτॱͰਫ४͕ܾ·ΔͷͰɼඞཁͰ͋Ε
    ͹factor()ؔ਺Ͱࢦఆ
    ม਺ͷίʔσΟϯά΍த৺Խ
    ίʔσΟϯάʹ͍ͭͯ
    31
    dat$freq<-factor(dat$condition, levels = c(“low","high"))
    Schad et al. (2020)

    View full-size slide

  30. ίʔσΟϯάํ๏ͷൺֱ
    Schad et al. (2020, p.15)
    32
    ੺࿮Ͱғͬͨ෦෼͕RͰcontr.treament(4)ͷΑ͏ʹೖྗͨ͠ͱ͖ʹग़ͯ͘Δ෦෼

    View full-size slide

  31. ίʔσΟϯάํ๏ͷൺֱ
    Schad et al. (2020, p.15)
    33

    View full-size slide

  32. • ݸͷਫ४͕͋Δͱͨ͠Βɼ ݸͷൺֱ͔͠Ͱ͖ͳ͍͜ͱʹ஫ҙʢ1͕ͭ
    ੾ยʹͳΔͷͰʣ


    • ԾઆͱηοτͰߟ͑Δͷ͕ॏཁʢSchad et al. 2020ʣ


    • ͱ͘ʹ3ਫ४Ҏ্ͷ৔߹͸ݚڀ՝୊ʹরΒ͠߹ΘͤͯɼͲͷਫ४ͱͲͷਫ४
    Λൺֱ͢Δ͔Λߟ͑Δ


    • ౷੍܈ʢϕʔεϥΠϯ৚݅ʣͱ2ͭҎ্ͷ࣮ݧ܈ʢ࣮ݧ৚݅ʣΛൺ΂͍ͨ -
    > dummy coding


    • 3ͭ͋Δதͷ͋Δ܈ʢ৚݅ʣͱଞͷ2ͭͷ܈ʢ৚݅ʣͷฏۉΛൺ΂͍ͨ ->
    sum coding
    k k − 1
    ม਺ͷίʔσΟϯά΍த৺Խ
    ίʔσΟϯάʹ͍ͭͯ
    34

    View full-size slide

  33. • ަޓ࡞༻ͷ͋ΔϞσϧͷέʔε


    • 2*2ͷ৔߹ͷओޮՌ͕Έ͍ͨ -> sum contrasts͕Ϛετ


    • μϛʔίʔσΟϯά͸ยํͷཁҼͷθϩʹͳͬͯΔਫ४ͷ
    ͱ͖ͷsimple effectʹͳͬͯ͠·͏
    ม਺ͷίʔσΟϯά΍த৺Խ
    ίʔσΟϯάʹ͍ͭͯ
    35
    sum contrast treatment contrast

    View full-size slide

  34. • 2ཁҼҎ্Ͱަޓ࡞༻ʹڵຯ͕͋Γɼ͋ΔཁҼͷ୯७ओޮՌ͕ݟ
    ͍ͨ


    1. sum contrastsͰަޓ࡞༻Λ֬ೝ


    2. A: dummy codingʹ੾Γସ͑ͯ୯७ޮՌͷ֬ೝʢ3ཁҼҎ্
    Ͱྡ઀ͯ͠Δਫ४ͷൺֱͳΒrepeated coding΋ʣ


    2. B: emmeansύοέʔδΛ࢖ͬͯԼҐݕఆ


    ม਺ͷίʔσΟϯά΍த৺Խ
    ίʔσΟϯάʹ͍ͭͯ
    36
    emmeans(model, pairwise~ཁҼA|ཁҼB)$contrastsʢཁҼBͷͦΕͧΕͷਫ४ͰͷཁҼAͷਫ४ؒൺֱʣ
    emmeans(model, pairwise~ཁҼB|ཁҼA)$contrastsʢཁҼAͷͦΕͧΕͷਫ४ͰͷཁҼBͷਫ४ؒൺֱʣ

    View full-size slide

  35. • ίʔσΟϯάʹؔͯ͠ࢀߟʹͳΔ΋ͷ


    • Shravan Vasishthͷಈըɿhttps://youtu.be/hD2XjoP5WBI


    • ΢Σϒϖʔδ


    • Coding categorical predictor variables in factorial designs


    • CODING SYSTEMS FOR CATEGORICAL VARIABLES IN REGRESSION
    ANALYSIS


    • ࿦จɿSchad, D. J., Vasishth, S., Hohenstein, S., & Kliegl, R. (2020). How
    to capitalize on a priori contrasts in linear (mixed) models: A tutorial.
    Journal of Memory and Language, 110, 104038. https://doi.org/10.1016/
    j.jml.2019.104038
    ม਺ͷίʔσΟϯά΍த৺Խ
    ίʔσΟϯάʹ͍ͭͯ
    37

    View full-size slide

  36. • ࿈ଓม਺Ͱ͋Ε͹த৺Խ౳Λͨ͠ͷ͔


    • த৺ԽͷࡍʹͳʹΛج४ʹͨ͠ͷ͔ʁʢBrauer & Curtin, 2018)


    • શମฏۉʢࢀՃऀؒʣʁूஂฏۉʢࢀՃऀ಺ʣʁ


    • Longܕͷσʔλͷࡍʹ͸த৺Խʹ஫ҙ


    • ख़ୡ౓ͷείΞͳͲɼ1ਓʹ͖ͭ1ͭͷ஋͔͠ͳ͍৔߹ɼ෼ࢄ͕
    ຊདྷͷ஋ΑΓখ͘͞ͳͬͯ͠·͏



    ม਺ͷίʔσΟϯά΍த৺Խ
    த৺Խʹ͍ͭͯ
    38

    View full-size slide

  37. • maximal model͔Βελʔτͯ͠backward stepwiseͰ΍Γ
    ·ͨ͠


    • null model͔Βελʔτͯ͠forward stepwiseͰ΍Γ·ͨ͠
    ϞσϧΛཱͯͨํ๏
    39
    ͜Ε͚ͩͰ͸ෆे෼

    View full-size slide

  38. • ʮBarr et al. (2013)ʹैͬͯ࠷େϞσϧΛཱ͕ͯͨऩଋ͠ͳ
    ͔ͬͨͷͰɼ୯७Խͯ͠ऩଋͨ͠ϞσϧΛ࠾༻ͨ͠ɻʯ
    ϞσϧΛཱͯͨํ๏
    Α͋͘Δ΍ͭ
    40
    Ұ൪஌Γ͍ͨͷ͸Ͳ͏΍ͬͯϞσϧΛ
    ൺֱͨ͠ͷ͔ͳͷʹɼͦͷաఔ͸ҋͷ
    தͰ͜͏͍͏ਓ͍͍ͨͯσʔλ΋ίʔ
    υ΋ग़͞ͳ͍

    View full-size slide

  39. • ྫͱͯ͠ཁҼAͱཁҼBͷओޮՌͱަޓ࡞༻ͷσβΠϯΛߟ͑Δ


    • (1 + A*B | subject) + (1 + A*B | item)


    • ͔͜͜ΒͲ͏΍ͬͯ….ʁ


    • Մೳੑ1: (1 + A + B | subject) + (1 + A*B | item)


    • Մೳੑ2: (1 + A*B | subject) + (1 + A + B | item)


    • Մೳੑ3: (1 + A | subject) + (1 + A*B | item)


    • Մೳੑ4: (1 + B | subject) + (1 + A*B | item)


    • Մೳੑ5: (1 + A*B | subject) + (1 + A | item)


    • Մೳੑ6: (1 + A*B | subject) + (1 + B | item)
    ϞσϧΛཱͯͨํ๏
    ҋͷதͰى͜Δ͜ͱͷ૝૾
    41
    ΋͠ԾʹՄೳੑ1ͱՄ
    ೳੑ2ͷ྆ํ͕ऩଋ
    ͨ͠ͱͨ͠ΒɼͲ͏
    ΍ͬͯબΜͰΔͷʁ

    View full-size slide

  40. ʮBarr et al. (2013)ʹैͬͯ࠷େϞσϧΛཱ͕ͯͨ
    ऩଋ͠ͳ͔ͬͨͷͰɼ୯७Խͯ͠ऩଋͨ͠Ϟσϧ
    Λ࠾༻ͨ͠ɻৄ͍͠Ϟσϧબ୒ͷखॱʹ͍ͭͯ
    ͸ɼSupplementary MaterialΛࢀরͷ͜ͱɻʯ
    ͜ΕͰΑ͘ͳ͍Ͱ͔͢ʁ

    View full-size slide

  41. “[W]hile the maximal model indeed
    performs well as far as Type I error rates
    were concerned, power decreases
    substantially with model complexity.


    Matuschek et al. (2017, pp.310

    311)

    View full-size slide

  42. LMEͷ৔߹͸lmerTestύοέʔδͷstepؔ
    ਺ͰϞσϧΛ୯७Խͯ͘͠Ε·͕͢ɼͦΕ
    ͳΒstepؔ਺࢖͍·ͨ͠ͱॻ͖·͠ΐ͏ɻ
    ͦͷ৔߹Ͱ΋ࣗ෼ͷखͰ୯७Խͨ͠৔߹ͱҰக͢Δ͔νΣοΫ͢Δͷ͕๬·͍͠ʢݸਓతҙݟʣ

    View full-size slide

  43. 1. ࠷େϞσϧΛߏஙʢऩଋ͠ͳͯ͘΋OKʣ


    2. ͦͷϞσϧͷมྔޮՌʹ͍ͭͯओ੒෼෼ੳ


    1. lme4::rePCA(maxmodel)%>%summary


    2. “Proportion of Variance”͕θϩʢ·ͨ͸ݶΓͳ͘θϩʹ͍ۙ஋ʣͷྻ͕͋Δ͔νΣοΫ


    3. มྔޮՌʹ͓͚Δ੾ยͱ܏͖ͷ૬ؔύϥϝʔλΛআ֎ͯ͠࠶౓ओ੒෼෼ੳ


    • (1+A | subject)ɿ૬ؔύϥϝʔλ͋Γ


    • (1+A || subject)ɿ૬ؔύϥϝʔλͳ͠


    4. มྔޮՌͷ෼ࢄΛνΣοΫͯ͠ɼ஋ͷ௿͍ཁҼΛݮΒͯ͠ϞσϧΛߏங


    5. anovaؔ਺Ͱ໬౓ൺݕఆʢMatuschek et al., 2017Ͱ͸ ͰγϛϡϨʔγϣϯʣ


    1. or Ͱ༗ҙ -> ΑΓෳࡶͳϞσϧʢཁҼͷଟ͍ํʣΛબ୒


    2. or Ͱ༗ҙͰ͸ͳ͍ ->෼ࢄͷ௿͍ཁҼΛݮΒͯ͠Ϟσϧߏஙˍ໬౓ൺݕఆ


    6. બ͹ΕͨϞσϧʹ૬ؔύϥϝʔλ௥Ճͨ͠΄͏͕͍͍͔໬౓ൺݕఆ
    αLRT
    = .20
    αLRT
    = .10 αLRT
    = .20
    αLRT
    = .10 αLRT
    = .20
    ϞσϧΛཱͯͨํ๏
    มྔޮՌͷܾఆखॱʢBates et al., 2015)
    45
    ೔ຊޠͰ͸৽ҪɾRoland (2016)ͷ4.2અʹղઆ͕͋Γ·͢
    lmer()ͷ৔߹͸໬౓ൺݕఆ͢ΔͷͰREFL=FͰ࠷໬ਪఆ -> ࠷ޙʹREML=Tʹ໭͢

    View full-size slide

  44. 1. ϥϯμϜ੾ยͷΈͷϞσϧΛߏங


    2. ϥϯμϜ܏͖Λ1ͭͣͭೖΕͯAICΛ࠷΋Լ͛Δ΋ͷΛ࢒͢


    3. ͞ΒʹϥϯμϜ܏͖Λ௥Ճͯ͠AICΛ࠷΋΋ͷΛ࢒͢


    4. AIC͕ͦΕҎ্Լ͕Βͳ͘ͳΔ·Ͱ௥Ճͯ͠ετοϓ


    • AICʹΑΔϞσϧબ୒͸ωετͯ͠ͳ͍Ϟσϧಉ࢜ͷൺֱ΋ෳ਺Ϟσϧͷ
    ൺֱ΋Մೳͱ͍͏ϝϦοτ


    • ͨͩ͠αϯϓϧαΠζ͕খ͍͞ͱAIC͸”too anti-conservative”ʹͳΔة
    ݥੑ΋͋ΔʢMatuschek et al., 2017, p.313ʣ
    ϞσϧΛཱͯͨํ๏
    มྔޮՌͷܾఆखॱʢforward approachʣ
    46
    ୳ࡧతͳΞϓϩʔνͳͲɼݻఆޮՌͷ਺͕ଟ͍৔߹ʹ͸Ϟσϧ
    ϑΟοτ͕޲্͢Δ΋ͷΛೖΕΔͱ͍͏ํ๏΋͋Δ
    ۩ମతͳํ๏͸Murakami (2016)ͷSupplementary Materials͕ࢀߟʹͳΓ·͢

    View full-size slide

  45. • “Model failed to converge…”ܥ΋”boundary (singular)
    f
    it:
    see ?isSingular”΋͖͞΄ͲͷཁྖͰมྔޮՌΛ୯७Խ͢Ε
    ͹ղܾՄೳ
    ϞσϧΛཱͯͨํ๏
    ϞσϧͷऩଋΤϥʔ໰୊
    47

    View full-size slide

  46. ϞσϧΛཱͯͨํ๏
    Ϟσϧબ୒ͷϓϩηεͷใࠂʢMeteyard & Davies, 2020ʣ
    48

    View full-size slide

  47. • ਪఆ஋ʢEstimateʣ


    • ඪ४ޡࠩʢSEʣ


    • ౷ܭྔʢz஋·ͨ͸t஋ʣ


    • p஋


    • มྔޮՌͷඪ४ภࠩ


    • σʔλϙΠϯτ਺


    • Ϟσϧࣜ
    ใࠂ͞ΕΔ΂͖͜ͱ
    49

    View full-size slide

  48. දͱͯ͠ใࠂ͞ΕΔ΂͖͜ͱ
    50
    มྔޮՌͷඪ४ภࠩ
    σʔλϙΠϯτ਺
    ਪఆ஋
    ਪఆ஋ͷඪ४ภࠩ
    ౷ܭྔ
    p஋
    Ϟσϧࣜ

    View full-size slide

  49. ࢲ͕͍ͭ΋ਅࣅ͢Δ΍ͭ
    Linck & Cunnings (2015)

    View full-size slide

  50. ࢲ͕աڈʹ࡞ͬͨ΋ͷ
    Tamura et al. (2019)

    View full-size slide

  51. Meteyard & Davies
    (2020) Supplementary
    Material
    ΋͏Ұͭͷྫ

    View full-size slide

  52. • ࠷΋؆୯ͳํ๏͸performanceύοέʔδʢLüdecke et al.,
    2021ʣͷར༻


    • r2(model)


    • conditional R2: ݻఆޮՌʴมྔޮՌ


    • marginal R2: ݻఆޮՌ෦෼ͷΈ


    • piecewiseSEM::rsquared()Ͱ΋ܭࢉՄʢ˞R 4.0.0Ҏ্ͷΈ
    ରԠʣ
    ใࠂ͞ΕΔ΂͖͜ͱ
    R2ͷࢉग़ํ๏
    54
    performanceύοέʔδʹ͸ଞʹ΋৭ʑؔ਺͋ΔͷͰ৮ͬͯΈ͍ͯͩ͘͞

    View full-size slide

  53. • con
    f
    int.merMod()ؔ਺Λར༻ʢlme4ύοέʔδ͕ϩʔυ͞
    ΕͯͨΒcon
    f
    int()Ͱಉ͡Ͱ͕͢statsύοέʔδͷ΋ͷͰ͸
    ͳ͍͜ͱΛ໌ࣔͯ͠·͢ʣ


    • ݻఆޮՌͷ৴པ۠ؒͷΈ -> ”parm = “beta_”Ͱࢦఆ
    ใࠂ͞ΕΔ΂͖͜ͱ
    ਪఆ஋ͷ৴པ۠ؒ
    55
    ਪఆ஋ͱ95%৴པ۠ؒΛ·ͱΊͯදʹ͢Δίʔυ͸͜ͷεϨου͕ࢀߟʹͳΓ·͢

    View full-size slide

  54. ใࠂ͞ΕΔ΂
    ͖͜ͱ
    • sjPlot::tab_model()


    • tab_model(model,
    show.stat = T, show.est =
    T, dv.labels = “Accuracy”)


    • ৴པ۠ؒͷਪఆํ๏͕
    con
    f
    int()ؔ਺ͷσϑΥϧ
    τʢpro
    f
    ileʣͱҧ͏
    ʢͬͪ͜͸Waldʣ
    ศརͳؔ਺
    By-subject slope
    By-item slope
    Φοζൺ͸
    f
    ixef(model)%>%exp()Ͱ΋ग़ͤ·͢
    By-subject intercept
    Within-group variance
    By-item intercept
    ࢀߟɿhttps://strengejacke.github.io/sjPlot/articles/tab_model_estimates.html
    ࢀՃऀͷ੾ยͱ܏͖ͷ૬ؔ
    ߲໨ͷ੾ยͱ܏͖ͷ૬ؔ
    ڃ಺૬ؔ܎਺

    View full-size slide

  55. • sjPlot::plot_model()
    sjPlotύοέʔδ͸ඳը΋͍͚Δ
    57
    ࢀߟɿhttps://strengejacke.wordpress.com/2017/10/23/one-function-to-rule-them-all-visualization-of-regression-models-in-rstats-w-sjplot/
    ࢀߟɿhttps://cran.r-project.org/web/packages/sjPlot/vignettes/plot_interactions.html

    View full-size slide

  56. ࠶ݱੑͷ֬อ
    58

    View full-size slide

  57. σʔλɼίʔυɼग़ྗ
    ݁Ռͷఏग़Λڧ͘ਪ঑
    59

    View full-size slide

  58. • ʢҰൠԽʣઢܗࠞ߹ޮՌϞσϧʹΑΔ෼ੳ͸෼ੳͷϓϩηε
    ͕ඇৗʹෳࡶ


    • ͜ͱ͹Ͱઆ໌͞ΕΔΑΓίʔυͱग़ྗݟͤͯ΋Β͏΄͏͕ཧ
    ղ͕༰қ


    • ίʔυ͚ͩ͡Όͳ͘ग़ྗ΋ݟͤͯ΄͍͠ʢίʔυ͚ͩͩͱ࣮
    ࡍͷ෼ੳͰͲ͏ͳͬͨͷ͔ҋͷதͳͷͰʣ


    • ʮ͑ɼ͡Ό͋εΫϦϓτͱRͷίϯιʔϧը໘Λίϐϖͯ͠
    ςΩετϑΝΠϧͱ͔Ͱ…?ʯ->͍΍͋͋͋͋͋͋͋͋͋͋͋
    ෼ੳͷʮཪଆʯΛݟͤͯ
    60

    View full-size slide

  59. R markdown


    ࢖͍·͠ΐ͏
    ೔ຊޠͰॻ͔Εͨ৘ใ΋΢Σϒʹΰϩΰϩస͕ͬͯ·͢ʂ
    61

    View full-size slide

  60. 5೥લͷࣗ෼φΠεʂ

    View full-size slide

  61. ւ֎ͷֶज़ࢽͰ͸…

    View full-size slide

  62. ౤ߘنఆΛΈΔͱ…
    64

    View full-size slide

  63. ౤ߘنఆΛΈΔͱ…
    65

    View full-size slide

  64. ࠃ಺Ͱ͸…

    View full-size slide

  65. • ओཁࠃ಺ࢽͷ౤ߘنఆʹ͸σʔλͷެ։౳ʹؔ͢Δهड़ͳ͠


    !Language Education and Technology


    !Annual Review of English Language Education in Japan


    !JACET Journal


    !Studies in Language Sciences


    !Second Language
    ࠃ಺ࢽͰ΋౤ߘنఆͷ੔උΛ
    67

    View full-size slide

  66. • ʮࢴ෯ͷ౎߹ʯ͸΋͏௨༻͠ͳ͍


    • શ෦ग़͢


    • ʮಗ໊Խʯͱ͍͏໰୊͸͋Δ͕…
    ࠃ಺ࢽͰ΋౤ߘنఆͷ੔උΛ
    68

    View full-size slide

  67. Open Science
    FrameworkʢOSFʣ


    ͕ศར
    69

    View full-size slide

  68. • https://osf.io/


    • ݚڀϓϩδΣΫτͷϚωʔδϝϯτʹศརͳػೳ͕࣮૷͞Ε
    ͨ΢ΣϒαΠτ


    • σʔλɾϚςϦΞϧͷެ։


    • ݚڀͷࣄલొ࿥


    • ϓϨϓϦϯτͷެ։


    • ݚڀऀಉ࢜ͷίϥϘʹ΋˕
    OSFͱ͸
    70

    View full-size slide

  69. OSFͰσʔλɾϚςϦΞϧͷެ։
    ಗ໊ͷURLΛ࡞੒͢Δ͜ͱ͕Մೳ
    71
    ๭ࢽ

    View full-size slide

  70. OSFͰσʔλɾϚςϦΞϧͷެ։
    ಗ໊ͷURLΛ࡞੒͢Δ͜ͱ͕Մೳ
    72
    ͜͜ʹνΣο
    ΫΛೖΕΔ

    View full-size slide

  71. OSFͰσʔλɾϚςϦΞϧͷެ։
    ಗ໊ͷURLΛ࡞੒͢Δ͜ͱ͕Մೳ
    73

    View full-size slide

  72. σʔλɼίʔυɼग़ྗ
    ݁ՌΛग़ͤ͹৭ʑղܾ
    74

    View full-size slide

  73. • ʮϞσϦϯάʯͰ͋ΔҎ্“single correct way”͸ͳ͍


    • ݚڀ՝୊ʹ͋ͬͨํ๏Λબ୒͢Δ͜ͱ


    • બ୒ͨ͠ํ๏΍෼ੳͷաఔΛ໌Β͔ʹ͢Δ͜ͱ


    • σʔλɾίʔυɾग़ྗ݁Ռͷڞ༗Λ͢Δ͜ͱ
    ·ͱΊ
    76

    View full-size slide

  74. • Barr, D. J., Levy, R., Scheepers, C., and Tily, H. J. (2013). Random effects structure for con
    f
    irmatory hypothesis testing: Keep it maximal.
    Journal of memory and language, 68(3), 255

    278.


    • Bates, D., Kliegl, R., Vasishth, S., & Baayen, H. (2015). Parsimonious Mixed Models. https://arxiv.org/abs/1506.04967v2


    • Brauer, M., & Curtin, J. J. (2018). Linear mixed-effects models and the analysis of nonindependent data: A uni
    f
    ied framework to analyze
    categorical and continuous independent variables that vary within-subjects and/or within-items. Psychological Methods, 23(3), 389

    411.
    https://doi.org/10.1037/met0000159


    • Brysbaert, M., & Stevens, M. (2018). Power Analysis and Effect Size in Mixed Effects Models: A Tutorial. Journal of Cognition, 1(1), 9. https://
    doi.org/10.5334/joc.10


    • Burnham, K. P., & Anderson, D. R. (2004). Multimodel Inference: Understanding AIC and BIC in Model Selection. Sociological Methods &
    Research, 33(2), 261

    304. https://doi.org/10.1177/0049124104268644


    • Frossard, J., & Renaud, O. (2019). Choosing the correlation structure of mixed effect models for experiments with stimuli. https://arxiv.org/
    abs/1903.10766v3


    • Gries, S. T. (2021). (Generalized Linear) Mixed-Effects Modeling: A Learner Corpus Example. Language Learning, 71(3), 757

    798. https://
    doi.org/10.1111/lang.12448


    • Hou, X. (2021). Learning two syntactic constructions simultaneously: A case of overshadowing. Language and Cognition, 13(3), 467

    493.
    https://doi.org/10.1017/langcog.2021.10


    • Matuschek, H., Kliegl, R., Vasishth, S., Baayen, H., & Bates, D. (2017). Balancing Type I error and power in linear mixed models. Journal of
    Memory and Language, 94, 305

    315. https://doi.org/10.1016/j.jml.2017.01.001


    • Meteyard, L., & Davies, R. A. I. (2020). Best practice guidance for linear mixed-effects models in psychological science. Journal of Memory
    and Language, 112, 104092. https://doi.org/10.1016/j.jml.2020.104092


    • Murakami, A. (2016). Modeling Systematicity and Individuality in Nonlinear Second Language Development: The Case of English
    Grammatical Morphemes: Modeling Individual Nonlinear Development. Language Learning, 66(4), 834

    871. https://doi.org/10.1111/lang.12166


    • RPubs—Reduction of Complexity of Linear Mixed Models with Double-Bar Syntax. (n.d.). Retrieved November 3, 2021, from https://
    rpubs.com/Reinhold/22193


    • RPubs—The Correlation Parameter in the Random Effects of Mixed Effects Models. (n.d.). Retrieved November 3, 2021, from https://
    rpubs.com/yjunechoe/correlationsLMEM


    • Schad, D. J., Vasishth, S., Hohenstein, S., & Kliegl, R. (2020). How to capitalize on a priori contrasts in linear (mixed) models: A tutorial.
    Journal of Memory and Language, 110, 104038. https://doi.org/10.1016/j.jml.2019.104038


    • Scherbaum, C. A., & Ferreter, J. M. (2009). Estimating Statistical Power and Required Sample Sizes for Organizational Research Using
    Multilevel Modeling. Organizational Research Methods, 12(2), 347

    367. https://doi.org/10.1177/1094428107308906


    • Should we
    f
    it maximal linear mixed models? | R-bloggers. (2014, November 25). https://www.r-bloggers.com/2014/11/should-we-
    f
    it-maximal-
    linear-mixed-models/


    • ৽Ҫֶ, & Roland D. (2016). ݴޠཧղݚڀʹ͓͚Δ؟ٿӡಈσʔλٴͼಡΈ࣌ؒσʔλͷ౷ܭ෼ੳ. ౷ܭ਺ཧ, 64(2), 201

    231.
    ࢀߟจݙ
    77

    View full-size slide