I have a dataset of genotype performance (that's my independent variable) in different growing environments. I want to know if there are interactions between genotypes and the different environments and if the genotypes can be distinguished from each other regardless of the environment. I'm using statsmodels in python with the functipon anova.anova_lm
The results of the ANOVA (1) with genotype*environment interaction are as follows:
sum_sq df F PR(>F)
genotype 0.408288 103.0 3.334366 3.181776e-15
ENV 2.170352 8.0 228.204205 8.152433e-175
genotype:ENV 0.654210 824.0 0.667842 1.000000e+00
Residual 4.277378 3598.0 NaN NaN
This is interpreted as the genotype and environment contributions being significant in the response variable, but the genotype and environment interaction with a p-value of 1 is not significant.
However, if I run another ANOVA (2) using only genotypes as a variable, I get the following result:
sum_sq df F PR(>F)
genotype 0.167824 103.0 0.8209 0.905164
Residual 8.683694 4375.0 NaN NaN
The p-value of 0.9 indicates that there are no significant differences between different genotypes. Why do genotypes not contribute to the response variable here but do in ANOVA 1?
Finally, if I run another ANOVA (3) considering only the interaction between genotype and environment, but not their individual terms, I get:
sum_sq df F PR(>F)
genotype:ENV 4.860024 935.0 4.372 3.325465e-215
Residual 4.277378 3598.0 NaN NaN
The interpretation is that there are significant differences between genotype and environment interactions, which seems to contradict the results obtained in ANOVA 1.
All I want to answer is whether there are significant differences in the response of different genotypes.
anova()
functions can produce misleading results, and I'm not sure howanova()
would be interpreted with an interaction-only model that omits "main effects." Please provide that information by editing the question, as comments are easy to overlook and can be deleted. $\endgroup$