{{category GLMM}} R lme4 {{outline}} ---- !! 語彙性判断課題を例に !課題 * 提示される語彙項目(単語)が、実在するか・しないかを判断 * 判断するまでの時間を測る !使用するパッケージ {{pre install.packages("lme4", repos=c("http://lme4.r-forge.r-project.org/repos")) library(lme4) install.packages("lmerTest", repos=c("http://lme4.r-forge.r-project.org/repos")) library(lmerTest) install.packages("effects", repos=c("http://lme4.r-forge.r-project.org/repos")) library(effects) }} !!反応時間の分析 *目的変数は、反応時間(RT) **反応時間の分布は、例えば<<ガンマ分布>>を想定する *説明変数は、影響を与えると考えられる(調べたい)要因 **例えば ***実在するか・しないか(Real) ***複雑か・単純か(Simpl) ***判断の正誤(CR) ***参加者が、母語話者か学習者か(Lang) {{pre model01 <- glmer(RT ~ Real*Simpl*CR*Lang+(1|Subj)+(1|Item), family=Gamma(link="log"), data) summary(model01) plot(allEffects(model01, confidence.level=.95)) }} !!正答率の分析 *目的変数は、正誤判断(CR) **正誤判断の分布は、<<二項分布>>を想定する(ロジスティック回帰) *説明変数は、影響を与えると考えられる(調べたい)要因 **例えば ***実在するか・しないか(Real) ***複雑か・単純か(Simpl) ***参加者が、母語話者か学習者か(Lang) {{pre model.CR01 <- glmer(CR ~ Real*Simpl*Lang+(1|Subj)+(1|Item), family=binomial, data) summary(model.CR01) plot(allEffects(model.CR01, confidence.level=.95)) }} !!反応時間の変換 *Lo and Sally (2015) To transform or not to transform: using generalized linear mixed models to analyse reaction time data https://www.frontiersin.org/articles/10.3389/fpsyg.2015.01171/full ""the Gamma and Inverse Gaussian are examples of distributions that provide a plausible description of processes reflected in RT *Balota et al. (2013)の指摘:反応時間の生データを使うことの問題点 *Speelman and McGann (2013)の指摘:平均値を使うことの問題点 !!参考 !反応時間の分布と変換 https://lindeloev.github.io/shiny-rt/