Code covered by the BSD License

### Highlights from RMAOV2

4.33333

4.3 | 6 ratings Rate this file 10 Downloads (last 30 days) File Size: 4.27 KB File ID: #5578

# RMAOV2

28 Jul 2004 (Updated 03 Aug 2004)

Repeated measures two-way analysis of variance test.

File Information
Description

ANOVA with two within-subject variables is used to analyze the relationship between two independent variables and the dependent variable. This procedure requires fewer participants but can give rise to research confounds such as order or practice effects and participant bias.

For a more detailed explanation on repeated measures designs, we suggest you read the help section of the RMAOV1 file you can find on this MATLAB File Exchange site.

It needs to input the X- data matrix (Size of matrix must be n-by-4;dependent variable=column 1;independent variable 1=column 2;independent variable 2=column 3;subject=column 4) and the alpha-significance level (default = 0.05).

The output is a complete Analysis of Variance table and the strength of the relationships.

MATLAB release MATLAB 5.3 (R11)
19 Jun 2012

How can we add the fdr correction on this statistic??

Thanks

09 Aug 2011

Warning. This function (and apparently all other ANOVA functions by this author) produces a wrong output if (A) one of the factors has more than 10 levels and more than 10 subjects are used or (B) both factors have more than 10 levels.
The reason is that the "eval()" function is used to create temporary storage variables. Unfortunately, "factorlevel 1" and "subject 11" and "factorlevel 11" and "subject 1" are written into the same storage variable with the concatenated name "x111", that is, the value of this variable is accidentally overwritten. This produces wrong results and also explains the negative F-values reported above.

09 Aug 2011
20 Aug 2009

- I encountered negative SS values, and consequently negative Fs
- the output differed from SPSS output both with SS model II and III, and from rm_anova2.m that uses SS model III and gives the same results as SPSS

01 Nov 2007

My Dear Ji Cling,

Regularly I visit this FEX site in which excellent contributions for the fast solution of diverse types of problems in several disciplines have been given. The accusation that you are causing is very delicate. I do not know you. Neither the authors. We known them only by the references given in their author page. Only what I believe is in the quality of ethics of each one of them and ours. We are serious people dedicated to our work in the most diverse specialties. To be certain what you say. Then not alone this author does cheating but also all the others. Even you, that in principle, I think you are not signing with your true name. Finally, or really the community are honestly dawnloaded the m-files or finally someone are doing a very bad play. This because there exists a lack of control on this.

Best Wishes.

Mike

01 Nov 2007

Shame on you.

24 Mar 2006
20 Mar 2006

Thanks for great code!

28 Feb 2005

Works for me. However, unlike the toolbox function, anovan, the grouping variables must be consecutive integers, 1:n. This will be fixed by:

function [Gred] = facred(G)

% G is the orginal matrix of grouping variables:
% each row for is an observation; each column is a different grouping variable.
Gred = G;
for k = 1:size(G,2)
groups = sort(unique(G(:,k)));

for m = 1:length(groups)
t = find(G(:,k) == groups(m));
Gred(t,k) = m;
end
end

18 Jan 2005

Good code.

18 Nov 2004

My friends think this is great and told me to download it.

03 Aug 2004

It was added an appropriate format to cite this file.

03 Aug 2004

It was added an appropriate format to cite this file.

03 Aug 2004

It was added an appropriate format to cite this file.

03 Aug 2004

It was added an appropriate format to cite this file.