17.4.2.4 Algorithms (Repeated Measures ANOVA)RMANOVA-Algorithm
One-way/Two-way Repeated Measures
For the details of the algorithms for the one-way and two way balanced repeated measure design, please see Repeated Measures ANOVA.pdf
Two-way Mixed-Design
Multivariate Tests
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
Main effect of within factor B
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.
Interaction effect of B*A
The null hypothesis is The SS&CPs are:
Mauchly's Test of Sphericity
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
Within and Between Test
Some basic calculations:
with degree freedom
- Sum Square of Between Factor A:
with degree freedom
- Sum Square of Within Factor B:
with degree freedom
Where
Tests of Within-Subjects Effects
- Sum Square of factor B for Within test
with degree freedom
- Sum Square of interaction A*B for Within test
with degree freedom
- Sum Square of error(factor B) for Within test
with degree freedom
Tests of Between-Subjects Effects
- Sum Square of intercept for Between test
with degree freedom
- Sum Square of intercept for Between test(when set intercept = 0)
with degree freedom Here is the design matrix associated to effect A, while is a matrix representing the indexed data.
- Sum Square of between factor A for Between test
with degree freedom
- Sum Square of error(factor A) for Between test
with degree freedom
Multiple Means Comparisons
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
|