楼主: ReneeBK
2751 2

[问答] Difference between a 2 factor ANOVA and mixed effects model [推广有奖]

  • 1关注
  • 62粉丝

VIP

已卖:4896份资源

学术权威

14%

还不是VIP/贵宾

-

TA的文库  其他...

R资源总汇

Panel Data Analysis

Experimental Design

威望
1
论坛币
49634 个
通用积分
55.5065
学术水平
370 点
热心指数
273 点
信用等级
335 点
经验
57805 点
帖子
4005
精华
21
在线时间
582 小时
注册时间
2005-5-8
最后登录
2023-11-26

楼主
ReneeBK 发表于 2014-4-15 01:19:50 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

The lme4 package in R includes the cake dataset.


library(lme4)head(cake[,2:4], 20)   

        recipe temperature angle

1       A         175    42
2       A         185    46
3       A         195    47
4       A         205    39
5       A         215    53
6       A         225    42
7       B         175    39
8       B         185    46
9       B         195    51
10      B         205    49
11      B         215    55
12      B         225    42
13      C         175    46
14      C         185    44
15      C         195    45
16      C         205    46
17      C         215    48
18      C         225    63
19      A         175    47
20      A         185    29


I've analysed the cake dataset using two different models below. The first model is a 2 factor ANOVA:

summary(aov(angle ~ temperature + recipe, cake)) T[backcolor=rgba(252, 251, 248, 0.901961)]he second is a mixed effects model, with[backcolor=rgba(252, 251, 248, 0.901961)] temperature[backcolor=rgba(252, 251, 248, 0.901961)] [backcolor=rgba(252, 251, 248, 0.901961)]as a random effect:lmer(angle ~ recipe + (1| temperature), data=cake, REML=F)

Is someone able to provide a summary of what the mixed effect model has done differently to the ANOVA?




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:difference Between effects DIFFER erence between factor

沙发
ReneeBK 发表于 2014-4-15 01:21:03
I'm absolutely not a specialist, but this is my contribution:

In your ANOVA model, you treated both 'recipe' and 'temperature' as fixed factors, which can be thought of in terms of differences.

In your linear mixed model, you treated 'temperature' as a random factor, which is defined by a distribution and whose values are assumed to be chosen from a population with a normal distribution with a certain variance. It turns out that the corresponding output is now an estimate of this variance (line labeled 'temperature' in the Random effects section). And you can notice that the output for the 'recipe' is indeed an estimate for mean-differences (lines labeled recipeB and recipeC in the Fixed effects section).

藤椅
ReneeBK 发表于 2014-4-15 01:27:02
Very briefly: In a two factor ANOVA (or, more generally, in a model that can be analyzed with lm in R) variables are controlled for. That is, it asks "Holding other independent variables constant, what is the linear relationship of each independent variable with the dependent variable?" Such models have a number of assumptions, key here is that they assume that the errors (as estimated by the residuals) are independent. Often, this is reasonable; also, often, it is not. In the cake data set it is not, because each recipe is tested multiple times, and surely the errors from the model will be more similar within each recipe than across recipes.

Mixed models relax this assumption.

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-9 10:25