Why is my Mixed ANOVA including the intercept as an interaction term?
Hi there,
I have been getting different outputs from Matlab to JASP and SPSS, both of which agree that Matlab is wrong, which I think is due to the intercept being included as an interaction term in the model spec.
I have run a 2b*6w*2w Mixed ANOVA in Matlab. (Between-2=Consciousness, Within-6 = Conguency, Within-2 =Target) However I am getting the intercept as an interaction term in my ranova table:
Matlab Output
The factors Congruency and Target should be reported only as a main effects, not as an interaction with the intercept.
I’m including a JASP output so to compare the difference between the two softwares.
Could you take a look at my code, I think I’ve done something wrong in the Wilkinson notation of the model specification, and tell me how I stop it using the intercept as an interaction term.
OverallDataTable=readtable(‘Data.xlsx’)
WithinDesign=table(categorical({‘Related Hand’,’Related Foot’,’Unrelated Hand’,’Unrelated Foot’, …
‘Neutral Hand’,’Neutral Foot’,’Related Hand’,’Related Foot’,’Unrelated Hand’,’Unrelated Foot’, …
‘Neutral Hand’,’Neutral Foot’}’),categorical({‘BP’,’BP’,’BP’,’BP’,’BP’,’BP’,’O’,’O’,’O’,’O’,’O’,’O’}’), …
‘VariableNames’,{‘Congruency’,’Target’});
OverallMixedANOVA=fitrm(OverallDataTable,’BP_RH_Con-O_NF_Sub~Consciousness’,WithinDesign=WithinDesign);
OverallMixedANOVATable=ranova(OverallMixedANOVA,"WithinModel",’Congruency*Target’)
Thanks for any and all advice
DanHi there,
I have been getting different outputs from Matlab to JASP and SPSS, both of which agree that Matlab is wrong, which I think is due to the intercept being included as an interaction term in the model spec.
I have run a 2b*6w*2w Mixed ANOVA in Matlab. (Between-2=Consciousness, Within-6 = Conguency, Within-2 =Target) However I am getting the intercept as an interaction term in my ranova table:
Matlab Output
The factors Congruency and Target should be reported only as a main effects, not as an interaction with the intercept.
I’m including a JASP output so to compare the difference between the two softwares.
Could you take a look at my code, I think I’ve done something wrong in the Wilkinson notation of the model specification, and tell me how I stop it using the intercept as an interaction term.
OverallDataTable=readtable(‘Data.xlsx’)
WithinDesign=table(categorical({‘Related Hand’,’Related Foot’,’Unrelated Hand’,’Unrelated Foot’, …
‘Neutral Hand’,’Neutral Foot’,’Related Hand’,’Related Foot’,’Unrelated Hand’,’Unrelated Foot’, …
‘Neutral Hand’,’Neutral Foot’}’),categorical({‘BP’,’BP’,’BP’,’BP’,’BP’,’BP’,’O’,’O’,’O’,’O’,’O’,’O’}’), …
‘VariableNames’,{‘Congruency’,’Target’});
OverallMixedANOVA=fitrm(OverallDataTable,’BP_RH_Con-O_NF_Sub~Consciousness’,WithinDesign=WithinDesign);
OverallMixedANOVATable=ranova(OverallMixedANOVA,"WithinModel",’Congruency*Target’)
Thanks for any and all advice
Dan Hi there,
I have been getting different outputs from Matlab to JASP and SPSS, both of which agree that Matlab is wrong, which I think is due to the intercept being included as an interaction term in the model spec.
I have run a 2b*6w*2w Mixed ANOVA in Matlab. (Between-2=Consciousness, Within-6 = Conguency, Within-2 =Target) However I am getting the intercept as an interaction term in my ranova table:
Matlab Output
The factors Congruency and Target should be reported only as a main effects, not as an interaction with the intercept.
I’m including a JASP output so to compare the difference between the two softwares.
Could you take a look at my code, I think I’ve done something wrong in the Wilkinson notation of the model specification, and tell me how I stop it using the intercept as an interaction term.
OverallDataTable=readtable(‘Data.xlsx’)
WithinDesign=table(categorical({‘Related Hand’,’Related Foot’,’Unrelated Hand’,’Unrelated Foot’, …
‘Neutral Hand’,’Neutral Foot’,’Related Hand’,’Related Foot’,’Unrelated Hand’,’Unrelated Foot’, …
‘Neutral Hand’,’Neutral Foot’}’),categorical({‘BP’,’BP’,’BP’,’BP’,’BP’,’BP’,’O’,’O’,’O’,’O’,’O’,’O’}’), …
‘VariableNames’,{‘Congruency’,’Target’});
OverallMixedANOVA=fitrm(OverallDataTable,’BP_RH_Con-O_NF_Sub~Consciousness’,WithinDesign=WithinDesign);
OverallMixedANOVATable=ranova(OverallMixedANOVA,"WithinModel",’Congruency*Target’)
Thanks for any and all advice
Dan fitrm, statistics, mixed anova, ranova, wilkinson notation MATLAB Answers — New Questions