For the details of the algorithms for the one-way and two way balanced repeated measure design, please see Repeated Measures ANOVA.pdf
Considering the model: Two-Way Mixed Design RM ANOVA with one between subject factor A and another within subject factor B.
Let
be the number of levels for factor A,
be the number of levels for factor B,
be the number of subjects with ith level of factor A,
be observations with respect to jth subject and ith level of factor A.
Define Error matrix as:
and Hypothesis matrix as:
and Hypothesis matrix with intercept as:
where
and
And the degree of freedom can be obtained by
and
, respectively.
Suppose the mean vectors of factor A's levels are
, and we let
Let the contrast matrix be
In order to test
, we can compute the values of Wilks' Lambda, Hotelling-Lawley Trace, Pillai's Trace and Roy's Largest Root. The SS&CPs are:
Notes: All sum of squares are calculated based on type III.
The null hypothesis is
The SS&CPs are:
Let design matrix be
The residual matrix is obtained by
Let
be the
orthogonal matrix which can be set like
Let
Let
Here
Then Mauchly's W Statistic is
The Chi-square test value is
with freedom degree
Some basic calculations:
with degree freedom
with degree freedom
with degree freedom
Where
with degree freedom
with degree freedom
with degree freedom
with degree freedom
with degree freedom
Here
is the design matrix associated to effect A, while
is a
matrix representing the indexed data.
with degree freedom
with degree freedom
There are various methods for multiple means comparison in Origin, and we use the ocstat_dlsm_mean_comparison() function to perform means comparisons.
Two types of multiple means comparison methods:
Single-step method. It creates simultaneous confidence intervals to show how the means differ, including Tukey-Kramer, Bonferroni, Dunn-Sidak, Fisher’s LSD and Scheffé mothods.
Stepwise method. Sequentially perform the hypothesis tests, including Holm-Bonferroni and Holm-Sidak tests