Interaction term in capscale function #716
Unanswered
TeresaBoquete
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm using the function capscale to test the effect of two predictors and their interaction in my distance matrix. That is, I have a symmetric pairwise distance matrix as a response, and two factors (population of origin - with 4 levels - and treatment - with two levels) as predictors. I run the following full model using the function:
m1 = capscale(DistanceMatrix ~ Population + Treatment + Population:Treatment)
Then I run anova on the model to test its significance:
anova(m1, permutations = 9999)
Finally, I used the function RsquareAdj to obtain the variance explained by the model:
RsquareAdj(m1).
After doing this, I wanted to compare the results of the model with and without the interaction term and realized that when I model the interaction alone (without the main effects), I obtain the exact same results as in model 1 (m1). That is, the results of m2 (below) are exactly de same as m1:
m2 = capscale(DistanceMatrix ~ Population:Treatment)
Does this mean that what I assumed was the notation for the interaction only (Population:Treatment) is the notation for the full model (something like the Population * Treatment option in linear models)?
The information of the package says that the formula can have interactions as in a typical formula in R, in which, according to the manual, the ":" notation indicates the interaction term.
I'm attaching a screenshot of the results of these two models in case it helps.
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions