I have a data-set where my response variable is clutch size (TCL), and two predictors that are factors: location (TYPE2) and year (AN). I did a two-way ANOVA analysis with interaction. However, in my results I am not able to see results for the interaction. The data looks like this (an example):
TCL
8
6
5
3
2
3
3
3
NA
4
LOC
N
S
S
N
N
N
N
S
N
N
AN
2000
2005
2005
2010
2010
2000
2010
2008
2000
2000
Is it because AN is independent from LOC? (ie if AN=2000 belongs to LOC=N, this means it is never in LOC=S). Every AN can be only in one category, either N or S.
This is my model and my result:
INIcrp <- aov(INI ~ TYPE2 * AN,data=todos)
summary(INIcrp)
# Df Sum Sq Mean Sq F value Pr(>F)
#TYPE2 1 3437 3437 380.9 <2e-16 ***
#AN 14 29713 2122 235.2 <2e-16 ***
#Residuals 5168 46628 9
I'm not sure why the interaction term is missing, but there are ways to add it in explicitly, such as :
aov(INI ~ TYPE2 * AN + I(TYPE2*AN),data=todos)
or
todos$TYPE2_AN <- with(todos,TYPE2*AN)
aov(INI ~ TYPE2 + AN + TYPE2_AN,data=todos)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.