Mixed models (aka multilevel or hierarchical models) are statistical models containing both fixed- and random-effects terms. They are useful when multiple measurements exist for each unit of observation (e.g., participant or item), or for hierarchical data. Linear mixed models (LMMs) are used for normally distributed dependent variables, generalized linear mixed models (GLMMs) are applicable to other distributions (e.g., binomial data).
Mixed models extend ordinary linear, ANOVA, or generalized linear models and have only relatively recently been introduced to psychology . They allow for the modeling of dependency structures in the data that are difficult to handle with ordinary linear or generalized linear models such as repeated measurements by the same individual (e.g., allowing repeated-measures logistic regressions) or hierarchical data structures such as participants blocked in classes or sessions. Furthermore, they enable the modeling of multiple independent random effects simultaneously, such as participant and item effects, unifying so-called F1 and F2 analysis. Together with David Kellen, I have written an introductory chapter to mixed models. Further information on how to specify mixed models for experimental designs are given by Barr and colleagues and arguments for considering both participants and items simultaneously are given by Judd et al. .
The reference package for estimating mixed models in the statistical programming language R is lme4. A technical introduction to the models estimated by lme4 can be found here. I have developed the afex package which complements the functionality of lme4, for example by obtaining *p*-values for effects in mixed models.
References
{881472:QH8BAFX5};{881472:STGUHGIT},{881472:5MTEP9J7};{881472:TMF23CPM};{881472:FX58QMNP}
apa
asc
0
88
%7B%22status%22%3A%22success%22%2C%22updateneeded%22%3Afalse%2C%22instance%22%3A%22zotpress-5f4f95fcdb8fb1befa3fa0b96f07f843%22%2C%22meta%22%3A%7B%22request_last%22%3A0%2C%22request_next%22%3A0%2C%22used_cache%22%3Atrue%7D%2C%22data%22%3A%5B%7B%22key%22%3A%22FX58QMNP%22%2C%22library%22%3A%7B%22id%22%3A881472%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22R%20Core%20Team%22%2C%22parsedDate%22%3A%222022%22%2C%22numChildren%22%3A0%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3ER%20Core%20Team.%20%282022%29.%20%3Ci%3ER%3A%20A%20Language%20and%20Environment%20for%20Statistical%20Computing%3C%5C%2Fi%3E.%20R%20Foundation%20for%20Statistical%20Computing.%20%3Ca%20href%3D%27http%3A%5C%2F%5C%2Fwww.R-project.org%5C%2F%27%3Ehttp%3A%5C%2F%5C%2Fwww.R-project.org%5C%2F%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22book%22%2C%22title%22%3A%22R%3A%20A%20Language%20and%20Environment%20for%20Statistical%20Computing%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22name%22%3A%22R%20Core%20Team%22%7D%5D%2C%22abstractNote%22%3A%22%22%2C%22date%22%3A%222022%22%2C%22language%22%3A%22%22%2C%22ISBN%22%3A%223-900051-07-0%22%2C%22url%22%3A%22http%3A%5C%2F%5C%2Fwww.R-project.org%5C%2F%22%2C%22collections%22%3A%5B%22FGUTAB8G%22%2C%224TRVT3PR%22%5D%2C%22dateModified%22%3A%222022-10-15T15%3A07%3A15Z%22%7D%7D%2C%7B%22key%22%3A%22QH8BAFX5%22%2C%22library%22%3A%7B%22id%22%3A881472%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Baayen%20et%20al.%22%2C%22parsedDate%22%3A%222008%22%2C%22numChildren%22%3A1%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3EBaayen%2C%20H.%2C%20Davidson%2C%20D.%20J.%2C%20%26amp%3B%20Bates%2C%20D.%20%282008%29.%20Mixed-effects%20modeling%20with%20crossed%20random%20effects%20for%20subjects%20and%20items.%20%3Ci%3EJournal%20of%20Memory%20and%20Language%3C%5C%2Fi%3E%2C%20%3Ci%3E59%3C%5C%2Fi%3E%284%29%2C%20390%26%23x2013%3B412.%20%3Ca%20href%3D%27https%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1016%5C%2Fj.jml.2007.12.005%27%3Ehttps%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1016%5C%2Fj.jml.2007.12.005%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22journalArticle%22%2C%22title%22%3A%22Mixed-effects%20modeling%20with%20crossed%20random%20effects%20for%20subjects%20and%20items%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Harald%22%2C%22lastName%22%3A%22Baayen%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22D.J.%22%2C%22lastName%22%3A%22Davidson%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Douglas%22%2C%22lastName%22%3A%22Bates%22%7D%5D%2C%22abstractNote%22%3A%22This%20paper%20provides%20an%20introduction%20to%20mixed-effects%20models%20for%20the%20analysis%20of%20repeated%20measurement%20data%20with%20subjects%20and%20items%20as%20crossed%20random%20effects.%20A%20worked-out%20example%20of%20how%20to%20use%20recent%20software%20for%20mixed-effects%20modeling%20is%20provided.%20Simulation%20studies%20illustrate%20the%20advantages%20offered%20by%20mixed-effects%20analyses%20compared%20to%20traditional%20analyses%20based%20on%20quasi-F%20tests%2C%20by-subjects%20analyses%2C%20combined%20by-subjects%20and%20by-items%20analyses%2C%20and%20random%20regression.%20Applications%20and%20possibilities%20across%20a%20range%20of%20domains%20of%20inquiry%20are%20discussed.%22%2C%22date%22%3A%222008%22%2C%22language%22%3A%22%22%2C%22DOI%22%3A%2210.1016%5C%2Fj.jml.2007.12.005%22%2C%22ISSN%22%3A%22%22%2C%22url%22%3A%22%22%2C%22collections%22%3A%5B%22TIIGTD6N%22%5D%2C%22dateModified%22%3A%222017-02-26T21%3A44%3A07Z%22%7D%7D%2C%7B%22key%22%3A%22TMF23CPM%22%2C%22library%22%3A%7B%22id%22%3A881472%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Judd%20et%20al.%22%2C%22parsedDate%22%3A%222012%22%2C%22numChildren%22%3A1%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3EJudd%2C%20C.%20M.%2C%20Westfall%2C%20J.%2C%20%26amp%3B%20Kenny%2C%20D.%20A.%20%282012%29.%20Treating%20stimuli%20as%20a%20random%20factor%20in%20social%20psychology%3A%20A%20new%20and%20comprehensive%20solution%20to%20a%20pervasive%20but%20largely%20ignored%20problem.%20%3Ci%3EJournal%20of%20Personality%20and%20Social%20Psychology%3C%5C%2Fi%3E%2C%20%3Ci%3E103%3C%5C%2Fi%3E%281%29%2C%2054%26%23x2013%3B69.%20%3Ca%20href%3D%27https%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1037%5C%2Fa0028347%27%3Ehttps%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1037%5C%2Fa0028347%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22journalArticle%22%2C%22title%22%3A%22Treating%20stimuli%20as%20a%20random%20factor%20in%20social%20psychology%3A%20A%20new%20and%20comprehensive%20solution%20to%20a%20pervasive%20but%20largely%20ignored%20problem.%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Charles%20M.%22%2C%22lastName%22%3A%22Judd%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Jacob%22%2C%22lastName%22%3A%22Westfall%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22David%20A.%22%2C%22lastName%22%3A%22Kenny%22%7D%5D%2C%22abstractNote%22%3A%22%22%2C%22date%22%3A%222012%22%2C%22language%22%3A%22%22%2C%22DOI%22%3A%2210.1037%5C%2Fa0028347%22%2C%22ISSN%22%3A%22%22%2C%22url%22%3A%22%22%2C%22collections%22%3A%5B%22TIIGTD6N%22%5D%2C%22dateModified%22%3A%222015-09-01T11%3A57%3A27Z%22%7D%7D%2C%7B%22key%22%3A%22STGUHGIT%22%2C%22library%22%3A%7B%22id%22%3A881472%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Barr%20et%20al.%22%2C%22parsedDate%22%3A%222013%22%2C%22numChildren%22%3A2%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3EBarr%2C%20D.%20J.%2C%20Levy%2C%20R.%2C%20Scheepers%2C%20C.%2C%20%26amp%3B%20Tily%2C%20H.%20J.%20%282013%29.%20Random%20effects%20structure%20for%20confirmatory%20hypothesis%20testing%3A%20Keep%20it%20maximal.%20%3Ci%3EJournal%20of%20Memory%20and%20Language%3C%5C%2Fi%3E%2C%20%3Ci%3E68%3C%5C%2Fi%3E%283%29%2C%20255%26%23x2013%3B278.%20%3Ca%20href%3D%27https%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1016%5C%2Fj.jml.2012.11.001%27%3Ehttps%3A%5C%2F%5C%2Fdoi.org%5C%2F10.1016%5C%2Fj.jml.2012.11.001%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22journalArticle%22%2C%22title%22%3A%22Random%20effects%20structure%20for%20confirmatory%20hypothesis%20testing%3A%20Keep%20it%20maximal%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Dale%20J.%22%2C%22lastName%22%3A%22Barr%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Roger%22%2C%22lastName%22%3A%22Levy%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Christoph%22%2C%22lastName%22%3A%22Scheepers%22%7D%2C%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Harry%20J.%22%2C%22lastName%22%3A%22Tily%22%7D%5D%2C%22abstractNote%22%3A%22Linear%20mixed-effects%20models%20%28LMEMs%29%20have%20become%20increasingly%20prominent%20in%20psycholinguistics%20and%20related%20areas.%20However%2C%20many%20researchers%20do%20not%20seem%20to%20appreciate%20how%20random%20effects%20structures%20affect%20the%20generalizability%20of%20an%20analysis.%20Here%2C%20we%20argue%20that%20researchers%20using%20LMEMs%20for%20confirmatory%20hypothesis%20testing%20should%20minimally%20adhere%20to%20the%20standards%20that%20have%20been%20in%20place%20for%20many%20decades.%20Through%20theoretical%20arguments%20and%20Monte%20Carlo%20simulation%2C%20we%20show%20that%20LMEMs%20generalize%20best%20when%20they%20include%20the%20maximal%20random%20effects%20structure%20justified%20by%20the%20design.%20The%20generalization%20performance%20of%20LMEMs%20including%20data-driven%20random%20effects%20structures%20strongly%20depends%20upon%20modeling%20criteria%20and%20sample%20size%2C%20yielding%20reasonable%20results%20on%20moderately-sized%20samples%20when%20conservative%20criteria%20are%20used%2C%20but%20with%20little%20or%20no%20power%20advantage%20over%20maximal%20models.%20Finally%2C%20random-intercepts-only%20LMEMs%20used%20on%20within-subjects%20and%5C%2For%20within-items%20data%20from%20populations%20where%20subjects%20and%5C%2For%20items%20vary%20in%20their%20sensitivity%20to%20experimental%20manipulations%20always%20generalize%20worse%20than%20separate%20F1%20and%20F2%20tests%2C%20and%20in%20many%20cases%2C%20even%20worse%20than%20F1%20alone.%20Maximal%20LMEMs%20should%20be%20the%20%5Cu2018gold%20standard%5Cu2019%20for%20confirmatory%20hypothesis%20testing%20in%20psycholinguistics%20and%20beyond.%22%2C%22date%22%3A%222013%22%2C%22language%22%3A%22%22%2C%22DOI%22%3A%2210.1016%5C%2Fj.jml.2012.11.001%22%2C%22ISSN%22%3A%22%22%2C%22url%22%3A%22%22%2C%22collections%22%3A%5B%22TIIGTD6N%22%5D%2C%22dateModified%22%3A%222015-07-02T17%3A31%3A15Z%22%7D%7D%2C%7B%22key%22%3A%225MTEP9J7%22%2C%22library%22%3A%7B%22id%22%3A881472%7D%2C%22meta%22%3A%7B%22creatorSummary%22%3A%22Barr%22%2C%22parsedDate%22%3A%222013%22%2C%22numChildren%22%3A1%7D%2C%22bib%22%3A%22%3Cdiv%20class%3D%5C%22csl-bib-body%5C%22%20style%3D%5C%22line-height%3A%202%3B%20padding-left%3A%201em%3B%20text-indent%3A-1em%3B%5C%22%3E%5Cn%20%20%3Cdiv%20class%3D%5C%22csl-entry%5C%22%3EBarr%2C%20D.%20J.%20%282013%29.%20Random%20effects%20structure%20for%20testing%20interactions%20in%20linear%20mixed-effects%20models.%20%3Ci%3EFrontiers%20in%20Quantitative%20Psychology%20and%20Measurement%3C%5C%2Fi%3E%2C%20328.%20%3Ca%20href%3D%27https%3A%5C%2F%5C%2Fdoi.org%5C%2F10.3389%5C%2Ffpsyg.2013.00328%27%3Ehttps%3A%5C%2F%5C%2Fdoi.org%5C%2F10.3389%5C%2Ffpsyg.2013.00328%3C%5C%2Fa%3E%3C%5C%2Fdiv%3E%5Cn%3C%5C%2Fdiv%3E%22%2C%22data%22%3A%7B%22itemType%22%3A%22journalArticle%22%2C%22title%22%3A%22Random%20effects%20structure%20for%20testing%20interactions%20in%20linear%20mixed-effects%20models%22%2C%22creators%22%3A%5B%7B%22creatorType%22%3A%22author%22%2C%22firstName%22%3A%22Dale%20J.%22%2C%22lastName%22%3A%22Barr%22%7D%5D%2C%22abstractNote%22%3A%22%22%2C%22date%22%3A%222013%22%2C%22language%22%3A%22%22%2C%22DOI%22%3A%2210.3389%5C%2Ffpsyg.2013.00328%22%2C%22ISSN%22%3A%22%22%2C%22url%22%3A%22http%3A%5C%2F%5C%2Fwww.frontiersin.org%5C%2FJournal%5C%2F10.3389%5C%2Ffpsyg.2013.00328%5C%2Ffull%22%2C%22collections%22%3A%5B%22TIIGTD6N%22%5D%2C%22dateModified%22%3A%222013-10-01T13%3A47%3A37Z%22%7D%7D%5D%7D
R Core Team. (2022).
R: A Language and Environment for Statistical Computing. R Foundation for Statistical Computing.
http://www.R-project.org/
Baayen, H., Davidson, D. J., & Bates, D. (2008). Mixed-effects modeling with crossed random effects for subjects and items.
Journal of Memory and Language,
59(4), 390–412.
https://doi.org/10.1016/j.jml.2007.12.005
Judd, C. M., Westfall, J., & Kenny, D. A. (2012). Treating stimuli as a random factor in social psychology: A new and comprehensive solution to a pervasive but largely ignored problem.
Journal of Personality and Social Psychology,
103(1), 54–69.
https://doi.org/10.1037/a0028347
Barr, D. J., Levy, R., Scheepers, C., & Tily, H. J. (2013). Random effects structure for confirmatory hypothesis testing: Keep it maximal.
Journal of Memory and Language,
68(3), 255–278.
https://doi.org/10.1016/j.jml.2012.11.001
Barr, D. J. (2013). Random effects structure for testing interactions in linear mixed-effects models.
Frontiers in Quantitative Psychology and Measurement, 328.
https://doi.org/10.3389/fpsyg.2013.00328
Related