Repeated-measures ANOVA with no between-factor
Hi all!
I am trying to perform a two-way repeated measures ANOVA by using the function fitrm and ranova. I have two within-factors (e.g. Condition & Side) and no between-subject factors. I tried the code below, based on the different topics on the mathworks help page. Cause I have no between-subjects factor I thought i should use ~1 as constant. However, I keep getting the following error:
Error using RepeatedMeasuresModel.fit (line 1347)
The between-subjects design must have full column rank.
Error in fitrm (line 77)
s = RepeatedMeasuresModel.fit(ds,model,varargin{:});
Error in Statistics_JvdH_versie5 (line 7778)
rm_APMoS_MSZP = fitrm(t_APMoS_MSZP,’CWSaff-CWS2laff~1′,’WithinDesign’,Condition)
Does anyone know how to solve this problem? Or know another way to perform this analysis in matlab.
See code below:
t_APMoS_MSZP = table(MoS_AP_side1_CWS_MSZP,MoS_AP_side2_CWS_MSZP,MoS_AP_side1_FWS_MSZP,…
MoS_AP_side2_FWS_MSZP,MoS_AP_side1_CWS2_MSZP,MoS_AP_side2_CWS2_MSZP…
,’VariableNames’,{‘CWSside1′,’CWSside2′,’FWSside1′,’FWSside2′,’CWS2side1′,’CWS2side2’});
Condition = table([1 1 2 2 3 3]’,[1 2 1 2 1 2]’,’VariableNames’,{‘Condition’ ‘Side’});
rm_APMoS_MSZP = fitrm(t_APMoS_MSZP,’CWSside1-CWS2side2~1′,’WithinDesign’,Condition)
[b1_APMoS,A_APMoS,C_APMoS,D_APMoS] = ranova(rm_APMoS_MSZP,’WithinModel’,’Condition*Side’);Hi all!
I am trying to perform a two-way repeated measures ANOVA by using the function fitrm and ranova. I have two within-factors (e.g. Condition & Side) and no between-subject factors. I tried the code below, based on the different topics on the mathworks help page. Cause I have no between-subjects factor I thought i should use ~1 as constant. However, I keep getting the following error:
Error using RepeatedMeasuresModel.fit (line 1347)
The between-subjects design must have full column rank.
Error in fitrm (line 77)
s = RepeatedMeasuresModel.fit(ds,model,varargin{:});
Error in Statistics_JvdH_versie5 (line 7778)
rm_APMoS_MSZP = fitrm(t_APMoS_MSZP,’CWSaff-CWS2laff~1′,’WithinDesign’,Condition)
Does anyone know how to solve this problem? Or know another way to perform this analysis in matlab.
See code below:
t_APMoS_MSZP = table(MoS_AP_side1_CWS_MSZP,MoS_AP_side2_CWS_MSZP,MoS_AP_side1_FWS_MSZP,…
MoS_AP_side2_FWS_MSZP,MoS_AP_side1_CWS2_MSZP,MoS_AP_side2_CWS2_MSZP…
,’VariableNames’,{‘CWSside1′,’CWSside2′,’FWSside1′,’FWSside2′,’CWS2side1′,’CWS2side2’});
Condition = table([1 1 2 2 3 3]’,[1 2 1 2 1 2]’,’VariableNames’,{‘Condition’ ‘Side’});
rm_APMoS_MSZP = fitrm(t_APMoS_MSZP,’CWSside1-CWS2side2~1′,’WithinDesign’,Condition)
[b1_APMoS,A_APMoS,C_APMoS,D_APMoS] = ranova(rm_APMoS_MSZP,’WithinModel’,’Condition*Side’); Hi all!
I am trying to perform a two-way repeated measures ANOVA by using the function fitrm and ranova. I have two within-factors (e.g. Condition & Side) and no between-subject factors. I tried the code below, based on the different topics on the mathworks help page. Cause I have no between-subjects factor I thought i should use ~1 as constant. However, I keep getting the following error:
Error using RepeatedMeasuresModel.fit (line 1347)
The between-subjects design must have full column rank.
Error in fitrm (line 77)
s = RepeatedMeasuresModel.fit(ds,model,varargin{:});
Error in Statistics_JvdH_versie5 (line 7778)
rm_APMoS_MSZP = fitrm(t_APMoS_MSZP,’CWSaff-CWS2laff~1′,’WithinDesign’,Condition)
Does anyone know how to solve this problem? Or know another way to perform this analysis in matlab.
See code below:
t_APMoS_MSZP = table(MoS_AP_side1_CWS_MSZP,MoS_AP_side2_CWS_MSZP,MoS_AP_side1_FWS_MSZP,…
MoS_AP_side2_FWS_MSZP,MoS_AP_side1_CWS2_MSZP,MoS_AP_side2_CWS2_MSZP…
,’VariableNames’,{‘CWSside1′,’CWSside2′,’FWSside1′,’FWSside2′,’CWS2side1′,’CWS2side2’});
Condition = table([1 1 2 2 3 3]’,[1 2 1 2 1 2]’,’VariableNames’,{‘Condition’ ‘Side’});
rm_APMoS_MSZP = fitrm(t_APMoS_MSZP,’CWSside1-CWS2side2~1′,’WithinDesign’,Condition)
[b1_APMoS,A_APMoS,C_APMoS,D_APMoS] = ranova(rm_APMoS_MSZP,’WithinModel’,’Condition*Side’); repeated-measures anova, between-subjects factors, within-subject factors, fitrm, ranova MATLAB Answers — New Questions