我有一个数据集,我在其中测量了diff
38 名参与者 ( sub
) 在两种不同条件 ( ) 下的变量 ( cond.lag
)。position
现在我对这两个条件之间项目的斜率是否不同感兴趣。cond.lag
那就是我对和之间是否存在交互感兴趣position
(我之前以 0 为中心)。
require(lme4)
options(contrasts=c('contr.sum', 'contr.poly'))
# read data
dat <- read.table("http://pastebin.com/raw.php?i=MmNQigRv", colClasses = c(NA, rep("factor", 2), rep("numeric", 2)))
# center position
dat$pos.centered <- scale(dat$position, scale = FALSE)
# fit the model
m1 <- lmer(diff ~ cond.lag * pos.centered + (cond.lag * pos.centered|sub), dat)
print(summary(m1), corr = FALSE)
## [...]
## Fixed effects:
## Estimate Std. Error t value
## (Intercept) 0.0819639 0.0121378 6.753
## cond.lag1 -0.0122033 0.0155427 -0.785
## pos.centered 0.0031775 0.0006429 4.942
## cond.lag1:pos.centered -0.0011495 0.0011351 -1.013
虽然看起来好像我没有找到交互作用(仅是位置斜率的主要影响),但我不确定这个模型是否有意义,因为我发现了一个非常不寻常的(我预计重尾)qq 图:
qqnorm(resid(m1))
qqline(resid(m1))
问题:
- 尽管看起来表现不佳的残差,这个模型是否有意义?
- 我该怎么做才能去除那些沉重的尾巴或获得更好的模型?