我想知道如何使用重复测量方法对数据集中的logit二项式分布进行准确性的logistic回归。
我试图像上面那样进行逻辑回归,但是似乎没有考虑主题的“重复测量”,例如我可以在AOV中使用“ Error(subject)”因子进行RT
df <- read.table(text = "subject condition acc rt
1 A TRUE 254
1 B TRUE 645
2 A FALSE 243
2 B TRUE 656
3 A FALSE 234
3 B TRUE 456", header= TRUE)
acc <- with(df, aggregate(acc, list(subject, condition), sum))
colnames(acc) <- c("subject", "condition", "true")
acc$false <- 2-acc$true
summary(glm(cbind(acc$true, acc$false) ~ condition, data = acc, family = "binomial"))
anova(glm(cbind(acc$true, acc$false) ~ condition, data = acc, family = "binomial"), test = "Chisq")
summary(aov(df$rt ~ df$condition + Error(df$subject)))`
请,有人可以帮我吗?非常感谢!